Input Line Format - The Input Buffer
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.
- 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.
- 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.

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.