Quote: |
You could use OUTFIL with VLFILL in one pass to pad out the records and then operate against those padded records in a second pass, but you would end up with padded records. If that's a problem, you could use VLFILL in the first pass with a unique padding character and VLTRIM in the second pass to remove that unique padding character. |
Code: |
//SYSIN DD * SORT FIELDS=COPY INREC FIELDS=(1,5,6:63,1,CHANGE=(1,C'*',C'1'),NOMATCH=(C'0'), SEQNUM,8,ZD,6) OUTREC FIELDS=(1,5, 6,1,ZD,ADD,7,8,ZD,EDIT=(TTTTTTTT),15) /* |
Code: |
//S1 EXEC PGM=ICETOOL //TOOLMSG DD SYSOUT=* //DFSMSG DD SYSOUT=* //IN DD DSN=... input file //T1 DD DSN=&&T1,UNIT=SYSDA,SPACE=(CYL,(5,5)),DISP=(,PASS) //OUT DD DSN=... output file //TOOLIN DD * COPY FROM(IN) USING(CTL1) COPY FROM(T1) USING(CTL2) //CTL1CNTL DD * OPTION COPY OUTFIL FNAMES=T1,OUTREC=(1,63,64),VLFILL=X'FF' /* //CTL2CNTL DD * SORT FIELDS=COPY INREC FIELDS=(1,5,6:63,1,CHANGE=(1,C'*',C'1'),NOMATCH=(C'0'), SEQNUM,8,ZD,6) OUTFIL FNAMES=OUT,OUTREC=(1,5, 6,1,ZD,ADD,7,8,ZD,EDIT=(TTTTTTTT),15),VLTRIM=X'FF' /* |
Quote: |
as per your question of what character you can use I presume 'XX' is OK as X'FF' is less desirable |
Code: |
//SYSIN DD * *** CONSTANT CONTROL CARDS ***
OPTION COPY,VLSHRT INCLUDE COND=(62,1,CH,EQ,X'5C') OUTFIL FNAMES=OUT,VTOF,OUTREC=(4,133,4X) /* END OF INPUT |
Code: |
//TOOLIN DD *
COPY FROM(IN) USING(CTL1) /* //CTL1CNTL DD * SORT FIELDS=COPY INCLUDE COND=(63,1,CH,EQ,'*') OUTFIL FNAMES=OUT,OUTREC=(1,63),VTOF /* |
Code: |
INCLUDE COND=(63,1,CH,EQ,C'*') |
Code: |
Also Outrec cannot reference RDW bytes of VBA and hence need to be changed to OUTREC=(5,63) |
Code: |
//TEMP05 EXEC PGM=SORT,
// COND=(0,NE) //* //SORTIN DD DSN=JAYA.SYSOUT.TEST,DISP=SHR //* //SORTOUT DD DSN=JAYA.SYSOUT.TEST.VBA, // DISP=(NEW,CATLG,DELETE), // UNIT=SYSDA, // SPACE=(TRK,(250,50),RLSE), // DCB=(RECFM=VBA,BLKSIZE=0) //* **** SORTED JE FILE **** //* //SYSPRINT DD SYSOUT=* //SYSOUT DD SYSOUT=* //ABENDAID DD SYSOUT=* //SYSUDUMP DD SYSOUT=* //* //SYSIN DD * *** CONSTANT CONTROL CARDS *** OPTION COPY,VLSHRT INCLUDE COND=(62,1,CH,EQ,X'5C') /* END OF INPUT |
Quote: |
OUTFIL data sets used for reports must have or will be given ANSI control character format ('A' as in, for example, RECFM=FBA or RECFM=VBA), and must allow an extra byte in the LRECL for the carriage control character that DFSORT will add to each report and data record. DFSORT uses these carriage control characters to control page ejects and the placement of the lines in your report according to your specifications. DFSORT uses appropriate carriage controls (for example, C'-' for triple space) in header and trailer records when possible, to reduce the number of report records written. DFSORT always uses the single space carriage control (C' ') in data records. Although these carriage control characters may not be shown when you view an OUTFIL data set (depending upon how you view it), they will be used if you print the report.
REMOVECC can be used to remove the ANSI control characters from a report. In this case, an 'A' is not added to or required for the RECFM and an extra byte is not added to or required for the LRECL. |
output generated using printer-friendly topic mod. All times are GMT - 5 Hours