You can write your own scripts or customize the model script job steps by editing the shipment JCL models (#RJNDVRA and #RJNDVRB in the CSIQOPTN library) based on your site's requirements. These models include job steps in the remote job, to be executed before or after the job copies the package outputs to their target data sets, based on the existence of a script data set in the shipment.
To enable conditional execution, a symbol represents each script data set. The symbol is based on the last qualifier of the host data set name, prefixed by the characters ZZ (for example, &ZZCICSNEWC for the data set BST.USER12.CICSNEWC. The value of the symbol will be the remote staging data set name for the script data set.
The symbols can be checked in the package ship model control members through @IF and @IFNOT statements. Therefore, the script job steps can be conditionally generated in the remote job steps based on the existence of the script data set in the shipment as determined by the resolution of the data set symbol.
Example: Model Post-Ship Script Steps for CICS New COPY
This model code is delivered as #RJNDVRA in the CSIQOPTN library. This code sample executes a CICS New Copy after the data set is copied to the remote target. Script files will be transmitted as PDS/Library members, one for each member that created a script, and potentially many Script files.
@REM ************************************************************ @REM * THESE STEPS WILL EXECUTE AFTER THE COPY TO THE REMOTE TGT @REM ************************************************************ //* START #RJNDVRA @IF &ZZCICSNEWC //* START SCRIPT CICS NEW COPY //ASCRIPT1 EXEC PGM=<YourNewCopyUtil> //SCRIPTIN DD DISP=SHR, // DSN=&ZZCICSNEWC ... <insert your site specific JCL here...> ... //* END SCRIPT 1 @ENDIF
Example: Model Post-Ship Script Steps to Flatten a PDS into a Sequential File
This model is delivered as #RJNDVRB in the CSIQOPTN library. This code sample flattens a PDS into a sequential file. (This example includes a modified separator line.) If your processing requires a sequential input you may need to flatten the library structure using your own utility or standard IBM utilities as shown in the this sample.
@REM ************************************************************
@REM * THESE STEPS provide a sample FLATTEN process
@REM ************************************************************
@IF &ZZSCRIPTFB
//***************************************************************
//* THIS SCRIPT WILL TAKE A PDS & CREATE A FLAT (SEQUENTIAL) FILE
//* FROM ITS MEMBERS USING STANDARD IBM UTILITIES.
//* //***************************************************************
//*
//SCR010 EXEC PGM=IDCAMS * FIRST CLEAN UP TEMP MEMBERS
//SYSPRINT DD SYSOUT=*
//SYSIN DD *
DEL &ZZSCRIPTFB.P
DEL &ZZSCRIPTFB.S
SET MAXCC = 0
//*
//SCR020 EXEC PGM=IEBPTPCH * THEN PUNCH OUT ALL MEMBERS
//SYSPRINT DD SYSOUT=*
//SYSUT1 DD DISP=SHR,
// DSN=&ZZSCRIPTFB
//SYSUT2 DD DISP=(,CATLG),
// DSN=&ZZSCRIPTFB.P,
// SPACE=(CYL,(1,1),RLSE),
// UNIT=SYSDA,
// DCB=(RECFM=FBA,LRECL=81)
//SYSIN DD *
PUNCH TYPORG=PO
//*
//SCR030 EXEC PGM=SORT * USE SORT TO STRIP OFF LEADING
//SYSOUT DD SYSOUT=* * PUNCH CONTROL CHARACTERS
//SYSPRINT DD SYSOUT=* * AND REPLACE MEMBER CARDS
//SYSUDUMP DD SYSOUT=*
//REPORT1 DD SYSOUT=*
//SORTIN DD DISP=SHR,
// DSN=&ZZSCRIPTFB.P
//SORTOUT DD DSN=&ZZSCRIPTFB.S,
// DISP=(,CATLG),
// UNIT=SYSDA,
// SPACE=(CYL,(1,1)),
// DCB=(RECFM=FB,LRECL=80)
//SORTWK01 DD UNIT=DISK,SPACE=(CYL,(5,5))
//SORTWK02 DD UNIT=DISK,SPACE=(CYL,(5,5))
//SORTWK03 DD UNIT=DISK,SPACE=(CYL,(5,5))
//SYSIN DD *
SORT FIELDS=COPY
INREC IFTHEN=(WHEN=(2,13,CH,EQ,C'MEMBER NAME '),
BUILD=(C'./ ADD NAME=',15,8)),
IFTHEN=(WHEN=NONE,BUILD=(1:2,80))
//*
//* END SCRIPT 1
@ENDIF
@IFNOT &ZZSCRIPTFB
//* START SCRIPT - THIS STEP WILL RUN IF THERE IS NO SCRIPT FILE
//BSCRIPT1 EXEC PGM=IEFBR14,COND=((0,LE),ONLY) NO SCRIPT STEP
//* END SCRIPT 1
@ENDIF
|
Copyright © 2014 CA.
All rights reserved.
|
|