EBCDIC(Binary) to ASCII using CFF stage

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
Mike
Premium Member
Premium Member
Posts: 1021
Joined: Sun Mar 03, 2002 6:01 pm
Location: Tampa, FL

Post by Mike »

You just have the wrong endianness (Byte Order).

849 = x0351
20739 = x5103

Try it with Big Endian.

Mike
kogads
Premium Member
Premium Member
Posts: 74
Joined: Fri Jun 05, 2009 5:36 pm

Post by kogads »

Thanks for your help Mike, That setting helped me to get the expected result. But in the output file, I could see a Decimal point (.) after the packed filed (Comp-3) in the result. The result looks like below for the last field (Packed filed)

1111115.

Can anyone help me to know the reason for this decimal point after the last field.

One more thing is my input file has only one record but when I run the job its trying to import the second record and aborting stating that import error at record 2.

Thanks in advance!
jwiles
Premium Member
Premium Member
Posts: 1274
Joined: Sun Nov 14, 2004 8:50 pm
Contact:

Post by jwiles »

COMP-3 is a decimal storage format. When a decimal is converted to a string, it will contain a decimal point. If the scale of the decimal is 0, that decimal point will still be present in the string as the last byte.

If the scale is 0, you can likely just convert the decimal to an integer column before writing to your output.

Regards,
- james wiles


All generalizations are false, including this one - Mark Twain.
kogads
Premium Member
Premium Member
Posts: 74
Joined: Fri Jun 05, 2009 5:36 pm

Post by kogads »

Thank you so much for the help James....
Post Reply