Previous Topic: EQUATE CommandNext Topic: HELP Command


EXEC Command

 EXEC [S.]clist-name < A1. . .A9 >
                     \ ?         /

Where:

S.-forced access to a global CLIST when there is a global CLIST with the same name as a CLIST associated with your user ID.

clist-name-1-8 character CLIST identifier.

a1...a9-represent optional arguments used for macro-like replacement within the body of the CLIST. These arguments may be keywords, subschema entity names, or literals of any acceptable format. Within the CLIST, a1 will replace each occurrence of %1, etc.

?-causes the CLIST processor to prompt for all arguments and display all DEFINE information.

Use the EXEC command to execute an existing CLIST.

You may incorporate CLIST variables within any CLIST statements. These variables are of the form %1 ... %9. This variable capability allows you to prepare general-purpose modules for frequently used functions.

Arguments supplied with the EXEC statement may be record, area, set, scratch/queue names, element names, keywords, or literals of any acceptable format. The arguments will replace all occurrences of the corresponding variables within the CLIST statements at the time the statement is executed.

You may indicate that an optional argument is null by entering "," for that argument. This will cause the corresponding symbol to be replaced by a null string in the CLIST command. You may test if argument n is null with a conditional test for %NULLn. This conditional name is "true" if the corresponding argument is supplied as a null value.

The CLIST facility allows you to use DEFINE symbols (:%n) for documenting the use of CLIST arguments ahead of the executable CLIST commands. Not only will this provide documentation for a user who is editing the CLIST, but it allows the CLIST processor to prompt for missing arguments. If a CLIST command is encountered which includes a CLIST variable for which a corresponding argument has not been provided, the processor will display a screen which allows you to supply the missing argument value. If a DEFINE exists for the missing argument, the associated documentation is also displayed.

If you have no idea of what arguments are needed for a given CLIST, "EXEC clist-name ?" will cause the CLIST processor to prompt for all arguments, and display all DEFINE information. Such documentation for any non-trivial CLIST is highly recommended. Note that a CLIST may EXEC another CLIST. Thus, you may define CLIST subroutines called by other CLISTs. CA IDMS DMLO will ensure that recursion doesn't occur; i.e., a CLIST doesn't appear at multiple levels in an active EXEC nest.