z/OS TSO/E Customization
Previous topic | Next topic | Contents | Contact z/OS | Library | PDF


Command buffer

z/OS TSO/E Customization
SA32-0976-00

Figure 1 shows the format of the command buffer.

Figure 1. Format of the command buffer
When a command processor gets control, the command buffer contains:
  • A 4-byte header that consists of:
    • A 2-byte length field that contains the length of the command buffer. The length includes the 4-byte header.
    • A 2-byte offset field. The content of the offset field depends on whether the user specifies operands on the command and when the exit routine receives control:
      • If the user specifies operands on the command and the exit routine receives control before the parse service routine, the offset field contains the number of text bytes that precede the first operand.
      • If the user does not specify any operands on the command or the exit routine receives control after the parse service routine, the offset field contains the length of the text field of the command buffer.
  • A text field that contains the command name followed by any operands that the user specifies on the command.

In the standard exit parameter list, the length field of the command buffer (parameter entry 1) is the same value as the value in the 2-byte length field of the command buffer. This length includes the 4-byte header in the command buffer.

For example, suppose the user issues the following command:
PRINTDS DATASET(TEST.DATA) CLASS(B)
In the standard exit parameter list, the length field for the command buffer would be X'23'. In the command buffer itself, the:
  • 2-byte length field would also be X'23'
  • 2-byte offset field would be X'08'
  • Text field would contain the command the user issues:
    PRINTDS DATASET(TEST.DATA) CLASS(B)

An exception is the command buffer for the SEND subcommand of the OPERATOR command. The command buffer does not contain the four-byte header field. It contains only the text field.

Some initialization exits for commands receive control before the command processor invokes the parse service routine to check the syntax of the command and convert operands to uppercase characters. Therefore, when these initialization exits receive the command buffer:
  • The command the user issued may not be syntactically correct, and
  • The command and operands are passed exactly the same way the user specified them. That is, they may be all uppercase, all lowercase, or mixed case.

These exits must not change the command buffer they receive. These exits must use the new command buffer (parameter entry 2) to return an updated command buffer to the invoking command processor. For more information about returning a new command buffer, see New command buffer.

Go to the previous page Go to the next page




Copyright IBM Corporation 1990, 2014