Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

convert from ch to zd

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL
View previous topic :: :: View next topic  
Author Message
bhaskar_kanteti

Active User


Joined: 01 Feb 2007
Posts: 120
Location: USA

PostPosted: Mon Nov 24, 2008 6:53 pm    Post subject: convert from ch to zd
Reply with quote

Hi,

I want to convert from CH to ZD format.

Input has the field of type X(20).
This should be converted to 9(20).

Suppose if the input X(20) has value '01111101234567'
The output 9(20) should have the value as '01111101234567000000'

I tried to convert as follows:
Code:

OUTREC FIELDS=(1:1,20,UFF,TO=ZD,LENGTH=20)

But the value is moved to 9(20) as '00000001111101234567'

Suggest me what to be done.
Back to top
View user's profile Send private message

expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8593
Location: Back in jolly old England

PostPosted: Mon Nov 24, 2008 7:38 pm    Post subject:
Reply with quote

To me it seems logical that as a numeric the additional zeros would go to the front of the field to preserve that integrity of the data.

Going from '01111101234567' to '01111101234567000000' implies a multiplication operation has been performed. Are you sure that your requirement is correct ?
Back to top
View user's profile Send private message
bhaskar_kanteti

Active User


Joined: 01 Feb 2007
Posts: 120
Location: USA

PostPosted: Mon Nov 24, 2008 8:07 pm    Post subject: Reply to: convert from ch to zd
Reply with quote

Hi expat,

Actually i want to move from X(20) to the below fields
FLD1 9(6)
FLD2 9(2)
FLD3 9(8)
FLD4 9(2)
FLD5 9(2)

That why i gave as 9(20).
The value in input X(20) can contain 14 digits or 16 digits or 18 digits.
It may vary for each record.
So i treid to convert the entire X(20) to 9(20).
Back to top
View user's profile Send private message
Frank Yaeger

DFSORT Moderator


Joined: 15 Feb 2005
Posts: 7130
Location: San Jose, CA

PostPosted: Mon Nov 24, 2008 10:32 pm    Post subject:
Reply with quote

You really haven't made it clear what you want to do.

You say you have a X(20) field (20 characters) that can have 14, 16 or 18 digits. Then you say you want to split that up into different ZD fields of 6, 2, 8, 2 and 2 digits which is 20 digits in total. But you haven't given any indication of how you want to map the 14, 16 or 18 digits of the input field to the 20 digits of the output field.

In your original example, you had 14 digits and added 6 0's on the right, but didn't explain why. Do you just want to fill out the digits with 0s on the right to get 20 characters? Or do you want to do something else? If something else, explain in detail.
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Convert current to hex value gopurs DFSORT/ICETOOL 4 Wed Feb 15, 2017 5:40 am
No new posts How to convert the VBM file to VB or... Sulabh Agrawal JCL & VSAM 4 Fri Nov 18, 2016 1:04 pm
No new posts Convert +9999999999999.99 to S9(12)V9(3) vnktrrd DFSORT/ICETOOL 8 Thu Nov 17, 2016 8:15 pm
This topic is locked: you cannot edit posts or make replies. Db2 SQL query to convert rows into co... subratarec DB2 5 Thu Nov 17, 2016 4:51 pm
No new posts convert PD to ZD ram_vizag DFSORT/ICETOOL 5 Sat Nov 05, 2016 3:06 am


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us