View previous topic :: View next topic
|
Author |
Message |
Payal Jain
New User
Joined: 19 Jul 2006 Posts: 2
|
|
|
|
I want to convert the input file of 60 length into file of 45 length using SORT.
1. Conversion of PIC X(9) to S9(9) USAGE COMP-3.
2. Eliminate the spaces(Filler)
3 Convert 10 characters of Date field to 8 Characters, eliminating '-'.
Input File:
field -1 PIC X(09)
FILLER X(01)
field -2 PIC X(09)
FILLER X(01)
field -3 PIC X(10)
FILLER X(01)
field -4 PIC X(07)
FILLER X(01)
field -5 PIC X(10)
FILLER X(01)
field -6 PIC X(10)
Output File:
field -1 PIC S9(9) USAGE COMP-3
field -2 PIC S9(9) USAGE COMP-3
field -3 PIC X(10)
field -4 PIC X(07)
field -5 PIC X(10)
field -6 PIC X(08) |
|
Back to top |
|
|
Frank Yaeger
DFSORT Developer
Joined: 15 Feb 2005 Posts: 7129 Location: San Jose, CA
|
|
|
|
Here's a DFSORT job that will do what you asked for:
Code: |
//S1 EXEC PGM=ICEMAN
//SYSOUT DD SYSOUT=*
//SORTIN DD DSN=... input file (FB/60)
//SORTOUT DD DSN=... output file (FB/45)
//SYSIN DD *
OPTION COPY
OUTREC FIELDS=(1,9,ZD,TO=PD,LENGTH=5,
11,9,ZD,TO=PD,LENGTH=5,
21,10,
32,7,
40,10,
51,10,UFF,M11,LENGTH=8)
/*
|
|
|
Back to top |
|
|
Payal Jain
New User
Joined: 19 Jul 2006 Posts: 2
|
|
|
|
Thanks a lot Frank, It worked.
Last part i.e. UFF,M11 is not working and giving abend with syntax error. But i managed to do it directly.
thanks
Payal. |
|
Back to top |
|
|
Frank Yaeger
DFSORT Developer
Joined: 15 Feb 2005 Posts: 7129 Location: San Jose, CA
|
|
|
|
In order to use UFF, you need z/OS DFSORT V1R5 PTF UQ95214 or DFSORT R14 PTF UQ95213. This PTF has been available since Dec, 2004. |
|
Back to top |
|
|
|