When creating IMOD names, group them into logical units by using name prefixes. The prefix can be any character string (except those beginning with $) and can end with an optional separator. The resulting IMOD name must obey the REXX rules for labels.
Except for IMODs invoked as subroutines or functions, underscores in the IMOD name prefixes have a special use. When an IMOD task is created and the requested IMOD does not exist or is not usable, the name is shortened from the right. The last character and then all preceding characters up to, but not including, an underscore are discarded. The shortened name is then used to search for an executable IMOD. If one is still not found, the shortening process is repeated until an executable IMOD is found or no characters are left left in the name. In this manner, you can provide default IMODs to be executed in place of the one requested.
Example
You define an operator console command, HELP. To use the HELP command, the operator enters HELP xxx operands, where xxx is the name of an IMOD of the form HELP_xxx. You also provide the following IMODs: HELP_DISPLAY, HELP_VARY, and HELP_START. If the operator enters HELP VARY OFFLINE, the HELP_VARY IMOD is executed, which then analyzes the operand OFFLINE and provides an appropriate response.
However, if the operator enters HELP OFFLINE, ISERVE tries to execute the HELP_OFFLINE IMOD, which does not exist. ISERVE then shortens the IMOD name to HELP_. If you have provided an IMOD of that name, it is executed. In this example, it is sufficient for the HELP_ IMOD to send the message, HELP NOT AVAILABLE, back to the operator.
|
Copyright © 2014 CA Technologies.
All rights reserved.
|
|