SRMJOB04—Defragment a volume
The SRMJOB04 skeleton JCL member is used in the coded Rule.
SRMJOB04 is basic DFDSS JCL that issues a DEFRAG for the volumes that passed filtering. Each record that passed causes the control statements to be repeated as they are encompassed in the DO loop.
In the example in Figure 1, the JOB card uses variable substitution in the job name. In this example, the substitution will resolve the variable VOLSER and insert its contents into the output stream, beginning with the second character, for a length of five characters. If this JCL is used in a solution that submits one job for each volume that is passed, each job will have a unique job name from the forth character on (SRMRES01, SRMAPVOL, and so on). If this skeleton JCL is used in a solution that causes one job to contain many VOLSERs, the last VOLSER that passed through the tailoring process will be used in the job name.
If ACT_JOB=SRMJOB04 is coded in the RLST instead of ACT_EVENTID, a SET result group is created during processing, passing a group of volume records at one time to be used in the skeleton tailoring process. One batch job is submitted, containing an equal number of control statements and volumes that passed filtering. Each control statement initiates a DEFRAG against each passed volume.
SRMJOB04 skeleton JCL example
//* TYPRUN=HOLD
//******************************************************************
//* DEFRAG *
//******************************************************************
//* SOLUTION IS &SOL
//* FUNCTION IS &FUNC
//******************************************************************
//DEFRAGIT EXEC PGM=ADRDSSU,REGION=0K
//SYSPRINT DD SYSOUT=*
)DO
//*DD&I DD DISP=SHR,UNIT=SYSALLDA,VOL=SER=&VOLSER
)END
//SYSIN DD *
)DO
//* DEFRAG DDNAME(DD&I)
)END
/*
//