View previous topic :: View next topic
|
Author |
Message |
T.O.
New User
Joined: 27 Apr 2006 Posts: 23
|
|
|
|
I have a dataset that is 133 in length. I want to copy to an 80 byte record and have it wrap around. Any ideas how to do this ?l |
|
Back to top |
|
|
superk
Global Moderator
Joined: 26 Apr 2004 Posts: 4652 Location: Raleigh, NC, USA
|
|
|
|
Code: |
//*
//SORTSTEP EXEC PGM=SORT
//SORTIN DD DSN=<133-BYTE DATASET>
//SORTOUT DD DSN=<80-BYTE DATASET>,DISP=(,CATLG,DELETE),...
//SYSOUT DD SYSOUT=*
//SYSIN DD *
OPTION COPY
OUTFIL OUTREC=(1,80,/,81,53,80:X)
/*
//*
|
|
|
Back to top |
|
|
T.O.
New User
Joined: 27 Apr 2006 Posts: 23
|
|
|
|
Terrific !!
Thanks ! |
|
Back to top |
|
|
Frank Yaeger
DFSORT Developer
Joined: 15 Feb 2005 Posts: 7129 Location: San Jose, CA
|
|
|
|
For the record, you don't need to specify 80:X in the second line. The 1,80 in the first line will set the record length to 80 and the second line will be padded with blanks at the end automatically. So you can use this DFSORT OUTFIL statement:
Code: |
OUTFIL OUTREC=(1,80,/,81,53)
|
|
|
Back to top |
|
|
superk
Global Moderator
Joined: 26 Apr 2004 Posts: 4652 Location: Raleigh, NC, USA
|
|
|
|
Thanks for the tip. I kind of thought that's what would happen. |
|
Back to top |
|
|
|