Define a dependent relationship

A dependent relationship is a required relationship between parameters.

If a required relationship exists between parameters, and if parameter values must be checked when the command is run, use the Dependent (DEP) statement to define that relationship. Using the DEP statement, you can perform the functions that are listed below:

In the following example, if the display station user specifies the TYPE(LIST) parameter, the display station user must also specify the ELEMLIST parameter.

DEP CTL(&TYPE *EQ LIST) PARM(ELEMLIST)

In the following example, the parameter &WRITER must never be equal to the parameter &NEWWTR. If this condition is not true, message USR0001 is issued to the display station user.

DEP CTL(*ALWAYS) PARM((&WRITER *NE &NEWWTR)) MSGID(USR0001)

In the following example, if the display station user specifies the FILE parameter, the display station user must also specify both the VOL and LABEL parameters.

DEP CTL(FILE) PARM(VOL LABEL) NBRTRUE(*EQ 2)