Some possible uses of the TEST subcommand exits are described below:
- Change the operands that the user specifies on the subcommand
You
can use the initialization exit to change the operands that users
specify on the TEST subcommand. The initialization exit receives
the address of the subcommand buffer. It can change the operands
the user specifies on the TEST subcommand by using a new subcommand
buffer. For example, the initialization exit can scan the subcommand
buffer and correct any errors on the subcommand.
To check the
subcommand buffer and change its contents, the initialization exit
can:
- Scan the subcommand buffer and decide, based on your own criteria,
to change the command the user issued
- Obtain storage for a new subcommand buffer
- Build the new subcommand buffer
- Update the key, length, and data fields for the new subcommand
buffer as follows:
- Key
- X'02'
- Length
- the length of the new subcommand buffer
- Data
- the address of the new subcommand buffer
- Set a return code of 0 and return control to the TEST command processor.
The exit must not change the subcommand buffer it receives.
It must create a new subcommand buffer and return the address of
the new subcommand buffer to TEST.
For more information about
the subcommand buffer and the new subcommand buffer, see TSO/E standard exit parameter list. For information about the format of the subcommand
buffer, see Command buffer.