Schema file doubt in Datastage

Post questions here relative to DataStage Enterprise/PX Edition for such areas as Parallel job design, Parallel datasets, BuildOps, Wrappers, etc.

Moderators: chulett, rschirm, roy

Post Reply
guilherme007
Participant
Posts: 4
Joined: Thu May 31, 2007 6:53 am

Schema file doubt in Datastage

Post by guilherme007 »

Using the RCP to create a datafile from an oracle table I faced a problem with the format of an integer field. As I described in another the topic
viewtopic.php?t=125153&highlight=null+oraclestage

I was not being able to load the data in the file.

I solved the problem by changing the format of the output field

From
FIELD :nullable int32 { c_format='%+012d',width=12,default=0 };

To
FIELD :nullable int64 { c_format='%+012llu',width=12,default=0 };

It is now working, but I would like very much to understand why it was happening, and also, if it is possible to put the sign in this "llu" field. It seems that the c_format sign does not work with the llu, and my field must have a sign!!

Now I have
003823892932

And I need
+03823892932

(Obs: The c_format in bu job works well putting the sign in the '%+012d' fields, but not for the '%+012llu')

Thanks very much!!
Guilherme
Last edited by guilherme007 on Wed Mar 25, 2009 6:51 am, edited 1 time in total.
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

Signal = sign, yes?
-craig

"You can never have too many knives" -- Logan Nine Fingers
asorrell
Posts: 1707
Joined: Fri Apr 04, 2003 2:00 pm
Location: Colleyville, Texas

Post by asorrell »

Guilherme,

In the thread you referenced above (non-nullable fields showing as nullable) - you referenced at the end of the thread that you had "fixed" the problem - but you didn't say how!

Can you please go back and put in a brief message as to what the actual problem was and how you fixed it? Just so others can benefit later...

Thanks!

(Content Editor)
Andy Sorrell
Certified DataStage Consultant
IBM Analytics Champion 2009 - 2020
guilherme007
Participant
Posts: 4
Joined: Thu May 31, 2007 6:53 am

Post by guilherme007 »

Yes Chulett, I mean sign, thanks for the correction. I was very tired when I wrote the first post!

I have just written the solution in the other post asorrell.

Now the only problem I am having is that I need to format a 'llu' integer with sign, but I wondering if this is possible because I did not found examples in the C language documents nor in dsxchange or google!!!!

If you have some idea, please tell me.

Thanks,
Guilherme
Post Reply