Examples of how to code the ONLYIF command

The following examples present how to code the ONLYIF command.

Note: Any values specified here are only examples and should not be interpreted as the values to be used for your system.

Specifying different start and stop times for automatic primary space management for 2 hosts

In this example, DFSMShsm host HSM1 is configured with a planned start time for automatic primary space management at 4:00 a.m. and the quiesce time is 7:30 a.m. DFSMShsm host HSM2 is configured with a planned start time for automatic primary space management at 9:00 a.m. and the quiesce time is 11:00 a.m.
   ONLYIF HSMHOST(HSM1)
     SETSYS PRIMARYSPMGMTSTART(400 730)
   ONLYIF HSMHOST(HSM2)
     SETSYS PRIMARYSPMGMTSTART(900 1100)

Specifying different maximum number of tasks DFSMShsm can concurrently process for several hosts

In this example, DFSMShsm host HSM1 can have a maximum of 7 automatic volume space management tasks that can run concurrently and a maximum of 5 volume backup tasks that can run concurrently. All other hosts can have a maximum of 3 automatic volume space management tasks that can run concurrently and a maximum of 9 volume backup tasks that can run concurrently.
   SETSYS MAXMIGRATIONTASKS(3) MAXBACKUPTASKS(9)
   ONLYIF HSMHOST(HSM1)
    SETSYS MAXMIGRATIONTASKS(7) MAXBACKUPTASKS(5)

Specifying continuation characters for commands with several parameters

In this example, all DFSMShsm hosts (host HSM1) will have the following attributes:
  • a maximum of 1 automatic volume space management task.
  • when small data sets migrate, they are not packed into predefined VSAM key-sequenced small-data-set-packing data sets on a migration level 1 volume.
  • interval migration is not performed.
  • a maximum of 2 recall tasks can run concurrently.
  • a maximum of 1 tape recall task that can request tape mounts.
Host HSM1 will have these attributes:
  • a maximum of 3 automatic volume space management tasks can run concurrently.
  • when small data sets migrate, they are eligible to be packed into predefined VSAM key-sequenced small-data-set-packing data sets on a migration level 1 volume.
  • interval migration is performed.
  • a maximum of 8 recall tasks can run concurrently.
  • a maximum of 4 tape recall tasks that can concurrently request tape mounts.
   SETSYS MAXMIGRATIONTASKS(1) NOSMALLDATASETPACKING NOINTERVALMIG +
       MAXRECALLTASKS(2) TAPEMAXRECALL(1)
   ONLYIF HSMHOST(HSM1)
    SETSYS MAXMIGRATIONTASKS(3) SMALLDATASETPACKING INTERVALMIG +
       MAXRECALLTASKS(8) TAPEMAXRECALL(4)

Specifying various commands within ARCCMDxx using ONLYIF

In this example, DFSMShsm host HSM1 runs automatic backup on weekdays (Monday through Friday) and the cycle is started or reset on January 3,1994 (Monday). Host HSM2 runs automatic backup on Saturday only and the cycle is started or reset on January 3, 1994 (Monday). Host HSM3 prevents all DFSMShsm functions from running.
   ONLYIF HSMHOST(HSM1)
    DEFINE BACKUP( YYYYYNN -     /* run backup on weekdays only   */
      CYCLESTARTDATE(1994/01/03) /* cycle defined on a Monday     */
   ONLYIF HSMHOST(HSM2)
    DEFINE BACKUP( NNNNNYN -     /* run backup only on Saturdays  */
      CYCLESTARTDATE(1994/01/03) /* cycle defined on a Monday     */
   ONLYIF HSMHOST(HSM3)
    HOLD ALL                     /* functions held on test system */

Specifying that automatic dump only run on three hosts

In this example, the SETSYS and DEFINE commands to set up automatic dump are ran on DFSMShsm hosts HSM1, HSM2, and HSM3 only.
Note: The indentation of lines between the BEGIN and END parameters is for ease of reading only, and is not required.
   ONLYIF HSMHOST(HSM1,HSM2,HSM3)
   BEGIN
     SETSYS AUTODUMPSTART(0300 0400 0500)
     SETSYS BACKUP(TAPE)
     SETSYS MAXDUMPTASKS(3)
     DEFINE BACKUP(Y)
     DEFINE DUMPCYCLE(Y)
     DEFINE DCLASS(DCLASS1 DATASETRESTORE FREQ0)
   END