View previous topic :: View next topic
Author
Message
cpuhawg Active User Joined: 14 Jun 2006Posts: 331 Location: Jacksonville, FL
I have a job step that reads a single variable record and writes out a reformatted fixed record.
Code:
//S6SORT EXEC PGM=DFSORT
//SORTIN DD DISP=SHR,DSN=Variable.input.file
//SORTOUT DD DSN=Fixed output.file,
// UNIT=SYSDA,DISP=(NEW,CATLG),
// RECFM=FB,LRECL=80,BLKSIZE=27920,
// SPACE=(TRK,(60,15),RLSE)
//SYSOUT DD SYSOUT=*
//SYSIN DD *
OPTION NOVLSCMP,VLSHRT
SORT FIELDS=COPY
INCLUDE COND=((5,4,CH,EQ,C'0500'),AND,
(257,8,CH,NE,C'$IOA '),AND,
(257,8,CH,NE,C'TCICSTRN'))
OUTFIL OUTREC=(1:C'DATASET ',10:10,44,54:1C' ',55:1C' *UACC* ',
55:1C' *UACC* ',63:1C' A ',66:133,8,74:7C' '),CONVERT
/*
The above JCL runs fine.
I would like to know how to read a single variable input record and write two fixed output records to the same SORTOUT file. The 1st fixed output record is the OUTREC= record define above and the 2nd fixed output record should look like:
Code:
OUTFIL OUTREC=((1:C'DATASET ',10:10,44,54:1C' ',
55:1C' *LPAR* ',63:1C' ABCFLNRTUW',74:7C' '),CONVERT
Is this possible in DFSORT?
Back to top
Frank Yaeger DFSORT Developer Joined: 15 Feb 2005Posts: 7129 Location: San Jose, CA
You can replace your OUTFIL statement with this one (I corrected a few syntax errors):
Code:
OUTFIL CONVERT,
BUILD=(1:C'DATASET ',10:10,44,54:1C' ',55:1C' *UACC* ',
63:1C' A ',66:133,8,74:7C' ',/,
1:C'DATASET ',10:10,44,54:1C' ',
55:1C' *LPAR* ',63:1C' ABCFLNRTUW',76:5C' ')
The / says to start a new record.
Back to top
cpuhawg Active User Joined: 14 Jun 2006Posts: 331 Location: Jacksonville, FL
Outstanding Frank!!!
Worked like a charm.
I searched for BUILD= in the PDF for the DFSORT Application Programming Guide and didn't get a hit, so maybe I have an outdated manual.
Have a great weekend.
Back to top
CICS Guy Senior Member Joined: 18 Jul 2007Posts: 2146 Location: At my coffee table
Frank Yaeger wrote:
The / says to start a new record.
Neat, I was thinking it was only good in trailer type print functions.....
Back to top
Frank Yaeger DFSORT Developer Joined: 15 Feb 2005Posts: 7129 Location: San Jose, CA
Quote:
I searched for BUILD= in the PDF for the DFSORT Application Programming Guide and didn't get a hit, so maybe I have an outdated manual.
Yes, you must. You can always access all of the latest DFSORT books online from:
Use [URL] BBCode for External Links
Back to top
Please enable JavaScript!