JCL examples for FABHFSU PSF mode
To unload a multivolume IMS database in PSF mode, you can use the JCL jobs shown in the following figures.
In this example, three individual parallel scan phases are utilized to unload an HDAM database. In each phase, FABHFSU scans and unloads only a predefined portion of the database controlled by a scan control data set.
Step 1 gets a primary data set extent information of the database. Based on the information, step 2 creates a scan control data set to define scan parameters and the number of parallel scan phases. Step 4 generates a set of summarized statistics and concatenation sequence of the output data sets unloaded by each parallel scan phase. Step 4 creates two data sets that contain "Header record" and "Trailer record" required by the IMS HD Reorganization Reload utility.
Step 1: Example of FABHPSFM
The TESTDB DD statement identifies the primary data set of the DBD specified by the MAP control statement in the CARDIN DD statement. The extent information of the primary data set is reported to SYSOUT class A defined by the PRNTOUT DD statement. This information helps to determine the phase limit definition in step 2.
Step 2: Example of FABHPSFC
The CNTLDD DD statement identifies the scan control data set created by this job step.
The CARDIN DBD control statement specifies the DBD name of the database.
The CARDIN CTL control statement defines a parallel scan name (SCANCNTL) for use in getting
access to the scan control data set; defines the Julian date as the last day of 2000; and sets the
number of parallel scan phases to 03.
Y in column 22 specifies that the data set
names match the naming standard. The beginning position of the parallel scan name in the data set is
08 in columns 23–24.
Y in column 25 specifies that the header record is
written to the separate output data set in step 4.
Two CARDIN NPT control statements define the scan limit of each parallel scan phases. The first phase scans the database from the beginning of the database to the relative CI number 1000. The second phase scans the database from the relative CI number 1001 to the number 4000, and the third phase scans it from the number 4001 to the end of the database.
The CARDIN PSB control statement specifies the name of the DD statement (OUTDATA) that defines the data set to be created.
Steps 3A, 3B, 3C: Example of FABHFSU
The CNTLDD DD statement identifies the scan control data set created by FABHPSFC in a previous job step.
The CARDIN PSC control statement specifies that there are three expected scan phases. A portion of the database with the dbdname TESTDB is unloaded in this scan phase. The scan control data set created by FABHPSFC is named SCANCNTL.
The OUTDATA DD statement specifies a data set on which this portion of the IMS database is unloaded.
Two other job steps in PSF mode would be required to complete the unloading of this database. The JCL for the job steps is the same, except for modifying the PSC control statement and the ddname DD (OUTDATA) statement to specify parameters required for phase 2 and phase 3.
Step 4: Example of FABHPSFS
The XHTDATA DD statement defines a data set that contains the header record of the unloaded data sets. The name of this DD statement must begin with 'XH'.
The OUTDATA DD statement defines a data set that contains the trailer record of the unloaded data sets. The name of this DD statement (OUTDATA) must be equal to ddname1 of CARDIN PSB control statement in step 2.
The CNTLDD DD statement identifies the scan control data set. The CARDIN SUM control statement specifies the parallel scan name (SCANCNTL) to access the scan control data set.
When you reload the unloaded database data sets with the IMS HD Reorganization Reload utility or an equivalent program, you must specify the concatenation of the header data set, unloaded data sets, and trailer data set on the DFSUINPT DD statement. The sequence of the concatenation is reported in the PRNTOUT data set of step 4. The following is an example to specify DD statements:
//DFSUINPT DD DSN=UNLOAD.SCANCNTL.UL01.HEADER,DISP=OLD DD DSN=UNLOAD.SCANCNTL.UL01.PHASE01,DISP=OLD DD DSN=UNLOAD.SCANCNTL.UL01.PHASE02,DISP=OLD DD DSN=UNLOAD.SCANCNTL.UL01.PHASE03,DISP=OLD DD DSN=UNLOAD.SCANCNTL.UL01.TRAILER,DISP=OLD