Load JCL
EDIT JOHN.SPFTEMP1.CNTL Columns 00001 00072
Command ===> change '<unresolved>' 'CICSPROD.DAILY.CMF(0)' Scroll ===> CSR_
****** ***************************** Top of Data ******************************
000001 //CICSPA JOB ,NOTIFY=&SYSUID
000002 //* CICS PA V5R3 HDB LOAD JCL
000003 //CICSPA EXEC PGM=CPAMAIN
000004 //STEPLIB DD DSN=CPA.V5R3M0.SCPALINK,DISP=SHR
000005 //CPAHDBRG DD DSN=CICSPROD.CICSPA.XYX.REPOSTRY,DISP=SHR
000006 //SYSPRINT DD SYSOUT=*
000007 //* SMF Input Files
000008 //* SMF Files that follow have unresolved DSNs
000009 //* SMF File for System=CICSPROD
000010 //SMFIN901 DD DSN=<unresolved>,DISP=SHR
000011 //* Command Input
000012 //SYSIN DD *
000013 * HDB=CICSWEEK
000014 * Description=Weekly CICS Transactions
000015 CICSPA SMFSTART(0,09:00:00.00),
000016 SMFSTOP(0,16:30:00.00)
000017 * HDB Load for System=CICSPROD
000018 CICSPA IN(SMFIN901),
000019 APPLID(CICSPROD),
000020 LINECNT(60),
000021 FORMAT(':','/'),
000022 HDB(OUTPUT(HDBL0001),LOAD(CICSWEEK))
000023 /*
The SMF file data set name for system CICSPROD is unresolved. This indicates that the System Definition for CICSPROD does not have SMF files specified. Substitute the required SMF file data set name into the JCL.
HDB(OUTPUT(HDBL0001),LOAD(CICSWEEK))
Enter SUBmit in
the command line to submit the job to run the load.If you selected the Load DB2® Table option, then the JCL contains additional statements to export the data to DB2 after loading the HDB. If successful, the HDB load step writes the list of created HDB containers to a PDS member. After the HDB load step, an IEBGENER step copies the contents of the PDS member in-stream to the DB2 load utility DSNUTILB skeleton JCL. The following figure shows an example of this JCL.
//CICSPAHD JOB (ACCOUNT),'CICS PA HDB LOAD'
//* Delete HDB Container Data Set
//DELETE EXEC PGM=IDCAMS
//SYSPRINT DD SYSOUT=*
//SYSIN DD *
DELETE CICSPA.HDB.CONTDSN 1
SET MAXCC=0
/*
//* CICSPA V5R1 Report JCL
//CICSPA EXEC PGM=CPAMAIN
//STEPLIB DD DISP=SHR,DSN=CPA.SCPALINK
//CPAHDBRG DD DISP=SHR,DSN=CPA.XYX.REPOSTRY
//CPAHDBCD DD DSN=CICSPA.HDB.CONTDSN, 2
// DISP=(NEW,CATLG),SPACE=(CYL,(1,1,10))
//SYSPRINT DD SYSOUT=*
//* SMF Input Files
//SMFIN001 DD DISP=SHR,DSN=PRODA.SMF.G4817V00
//* Command Input
//SYSIN DD *
* REPORT SET =HDBXDEMO
* Description=CICS PA Report Set
CICSPA SMFSTART(2012/12/12,00:00:00.00),
SMFSTOP(2012/12/12,22:00:00.00)
* REPORTS FOR SYSTEM=CICSPROD
* DESCRIPTION=HDB EXPORT DEMO
CICSPA IN(SMFIN001),
APPLID(CICSPROD),
LINECNT(60),
FORMAT(':','/'),
PRECISION(4),
HDB(OUTPUT(HDBL0001),LOAD(DAILYPER))
/*
//*
//CPADDCPY EXEC PGM=IEBGENER,COND=(8,LT,CICSPA) 3
//SYSPRINT DD SYSOUT=*
//SYSIN DD DUMMY
//SYSUT2 DD SYSOUT=(*,INTRDR)
//SYSUT1 DD DATA,DLM=$$
//CICSPAHD JOB (ACCOUNT),'CICSPA HDB LOAD'
//DSNUPROC EXEC PGM=DSNUTILB,REGION=0M,
// PARM='DB2P'
//STEPLIB DD DISP=SHR,DSN=DB2.PROD.SDSNLOAD
// DD DISP=SHR,DSN=DB2.PROD.SDSNEXIT
//SYSPRINT DD SYSOUT=*
//UTPRINT DD SYSOUT=*
//SYSUDUMP DD SYSOUT=*
//SYSUT1 DD UNIT=SYSDA,SPACE=(4000,(20,20),,,ROUND)
//SORTOUT DD UNIT=SYSDA,SPACE=(4000,(20,20),,,ROUND)
//SYSIN DD *
LOAD DATA RESUME YES
INTO TABLE CPADB.CPA_DAILYPER (
START_DATE POSITION(1) DATE EXTERNAL(10),
.
.
.
)
/*
$$
// DD DISP=SHR,DSN=CICSPA.HDB.CONTDSN(DAILYPER)
- 1
- To ensure integrity of the data loaded into DB2, the data set to which the HDB Load writes HDB container data set names is deleted at the start of every HDB Load job that includes the DB2 table load.
- 2
- The HDB Load step writes the list of created HDB container data
set names (formatted as DD cards) to a member in the partitioned data
set '&SYSUID.CICSPA.HDB.CONTDSN', where &SYSUID is
the user ID of the user generating the JCL and the member name is
the name of the HDB being loaded. For performance alert
data that is loaded for a List HDB, the HDB container data set names
are written to a member in the partitioned data set '&SYSUID.CICSPA.HPA.CONTDSN'.
If the HDB Load fails to create containers (due to an error, or because no records were selected), then this PDS member will contain the single DD card:
//SYSREC DD DUMMY
This card is used as input to the DB2 Load Utility. If the DB2 table load option REPLACE is selected, then the result is an empty DB2 table. This DUMMY card is required to avoid the IEBGENER job step error failing the whole job. This is particularly important in cases where the job loads multiple DB2 tables.
- 3
- The IEBGENER job step inserts the contents of the PDS member (generated
by the earlier HDB Load step) in-stream, for use by the DB2 Load Utility (DSNUTILB).
The IEBGENER job step will not be submitted if the HDB Load step (ddname CICSPA) terminates with a return code greater than 8. This ensures that DB2 table loads are submitted in cases where one or more HDB Loads were successful while others were not. A return code greater than 8 indicates a serious error that is likely to affect the whole job.