Customize unload output using expressions
JCL to customize unload output using expressions
02 //STEPLIB DD DISP=SHR,DSN=BMC.PFP.LOAD
03 // DD DISP=SHR,DSN=IMSVS.RESLIB
04 // DD DISP=SHR,DSN=IMSVS.DFSMDA
05 //IMSACB DD DISP=SHR,DSN=IMSVS.ACBLIB
06 //NEWACB DD DISP=SHR,DSN=IMSVS.ACBLIB.NEW
07 //ULD1CPY1 DD DSN=PFP.PFPSAMP.ULD1CPY1,
08 // DISP=(,CATLG,DELETE),UNIT=SYSDA,
09 // SPACE=(CYL,(325,9),RLSE)
10 //PFPSYSIN DD *
11 UNLOAD DBD=PFPSAMP,IAREA=ALL
12 INCLUDE SEGMENT=SEGA,
13 WHERE=(SEGAKEY EQ C'4563' OR SEGAKEY EQ C'4598')
14 EXCLUDE SEGMENT=SEGC,WHERE=(10:2C < C'31')
15 OUTPUT SEGMENT=SEGB,FIELDS=(3:5C,SEGBFLD2,SEGBFLD5,25:*)
16 OUTPUT SEGMENT=SEGD,WHERE=(4:1C EQ C'B' AND 10:1C EQ C'R'),
17 FIELDS=(3:8C,:2X := AREA_NUMBER,13:*)
18 OFILECTL OAREA=ALL,DDNAME=ULD1CPY1
/*
Descriptive text for JCL to customize unload output using expressions
Line no. | Comments |
|---|---|
01-04 | EXEC and STEPLIB DD statements for Fast Path/EP offline execution. |
05 | The DBD from the IMSACB DD statement is used to define the input areas. |
06 | The DBD from the NEWACB DD statement is used to define the output unload file. |
07-09 | All output areas are written to one unload file, which is specified by the ULD1CPY1 DD statement. |
10 | PFPSYSIN DD for Fast Path/EP control statements. |
11 | Defines the DBD name for the unload process. All areas are unloaded. |
12-13 | Limit the output file by selecting only SEGA root segments with key values ‘4563’ or ‘4598’ and their dependents. Elements of this expression are:
|
14 | Exclude from selection all SEGC segments that have a value less than ‘31’ starting in column 10. Elements of this expression are:
|
15-17 | OUTPUT subcommands identify the modified segments to be output. All other selected database segments are written to the output file, but are not changed. |
15 | With the FIELDS keyword specified, the data for SEGB will be altered when written to the output file. Copy the first 5 bytes starting at column 3, then the search fields SEGBFLD2 and SEGBFLD5, and then write the remainder of the data starting at column 25 of the input to the end of the segment (as indicated by *). Elements of this expression are:
|
16 | Segment SEGD will be written to the output file only when the value at column 4 is ‘B’ and the value at column 10 is ‘R’. Elements of this expression are:
|
17 | With the FIELDS keyword specified, the data for SEGD will be altered when written to the output file. Copy the first 8 bytes starting at column 3, assign the area number to the next two bytes, and then write the remainder of the data starting at column 13 of the input to the end of the segment (as indicated by *). Elements of this expression are:
|
18 | All areas are written to a single unload output file using the provided DD name. |