Example: Save specific objects in an application (system operator)

This example program ensures consistent command entry for regularly repeated procedures.

PGM
SAVOBJ OBJ(FILE1 FILE2) LIB(LIBA) OBJTYPE(*FILE) DEV(TAP01) +
  CLEAR(*YES)
SAVOBJ OBJ(DTAARA1) LIB(LIBA) OBJTYPE(*DTAARA) DEV(TAP01)
SNDPGMMSG MSG('Save of daily backup of LIBA completed') +
  MSGTYPE(*COMP)
ENDPGM

Additional Save Object (SAVOBJ) commands can, of course, be added. However, this program relies on the operator selecting the correct tape for each periodic backup of each application. This can be controlled by assigning unique names to each tape set for each save operation. If you want to save your payroll files separately each week for four weeks, for instance, you might name each tape differently and write the program to compare the name of the tape against the correct name for that week.