Extract and output only selected segments


This scenario extracts and writes only two segment types to the output extract file.

JCL to extract and output only selected segments

01 //PFPMAIN  EXEC PGM=PFPMAIN,REGION=0M
02 //STEPLIB  DD DISP=SHR,DSN=BMC.PFP.LOAD
03 //         DD DISP=SHR,DSN=IMSVS.RESLIB
04 //         DD DISP=SHR,DSN=IMSVS.DFSMDA
05 //         DD DISP=SHR,DSN=BMC.DPK.LOAD
06 //$$DPICDS DD DISP=SHR,DSN=PFP.DPK.DPICDS
07 //$$DPITBL DD DISP=SHR,DSN=PFP.DPK.DPITBL
08 //IMSACB   DD DISP=SHR,DSN=IMSVS.ACBLIB
09 //PFPSAMP1 DD DISP=OLD,DSN=BMCPFP.PFPSAMP.PFPSAMP1
10 //PFPSAMP2 DD DISP=OLD,DSN=BMCPFP.PFPSAMP.PFPSAMP2
11 //PFPSAMP3 DD DISP=OLD,DSN=BMCPFP.PFPSAMP.PFPSAMP3
12 //EXTFILE1 DD DSN=BMC.PFP.EXTFILE1,
13 //         DISP=(,CATLG,DELETE),
14 //         UNIT=DISK,
15 //         SPACE=(CYL,(200,8),RLSE)
16 //EXTFILE2 DD DSN=BMC.PFP.EXTFILE2,
17 //         DISP=(,CATLG,DELETE),
18 //         UNIT=DISK,
19 //         SPACE=(CYL,(200,8),RLSE)
20 //PFPSYSIN DD   *
21   EXTRACT DBD=PFPSAMP,IAREA=ALL,
22       
EXTRACT_FORMAT=EXTRACT,
23       
EXPAND=YES
24     
EXCLUDE
SEGMENT=SEGB,
25       
WHERE=(SEGA.SEGAKEY LT C'19980101')
26     
OUTPUT SEGMENT=SEGA
27     OUTPUT SEGMENT=SEGB
28     
OFILECTL OAREA=(PFPSAMP1,PFPSAMP2),DDNAME=EXTFILE1
29     OFILECTL OAREA=PFPSAMP3,DDNAME=EXTFILE2
 /*

Line no.

Comments

01-04

EXEC and STEPLIB statements for Fast Path/EP offline execution.

05-07

DD statements that define data sets for the BMC DATA PACKER/IMS product. These data sets are required because expansion of data was requested by the EXPAND=YES keyword, and because of data manipulation for compressed fields.

08

IMSACB DD statement used for database processing.

09-11

Input area data sets.

12-15

28

The extracted output for areas PFPSAMP1 and PFPSAMP2 is written to DD name EXTFILE1.

16-19

29

The extracted output for area PFPSAMP3 is written to DD name EXTFILE2.

20

PFPSYSIN DD for Fast Path/EP control statements.

21

Defines DEDB name for EXTRACT process. Data is extracted from all areas.

22

Data is extracted in the standard default format (EXTRACT_FORMAT=EXTRACT). The format of the records will use the layout specified in tables in the Fast Path/EP Series Reference Manual documentation.

23

The compressed segments are expanded before being written to the output file.

24-25

SEGB segments are excluded from selection if the SEGAKEY for parent segment SEGA contains a date value less than ‘19980101’.

26-27

The resulting output files contain all SEGA segments and only SEGB segments that were not excluded by the EXCLUDE statement.

28

Output for areas PFPSAMP1 and PFPSAMP2 is written to the data set specified by the EXTFILE1 DD statement.

29

Output for area PFPSAMP3 is written to the data set specified by the EXTFILE2 DD statement.

 

Tip: For faster searching, add an asterisk to the end of your partial query. Example: cert*