IMS Commands Entered from a Batch Job


Option 5.2 (Edit Job that Allows Commands to be Entered from Batch) can be used to create a job that will enter IMS commands in batch.

The following is an example of a job issuing IMS commands in a batch job that affects resources in Lsys DBT2:

//LOGONALL EXEC PGM=DFSRRC00,REGION=2048K,
// PARM='BMP,COPEBCMD,COPEPSB0,,,,,,,,,,,IFDT'
//STEPLIB DD DSN=IM.COPE.LOAD,DISP=SHR
// DD DSN=IMS151A.SDFSRESL,DISP=SHR
//COPEBSYS DD DISP=NEW,UNIT=SYSDA,DSN=&&DBT2
//SYSPRINT DD SYSOUT=* //CMDIN DD *
/DISPLAY DB IVPDB1.
/DISPLAY DB IVPDB1I .
/DISPLAY DB ADBFC011.
/STO DB IVPDB2.
/STO DB IVPDB3.
/*

Note

  1. The output from commands will be in the JOB log.
  2. You must provide the transaction name and C-number of the program for it to work, use TR, not TRAN, as second parameter.

The JCL procedure COPEBCMD in the JCL distribution library is an example for issuing IMS Type 1 commands from a BMP. The names of the DBDs and PSBs are automatically translated to the values for the Logical System specified in the IMSID parameter.

 

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