JCL Procedures Practice Problem

Here is an invented example of a JCL procedure:

//LOAF   PROC  APARM=,
//             ACREAGE='OLD.MCDONALD.FARM',
//             BTIME=10
//             CCOND=,
//             CREGION=784K
//ASTEP  EXEC  PGM=FARM,PARM=&APARM,REGION=256K,TIME=(0,6)
//STEPLIB  DD  DSN=RURAL.LOADLIB,DISP=SHR
//ACRE     DD  DSN=&ACREAGE,DISP=SHR
//CROP     DD  DSN=&&CROP,UNIT=SYSALLDA,SPACE=(TRK,(600,200)),
//   DISP=(NEW,PASS)
//PRINTER  DD  SYSOUT=*
//BSTEP  EXEC  PGM=MILL,COND=(13,LT,ASTEP),TIME=(0,&BTIME),REGION=512K
//STEPLIB  DD  DSN=MIDDLE.LOADLIB,DISP=SHR
//GRAIN    DD  DSN=&&CROP,UNIT=SYSALLDA,DISP=(OLD,DELETE)
//PRODUCT  DD  DSN=MILL.PRODUCT,UNIT=SYSALLDA,SPACE=(TRK,(500,100)),
//   DISP=(NEW,KEEP,DELETE)
//REPORT   DD  SYSOUT=*
//CSTEP  EXEC  PGM=OVEN,COND=&COND,REGION=&CREGION,TIME=(0,8)
//STEPLIB  DD  DSN=BAKERY.LOADLIB,DISP=SHR
//FLOUR    DD  DSN=MILL.PRODUCT,UNIT=SYSALLDA,SPACE=(TRK,(20,100), 
//   DISP=(NEW,CATLG,DELETE)
//BREAD    DD  DSN=BAKED.GOODS,UNIT=SYSALLDA,SPACE=(TRK,(400,80)),
//   DISP=(NEW,CATLG,DELETE)
//OUTPUT   DD  SYSOUT=*
//       PEND

Notice that this is an in-stream procedure.

When we make changes to a JCL procedure, if there is a symbolic parameter that can be used to make the change, it should be used rather than make the change in some other fashion.

In each of the following parts, you will need one EXEC statement and perhaps one or more DD statements.

  1. Suppose we want to execute the LOAF procedure making the following changes:
    1. Change the PARM of ASTEP to have the value 'LOCUSTS'.
    2. Instead of OLD.MCDONALD.FARM, the input file for ASTEP should be OLIVER.DOUGLAS.FARM.
    3. Change the CROP DD of ASTEP to cut its space allocation in half.
    4. Prevent the execution of CSTEP by changing the COND.
    5. Change the DISP of the PRODUCT DD of BSTEP so the data set will be catalogued in the event of successful execution.
    6. Change the REGION of ASTEP to 320K.

  2. Now execute the LOAF procedure a second time making the following changes instead:
    1. Change the TIME of ASTEP to 18 seconds.
    2. ASTEP should have a PARM='09182007', which is a deadline for making a specific large shipment.
    3. Change the REGION of BSTEP to 1024K.
    4. Add a SYSIN DD statement to CSTEP. It should be in-stream data consisting of two words: PECAN ROLLS.
    5. Concatenate a second data set onto the FLOUR DD of BSTEP. Its name is IMPORTED.PECANS, and it is catalogued.
    6. Change the BREAD DD of CSTEP to use volume FDA101 instead.