Page 1 of 1

EBCDIC CONVERSION

Posted: Tue Mar 21, 2006 6:30 pm
by reddy
Datastage Gurus,

I am getting fixed width file file from one of our users,in some fields in the last positions i am seeing EBCDIC characters,but i need to convert like the below examples:

a. Billing amount value = 000000200{

Ans:the billing amount is +20.00 dollars.

b. Billing amount value = 000004523C

Ans: the billing amount is +452.33 dollars.

c. Billing amount value = 000023981P

Ans:the billing amount is -2398.17 dollars.

Can you please light on me.

Thanks in advance.
Reddy

Posted: Tue Mar 21, 2006 6:41 pm
by s_r_chandru
Hi,

Try to Use the Build In Routine "DataTypePicS9" To convert the data type in EBCDIC into an integer.

-Chandru

Posted: Tue Mar 21, 2006 7:20 pm
by rasi
Reddy

Use Routine "DataTypePicS9" as Chandru said and on top of that Divide the result by 100 to get the right decimal place for your result.

eg.

DataTypePicS9(000000200{)/100 = 20.00

Thanks

Posted: Wed Mar 22, 2006 9:19 am
by reddy
rasi wrote:Reddy

Use Routine "DataTypePicS9" as Chandru said and on top of that Divide the result by 100 to get the right decimal place for your result.

eg.

DataTypePicS9(000000200{)/100 = 20.00

Thanks
Hi Guys,

Thanks a lot for a quick responses.

I need to get the output with + and _ Signs like this
+20.00 dollars

Thanks in advance
reddy

Posted: Wed Mar 22, 2006 9:26 am
by ArndW
Reddy - what is not working the way you would like by using the DataTypePicS9 conversion?

Posted: Wed Mar 22, 2006 9:29 am
by reddy
ArndW wrote:Reddy - what is not working the way you would like by using the DataTypePicS9 conversion? ...
Hi Guys,

Sorry guys.Everything is working fine.I really appreciate you guys help.

Thanks a lot guys.

Reddy