Go to LeighWeb Home Page            

Back To LeighWeb Mainframe Utilities Page

View the module associated with this documentation

 This edit macro is designed to re-order the label numbers in JCL for multiple
 datasets stacked on a single tape. It is designed for times when a job abends
 and you need to start stacking datasets at a new job step beyond the one that
 originally had the label of "1".

 To execute this, you pass the number of the label which should now become "1".
 RELABEL finds that label and renumbers all subsequent labels so that they are
 incremented properly.  It also works with multiple output DD's in a single step
 which all need to have the same label number.  Multiple output DD's in the same
 step with different label numbers would not work.

 Syntax Example:

 COMMAND ===> relabel 5

 In this example, RELABEL would find each "LABEL=(" and find the first one where
 the label is 5 (or 05 or 005, etc.).  It would change the 5 to a 1 and label 6
 to a 2 and label 7 to a 3 and so on.

 So if you had a job that looked like the following:

 //STEP01    EXEC PGM=XXX
 //DD1 DD LABEL=(1,SL,RETPD=30),etc.......
 //DD2 DD LABEL=(1,SL,RETPD=30),etc.......
 //STEP02    EXEC PGM=XXX
 //DD1 DD LABEL=(2,SL,RETPD=30),etc.......
 //DD2 DD LABEL=(2,SL,RETPD=30),etc.......
 //STEP03    EXEC PGM=XXX
 //DD1 DD LABEL=(3,SL,RETPD=30),etc.......
 //DD2 DD LABEL=(3,SL,RETPD=30),etc.......
 //STEP04    EXEC PGM=XXX
 //DD1 DD LABEL=(4,SL,RETPD=30),etc.......
 //DD2 DD LABEL=(4,SL,RETPD=30),etc.......
 //STEP05    EXEC PGM=XXX
 //DD1 DD LABEL=(5,SL,RETPD=30),etc.......
 //DD2 DD LABEL=(5,SL,RETPD=30),etc.......
 //STEP06    EXEC PGM=XXX
 //DD1 DD LABEL=(6,SL,RETPD=30),etc.......
 //DD2 DD LABEL=(6,SL,RETPD=30),etc.......
 //STEP07    EXEC PGM=XXX
 //DD1 DD LABEL=(7,SL,RETPD=30),etc.......
 //DD2 DD LABEL=(7,SL,RETPD=30),etc.......
 //STEP08    EXEC PGM=XXX
 //DD1 DD LABEL=(8,SL,RETPD=30),etc.......
 //DD2 DD LABEL=(8,SL,RETPD=30),etc.......
 //STEP09    EXEC PGM=XXX
 //DD1 DD LABEL=(9,SL,RETPD=30),etc.......
 //DD2 DD LABEL=(9,SL,RETPD=30),etc.......
 //STEP10    EXEC PGM=XXX
 //DD1 DD LABEL=(10,SL,RETPD=30),etc.......
 //DD2 DD LABEL=(10,SL,RETPD=30),etc.......
1
 After a "relabel 5" it would look like:

 //STEP01    EXEC PGM=XXX
 //DD1 DD LABEL=(1,SL,RETPD=30),etc.......
 //DD2 DD LABEL=(1,SL,RETPD=30),etc.......
 //STEP02    EXEC PGM=XXX
 //DD1 DD LABEL=(2,SL,RETPD=30),etc.......
 //DD2 DD LABEL=(2,SL,RETPD=30),etc.......
 //STEP03    EXEC PGM=XXX
 //DD1 DD LABEL=(3,SL,RETPD=30),etc.......
 //DD2 DD LABEL=(3,SL,RETPD=30),etc.......
 //STEP04    EXEC PGM=XXX
 //DD1 DD LABEL=(4,SL,RETPD=30),etc.......
 //DD2 DD LABEL=(4,SL,RETPD=30),etc.......
 //STEP05    EXEC PGM=XXX
 //DD1 DD LABEL=(1,SL,RETPD=30),etc.......
 //DD2 DD LABEL=(1,SL,RETPD=30),etc.......
 //STEP06    EXEC PGM=XXX
 //DD1 DD LABEL=(2,SL,RETPD=30),etc.......
 //DD2 DD LABEL=(2,SL,RETPD=30),etc.......
 //STEP07    EXEC PGM=XXX
 //DD1 DD LABEL=(3,SL,RETPD=30),etc.......
 //DD2 DD LABEL=(3,SL,RETPD=30),etc.......
 //STEP08    EXEC PGM=XXX
 //DD1 DD LABEL=(4,SL,RETPD=30),etc.......
 //DD2 DD LABEL=(4,SL,RETPD=30),etc.......
 //STEP09    EXEC PGM=XXX
 //DD1 DD LABEL=(5,SL,RETPD=30),etc.......
 //DD2 DD LABEL=(5,SL,RETPD=30),etc.......
 //STEP10    EXEC PGM=XXX
 //DD1 DD LABEL=(6,SL,RETPD=30),etc.......
 //DD2 DD LABEL=(6,SL,RETPD=30),etc.......