z/OS DFSMSdfp Storage Administration
Previous topic | Next topic | Contents | Contact z/OS | Library | PDF


EXIT statement

z/OS DFSMSdfp Storage Administration
SC23-6860-01

The EXIT statement immediately terminates the operation of an ACS routine.

EXIT <CODE(n)>
  • CODE is an optional keyword.
  • n is an exit code. A nonzero value for n causes the subsequent ACS routines to be skipped and the allocation to fail with no explicit value assigned to the read-write variable in the ACS routine. If you do not specify a value for n, it assumes the default value of zero.
Figure 1 shows an example of an EXIT statement:
Figure 1. Example of an EXIT Statement
PROC STORCLAS
  FILTLIST SECVOL INCLUDE(PAY*, REC*) EXCLUDE('PAYR20', 'REC195')
  FILTLIST VALID_UNITS  INCLUDE('3380','3390','SYSDA','')
  IF &UNIT ¬= &VALID_UNITS THEN

     DO
        SET &STORCLAS = '
        EXIT
     END

  IF &ALLVOL ¬= &SECVOL THEN EXIT CODE(22)

END

If the first IF statement is true (&UNIT does not match any unit named in the VALID_UNITS filter criteria), then execution of this ACS routine terminates immediately. Allocation proceeds, because the exit code is zero, the default.

If the second IF statement is true (none of the input volumes match the SECVOL FILTLIST criteria), then execution of this ACS routine terminates immediately and the allocation fails. The value for CODE, 22, is set and displayed as part of the allocation failed error message written to the end user.

Go to the previous page Go to the next page




Copyright IBM Corporation 1990, 2014