Unsigned BigInt Out_format,right justify (write to seq file)

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
ivannavi
Premium Member
Premium Member
Posts: 120
Joined: Mon Mar 07, 2005 9:49 am
Location: Croatia

Unsigned BigInt Out_format,right justify (write to seq file)

Post by ivannavi »

Been trying the whole day. (things like %llu, %Lu, %20u etc...) No luck. It always ends up left justified. And it doesn't make any difference if I don't specify the Out_format at all. :!: :?:
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

What are you trying to accomplish? These samples are strings, not BigInt. Therefore they will be left-justified. Please provide more detail of your job design, and any transformation expressions you may be using.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
ivannavi
Premium Member
Premium Member
Posts: 120
Joined: Mon Mar 07, 2005 9:49 am
Location: Croatia

Post by ivannavi »

I'm trying to write an unsigned BigInt column to a sequential file (fixed width)
The column comes out from a Modify stage where it is converted from decimal(38,0) (I know, possible range limitation) to uint64 using "uint64_from_decimal". I have also tried implicit conversion inside a transformer.
If I change it to an ordinary integer (unsigned 32 bit) it works fine with "%10u" format specified. And it comes out right justified. It's only that this type is too small. So I need uint64.
What do you mean by "These samples are strings"? :?
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

You did not specify that they were format strings, so I had to assume they were data.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
ivannavi
Premium Member
Premium Member
Posts: 120
Joined: Mon Mar 07, 2005 9:49 am
Location: Croatia

Post by ivannavi »

Wrote a simple "hello world" in c. It behaves the same. So now I know this s a c language issue. Posted a question in comp.lang.c newsgroup.
ivannavi
Premium Member
Premium Member
Posts: 120
Joined: Mon Mar 07, 2005 9:49 am
Location: Croatia

Post by ivannavi »

The right format is "%20llu". Thanks to people at comp.lang.c
Post Reply