Some possible uses of the FREE exits are described below:
- Change the operands that the user specifies on the command
You
can use the initialization exit to change the operands that users
specify on the FREE command. The initialization exit receives the
address of the command buffer. It can change the operands the user
specifies on the FREE command by using a new command buffer. For
example, the initialization exit can scan the command buffer and correct
any errors on the command.
- Provide installation-defined pseudo-operands
You can provide pseudo-operands for your installation's users
that are equivalent to two or more FREE operands. Providing pseudo-operands
makes it easier for users to issue the FREE command. Users need not
remember several FREE operands. They can specify the pseudo-operand.
For
example, you could associate a pseudo-operand named FREEIT with three
FREE operands. The initialization exit can scan the command buffer.
If the exit finds the pseudo-operand FREEIT, it can replace FREEIT
with the actual FREE operands and return a new command buffer.
To check the command buffer and change its contents, the initialization
exit can:
- Scan the command buffer and decide, based on your own criteria,
to change the command the user issued
- Obtain storage for a new command buffer
- Build the new command buffer
- Update the key, length, and data fields for the new command buffer
as follows:
- Key
- X'02'
- Length
- the length of the new command buffer
- Data
- the address of the new command buffer
- Set a return code of 0 and return control to the FREE command processor.
The exit must not change the command buffer it receives. It must
create a new command buffer and return the address of the new command
buffer to FREE. For more information about the command buffer and
the new command buffer, see TSO/E standard exit parameter list. For information
about the format of the command buffer, see Command buffer.
You must also write a termination exit to free the storage the
initialization exit obtains for the new command buffer. When the
FREE command processor invokes the termination exit, it passes the address of the
new command buffer to the termination exit. The termination exit
frees the storage for the new command buffer.