Previous Topic

Next Topic

Book Contents

Book Index

DO ENFORCE: Action Parameter

Assigns a value to a variable in a JCL statement. For enforcement only.

The valid format is

ENFORCE variable = value

where

Optional. Type ENFORCE in the DO field, and press Enter. An empty field is displayed. Enter the variable and the value that is being assigned to it.

Tab.JV.3.18 Built-in ENFORCEMENT functions

Function

Description

REMOVE

Performs removal of a parameter from the JCL.

Valid format:

%%var = %%$REMOVE

where %%$var is any system variable representing a JCL parameter which is supported under the specific ON event context.

For example:

Given

//DDNAME  DD    DISP=(NEW,CATLG,DELETE)

The command:

DO ENFORCE %%$DDDISP1 = %%$REMOVE

Will result in:

//DDNAME  DD    DISP=(,CATLG,DELETE)

Given the above DISP, the following commands:

DO ENFORCE %%$DDDISP1 = %%$REMOVE

DO ENFORCE %%$DDDISP2 = %%$REMOVE

DO ENFORCE %%$DDDISP3 = %%$REMOVE

Will result in:

//DDNAME  DD   DISP=(,,)

Note: Removing all sub parameters of a parameter such as DISP above, does not automatically remove the DISP=(,,) itself.

The following special system variables are supported only when they appear on the left side of %%$var = %%$REMOVE for removing the entire parameter:

  • %%$UNIT
  • %%$DCB
  • %%$SPACE
  • %%$DISP
  • %%$VOL

So given:

//DDNAME  DD   DISP=NEW,DSN=<dsn>,VOL=SER=…

DO ENFORCE %%$DISP = %%$REMOVE

will remove the whole DISP parameter and will result in:

//DDNAME  DD   DSN=<dsn>,VOL=SER=…

Note: The removal is performed without checking that the resultant statement is valid.

GROUP

Performs grouping of all DCB-type parameters that appear outside of the DCB=(…) parameter, so that they will appear as sub-parameters under the DCB=(…) parameter.

Valid format:

%%$DCB = %%$GROUP

For example:

Given

//DD1  DD  DISP=<disp>,DSN=<dsn>,RECFM=FB,

//     LRECL=800,BFALN=D,BLKSIZE=8000,TRTCH=NOCOMP

The command:

DO ENFORCE %%$DCB = %%$GROUP

Will result in:

//DD1  DD  DISP=<disp>,DSN=<dsn>,DCB=(RECFM=FB,

//     LRECL=800,BFALN=D,BLKSIZE=8000,TRTCH=NOCOMP)

UNGROUP

Performs ungrouping of all DCB sub-parameters that appear in the DCB=(…) parameter, so that they will appear as standalone DD parameters without the DCB=(…) parameter.

Valid format:

%%$DCB = %%$UNGROUP

For example:

Given:

//DD1  DD  DISP=<disp>,DSN=<dsn>,DCB=(RECFM=FB,

//     LRECL=800,BFALN=D,BLKSIZE=8000,TRTCH=NOCOMP)

The command:

DO ENFORCE %%$DCB = %%$UNGROUP

Will result in:

//DD1  DD  DISP=<disp>,DSN=<dsn>,RECFM=FB,

//     LRECL=800,BFALN=D,BLKSIZE=8000,TRTCH=NOCOMP

Parent Topic

Parameter Descriptions