In examples that specify POS= or OFFSET=, these values are always relative to byte (0) of the data portion of the record not the RDW keyword prefix. The RDW keyword implies that the content at OFFSET presumes that the displacement value includes 4 bytes for a RDW (that is, it is relative to the RDW starting point). The following example illustrates the commands necessary to find and dump all the SMF type 30, subtype 4 records with a jobname of DSTJSOAC:
//JOBCARD JOB //* //STEP001 EXEC PGM=JSI,PARM='JSSAU400' //STEPLIB DD DSN=CAI.JARS.CAI.CAJRLOAD, // DISP=SHR //* //CAIJFPR DD SYSOUT=* //* //CAIJFSN DD SYSOUT=* //* //CAIIN DD DISP=SHR, // DSN=SYSPROG.SMFSAVXA.DATA(-1) //* //CAIJFIN DD * * INPUT=CAIIN FIND=X'1E',EQ,POS=1,LOGIC=AND FIND=X'0004',EQ,POS=0,OFFSET=20,OFFSIZ=4,RDW,LOGIC=AND FIND=C'DSTJSOAC',EQ,POS=0,OFFSET=28,OFFSIZ=4,RDW DUMP=ON * /* //
The following illustrates the commands necessary to find and dump all the SMF type 30, subtype 4 records with a jobname of DSTJSOAC, create an output file, and change the jobname field to DSTJS001:
//JOBCARD JOB //* //STEP001 EXEC PGM=JSI,PARM='JSSAU400' //STEPLIB DD DSN=CAI.JARS.CAI.CAJRLOAD, // DISP=SHR //* //CAIJFPR DD SYSOUT=* //* //CAIJFSN DD SYSOUT=* //* //CAIIN DD DISP=SHR, // DSN=SYSPROG.SMFSAVXA.DATA(-1) //* //CAIOUT DD DISP=(,CATLG), // DSN=CAI.TEST.SMF,UNIT=SYSDA,SPACE=(TRK,(10,10)) //* //CAIJFIN DD * * INPUT=CAIIN FIND=X'1E',EQ,POS=1,LOGIC=AND FIND=X'0004',EQ,POS=0,OFFSET=20,OFFSIZ=4,RDW,LOGIC=AND FIND=C'DSTJSOAC',EQ,POS=0,OFFSET=28,OFFSIZ=4,RDW CHANGE=C'DSTJS001',POS=0,OFFSET=28,OFFSIZ=4,RDW DUMP=ON OUTPUT=CAIOUT * /* //
In the previous two examples, only those records which have met the FIND criteria are copied to the output file. To have the output file comprised of all the records in the input file, add the COPY keyword to the INPUT command:
INPUT=CAIIN,COPY
The following illustrates the commands necessary for combining two input files to create one output file, and dumping every 50th record in the second input file:
//JOBCARD JOB //* //STEP001 EXEC PGM=JSI,PARM='JSSAU400' //STEPLIB DD DSN=CAI.JARS.CAI.CAJRLOAD, // DISP=SHR //* //CAIJFPR DD SYSOUT=* //* //CAIJFSN DD SYSOUT=* //* //INPUT1 DD DISP=SHR, // DSN=VMDATA.DEC92 //* //INPUT2 DD DISP=SHR, // DSN=VMDATA.JAN93 //* //VMOUT DD DISP=(,KEEP), // DSN=CAI.VMDATA.TODATE,UNIT=3400-6,LABEL=(1,SL), // VOL=SER=VMTP01 //* //CAIJFIN DD * * INPUT=INPUT1 INPUT=INPUT2 DUMP=ON,SKIP=50,FILE=2 OUTPUT=VMOUT * /* //
| Copyright © 2011 CA. All rights reserved. | Tell Technical Publications how we can improve this information |