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


Input Line Format - The Input Buffer

z/OS TSO/E Programming Services
SA32-0973-00

The fourth word of the PUTGET parameter block contains zeros until the PUTGET service routine returns a line of input. The service routine places the requested input line into an input buffer beginning on a doubleword boundary located in subpool 1. It then places the address of this input buffer into the fourth word of the PGPB.

Note: The application that invoked PUTGET should release the input buffer's storage to prevent the accumulation of unused storage. The application can free the storage with the FREEMAIN macro instruction after the application has processed or copied an input line.
For commands not running on a command invocation platform:
  • Input buffer storage returned by PUTGET is automatically freed when the Command Processor relinquishes control.
  • The application should free the input buffer's storage after it uses the storage. This prevents storage from accumulating while the application is running.
For commands running on a command invocation platform:
  • Input buffer storage returned by PUTGET is not freed when the Command Processor relinquishes control.
  • It is important to free the input buffer's storage after use to prevent the unused storage from accumulating during a TSO/E session.
  • The storage cannot be freed after the application ends because the storage addresses are not known to new applications.

Regardless of the source of input, the input line returned by the PUTGET service routine is in a standard format. All input lines are in the variable-length record format with a fullword header followed by the text returned by PUTGET. Figure 1 shows the format of the input buffer returned by the PUTGET service routine.

Figure 1. Format of the PUTGET Input Buffer

The two-byte length field contains the length of the returned input line including the header (4 bytes). You can use this length field to determine the length of the input line to be processed, and later, to free the input buffer with the R form of the FREEMAIN macro instruction. The two-byte offset field is always set to zero on return from the PUTGET service routine.

Figure 1 shows the PUTGET control block structure for a multilevel PROMPT message after the PUTGET service routine has returned an input line.

Go to the previous page Go to the next page




Copyright IBM Corporation 1990, 2014