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
Schema file doubt in Datastage
Moderators: chulett, rschirm, roy
-
- Participant
- Posts: 4
- Joined: Thu May 31, 2007 6:53 am
Schema file doubt in Datastage
Last edited by guilherme007 on Wed Mar 25, 2009 6:51 am, edited 1 time in total.
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)
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)
-
- Participant
- Posts: 4
- Joined: Thu May 31, 2007 6:53 am
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
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