View previous topic :: View next topic |
Author |
Message |
kpmdreamz Beginner
Joined: 06 Apr 2007 Posts: 8 Topics: 2
|
Posted: Mon May 21, 2007 9:42 am Post subject: need to convert PD field in input file to CH filed in output |
|
|
hi all,
i have an input file with a field of 9(13) comp 3. (occupying 7 bytes)
I need to move it to an output file which defines the same field as
PIC X(13).
How do i do it.
Currently when i was using OUTREC FIELDS=(1,7,5X) it moves the values into the first 7 character of output.
for example 9913598251505 is moved as
X'9913598251505F404040404000' |
|
Back to top |
|
 |
kolusu Site Admin

Joined: 26 Nov 2002 Posts: 12378 Topics: 75 Location: San Jose
|
Posted: Mon May 21, 2007 9:44 am Post subject: |
|
|
kpmdreamz,
Code: |
OUTREC FIELDS=(1,7,PD,EDIT=(TTTTTTTTTTTTT))
|
Kolusu _________________ Kolusu
www.linkedin.com/in/kolusu |
|
Back to top |
|
 |
Nic Clouston Advanced
Joined: 01 Feb 2007 Posts: 1075 Topics: 7 Location: At Home
|
Posted: Mon May 21, 2007 9:46 am Post subject: |
|
|
Well, if you are trying to use SORT then this should be in the Utilities. If a progam then in the programming Languages section, if a Rexx program then the TSO section but NO WAY in JCL.
In sort you use an edit mask I believe - I'm a bit hazy on that but I think that is the place to look in the manual. _________________ Utility and Program control cards are NOT, repeat NOT, JCL. |
|
Back to top |
|
 |
kpmdreamz Beginner
Joined: 06 Apr 2007 Posts: 8 Topics: 2
|
Posted: Mon May 21, 2007 10:21 am Post subject: |
|
|
Thanks kolusu,
it works but i just don't know what it is
i also tried
OUTREC FIELDS=(1,7,PD,TO=ZD)
which gave the required result. |
|
Back to top |
|
 |
kolusu Site Admin

Joined: 26 Nov 2002 Posts: 12378 Topics: 75 Location: San Jose
|
Posted: Mon May 21, 2007 10:45 am Post subject: |
|
|
Quote: |
Thanks kolusu,
it works but i just don't know what it is
i also tried
OUTREC FIELDS=(1,7,PD,TO=ZD)
which gave the required result.
|
kpmdreamz,
I just used an edit mask to expand the packed decimal field. Check this link for various Edit Masks
PD to ZD also works but your output field will have sign overpunch on the last byte.
Kolusu _________________ Kolusu
www.linkedin.com/in/kolusu |
|
Back to top |
|
 |
kpmdreamz Beginner
Joined: 06 Apr 2007 Posts: 8 Topics: 2
|
Posted: Tue May 22, 2007 12:36 am Post subject: |
|
|
thanks for the info kolusu. |
|
Back to top |
|
 |
|
|