OPTION

Generated from C.65.00 /SYSADMIN/PUB/MYCICAT last modified on Sun Aug 29 15:08:37 2004

Back to Main Index


OPTION


     This command modifies the environment of user-defined commands
     and command files.  It is used within the command definition to
     set up and change the environment dynamically.  The UDC option
     called OPTION in MPE V/E is retained in MPE/iX as a static option
     in the header of the command.  This command is intended for use
     only in a User Command.  Executing the OPTION command
     interactively (outside a User Command) does not produce an error,
     but does not have any effect, either.

SYNTAX


            [{LIST  }]     [{RECURSION  }]
     OPTION [{NOLIST}] [,] [{NORECURSION}]


PARAMETERS


LIST                Specifies that the command lines in a user command
                    (UDC or command file) are to be printed before each
                    command in the User Command is executed.

NOLIST              Suppresses the listing of the command lines in a
                    user command when it is executed.  NOLIST is the
                    default.

RECURSION           Specifies that the search for UDCs is to begin at
                    the beginning of the cataloged commands list.
                    RECURSION and NORECURSION do not have any meaning in
                    a command file, because command files are not
                    cataloged.

NORECURSION         Specifies that the UDC search starts at the command
                    currently executing and continues, in order, through
                    the UDC catalog, as in MPE V/E. Default.  RECURSION
                    and NORECURSION do not have any meaning in a command
                    file, because command files are not cataloged.



OPERATION


     The OPTION command modifies the environment of user defined
     commands (UDCs) and command files.  The MPE V/E option
     called OPTION is retained. It is declared in the header of
     the user command, after the parameter line, and affects the
     entire command. The OPTION command gives the user more
     flexibility in modifying the user command environment.

     The LIST/NOLIST option specifies whether command lines in a
     UDC are printed before execution of each command.
     RECURSION/NORECURSION determines the search order for
     commands cataloged.

     RECURSION starts the UDC search at the beginning of the
     cataloged commands.  NORECURSION, the default setting,
     starts the search at the command currently executing.
     RECURSION and NORECURSION do not have any meaning in a
     command file, because command files are not cataloged. The
     default is NORECURSION.

     Nesting of IF and WHILE blocks in UDCs is limited to a
     combined total of 30 levels.  Each IF or WHILE block read
     by the CI increments the nesting count even if it resides
     within a different UDC.  It is especially important to
     remember this when using the recursion option which may
     make it easy to increment the nesting count beyond 30.

     OPTION values are set to defaults whenever a command file
     or UDC is executed.  If OPTION is specified as part of the
     user command definition then the OPTION will be RESET to
     this value if another UDC/command file is called from the
     user command. If OPTION is not set in the header of a UDC/
     command file then its value will not be retained across
     calls to other UDC/command files.

NOTE


Be sure to distinguish between the OPTION command and OPTION used
in the header of a user command.

The OPTION command (described here) accepts only the LIST/NOLIST
and RECURSION/NORECURSION parameters.  OPTION used in the header of
a UDC or a command file accepts the HELP/NOHELP, LOGON/NOLOGON,
BREAK/NO BREAK, and PROGRAM/NOPROGRAM parameters, in addition to the
LIST/NOLIST and RECURSION/NORECURSION parameters.

     This command is available in a session, job, or from a
     program, or in BREAK.  Pressing [Break] has no effect on this
     command.


EXAMPLE(S)


     To send a line-by-line listing of a command file to $STDLIST
     as it executes, include this command in the command file, ahead
     of the statements to be displayed:

     OPTION LIST

     (You may, alternatively, place the command line OPTION LIST
     within the header of the command file.)

Back to Main Index