EBCDIC CONVERSION

Post questions here relative to DataStage Server Edition for such areas as Server job design, DS Basic, Routines, Job Sequences, etc.

Moderators: chulett, rschirm, roy

Post Reply
reddy
Premium Member
Premium Member
Posts: 168
Joined: Tue Dec 07, 2004 12:54 pm

EBCDIC CONVERSION

Post 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
s_r_chandru
Charter Member
Charter Member
Posts: 13
Joined: Tue Apr 08, 2003 9:51 pm
Location: Australia

Post by s_r_chandru »

Hi,

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

-Chandru
rasi
Participant
Posts: 464
Joined: Fri Oct 25, 2002 1:33 am
Location: Australia, Sydney

Post 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
Regards
Siva

Listening to the Learned

"The most precious wealth is the wealth acquired by the ear Indeed, of all wealth that wealth is the crown." - Thirukural By Thiruvalluvar
reddy
Premium Member
Premium Member
Posts: 168
Joined: Tue Dec 07, 2004 12:54 pm

Post 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
ArndW
Participant
Posts: 16318
Joined: Tue Nov 16, 2004 9:08 am
Location: Germany
Contact:

Post by ArndW »

Reddy - what is not working the way you would like by using the DataTypePicS9 conversion?
reddy
Premium Member
Premium Member
Posts: 168
Joined: Tue Dec 07, 2004 12:54 pm

Post 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
Post Reply