One Backup Member and One Restore Member, with Tailoring
You can set up BACKUP/RESTORE to need only one JCL member for each, and use the ISPF-style-&-substitution and tailoring facilities to make the single member work appropriately for each Lsys. You might want to do this so that you do not have to maintain many similar members.
To do this, edit the COPEO member of MENUS, in which the command string that BACKUP or RESTORE is translated to, is defined. The relevant lines, as delivered, are:
RESTORE,'STO DB &LS;SUB R&LS'
This defines the commands to be the sequence of two commands, "STO", which stops databases, and "SUB" which submits JCL members. The ";" semicolon is a command delimiter, as in ISPF. To change to one JCL member for each function, you would omit the &LS "logical-system" variable from the "SUB" commands. E.g.
RESTORE,'STO DB &LS;SUB RJOB'
Now, BACKUP will always submit member BJOB, and RESTORE will submit member RJOB. Commands other than BACKUP and RESTORE can be set up to be combinations of COPE or IMS commands, in the same way.
Within BJOB and RJOB, the JCL for the currently logged-on Lsys is tailored by using &LS variables ")SEL", ")ENDSEL" and ")SET" lines, as in the example below, which caters for two systems named TESTSYS and DEMOSYS.
)SET VOLSER = TSG804
)ENDSEL
)SEL &LS = DEMOSYS
)SET VOLSER = DEM801
)ENDSEL
//FDRDSF1 EXEC PGM=FDRDSF
//SYSPRINT DD SYSOUT=*
//SYSUDUMP DD SYSOUT=*
//DISK1 DD UNIT=SYSDA,VOL=SER=&VOLSER,DISP=SHR
//TAPE1 DD DSN=BUP.&LS..&VOLSER(+1),DISP=(,CATLG),UNIT=CART
DUMP DSN=TSG.&LS..MP001345
DUMP DSN=TSG.&LS..MP001346
//*
In the above example, &LS is always replaced with the Lsys name that the user is currently logged onto. The first ")SEL" selects the statements up to its ")ENDSEL", if the system is TESTSYS. The ")SET" is the only statement to be selected here, and will set a new (non-predefined) variable &VOLSER to the value TSG804.
Similarly, the second ")SEL" works with its ")ENDSEL" to set &VOLSER to "DEM801", if the system is DEMOSYS. The ")" lines are omitted from the output JCL. In the actual JCL, the &LS and &VOLSER variables have their values substituted.
This use of ")" control statements, and &-substitutable variables is similar to ISPF file-tailoring, although there are some ISPF features which are not available. Please refer to The-IMS-SUB-Command for further details.