Convert Binary to Decimal in PX 8.0.1

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
satishm
Participant
Posts: 22
Joined: Wed Aug 20, 2008 6:37 am

Convert Binary to Decimal in PX 8.0.1

Post by satishm »

Hi, Can anyone please help me to convert the input Binary column to be converted to Decimal.

Input string is "08 16 O 00 0f 08 16 O f5 f0 f1 f0 f0 e8 e8 f0 f0 f1 f1 d5 @ @ 07 85 14 8f 00 0f 00 00 00 0f 00 00 00 03 8c 01 d 09 / f0 f2 f0 f2"

Output should be Decimal value.

Can please anyone help me on this?
This is urgent.

Thanks in Advance.
ArndW
Participant
Posts: 16318
Joined: Tue Nov 16, 2004 9:08 am
Location: Germany
Contact:

Post by ArndW »

The issue might be urgent for you, but not to DSXchange. Ray puts it into a much nicer wording than I do.

"Binary" just means non-ascii unless you specify what format it is in. Without knowing what format it is, no conversion is possible. But my first guess is that you are looking at more than one number considering the length of the string.
satishm
Participant
Posts: 22
Joined: Wed Aug 20, 2008 6:37 am

Post by satishm »

I appologise for words mismatch from my side, i must have typed in "Issue is Urgent for me".

This is the Filler column from CFF which was stored into dataset as a binary column in our Cycle 1 jobs, now in Cycle 2 we are using this dataset and extracting the information stored in Filler column, this is a Hex Data and we tried many routines but it just throws error "Unable to convert Raw to String."

Please do help me.

Thanks N Regards.
anand_dafaria
Premium Member
Premium Member
Posts: 36
Joined: Wed Dec 27, 2006 3:50 am
Location: Phoenix

Post by anand_dafaria »

Hi,
I think you need to put the data from cycle 1 jobs into a binary file instead of a dataset and then read that file using CFF once again by giving the correct layout of the filler column.


Thanks
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

What size decimal?

There is information in the manuals about how decimal numbers are stored, but the number of bytes depends on both the precision and the scale.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
satishm
Participant
Posts: 22
Joined: Wed Aug 20, 2008 6:37 am

Post by satishm »

Hi, We want to use only first 18 digits from the filed.
Like the Field Name is Filler1 with size 120.
But we will be using Filler1[1,18] and store it in Decimal of (20,2).


Thanks.
Kryt0n
Participant
Posts: 584
Joined: Wed Jun 22, 2005 7:28 pm

Re: Convert Binary to Decimal in PX 8.0.1

Post by Kryt0n »

satishm wrote:Hi, Can anyone please help me to convert the input Binary column to be converted to Decimal.

Input string is "08 16 O 00 0f 08 16 O f5 f0 f1 f0 f0 e8 e8 f0 f0 f1 f1 d5 @ @ 07 85 14 8f 00 0f 00 00 00 0f 00 00 00 03 8c 01 d 09 / f0 f2 f0 f2"

Output should be Decimal value.

Can please anyone help me on this?
This is urgent.

Thanks in Advance.
I can't see you getting an 18 digit decimal out of that input, I can't even see an 18 digit packed decimal in it... or do you mean literally each character in to decimal equivalent?
Post Reply