z/OS Communications Server: SNA Programming
Previous topic | Next topic | Contents | Contact z/OS | Library | PDF


Handling overlength input data

z/OS Communications Server: SNA Programming
SC27-3674-00

When an application program issues a RECEIVE macroinstruction, the length of the incoming data is often unpredictable. As noted earlier, this is particularly true of RECEIVE macroinstructions issued in the any-mode. VTAM® provides two ways of handling data that is too large for the input area:
  • VTAM can discard the overlength data. The excess data is lost. This facility, called the truncate (TRUNC) option, is useful in application programs that must impose rigid size limitations on input data. For example, an inventory control application program might require the session partner to supply an account number no more than 10 bytes in length.
  • VTAM can keep the data. VTAM fills the input area, saves the remainder, and completes the input request. Additional input requests must be issued to obtain the excess data. This facility is called the KEEP option.

When the data request read by VTAM is larger than the number of bytes specified in the AREALEN operand of a RECEIVE macroinstruction, the RECLEN field of the RPL indicates, after completion of the RECEIVE, the number of bytes that are available before the RECEIVE was executed. This characteristic of the RECLEN field is shown in Figure 1.

Figure 1. Example showing values in the RECLEN field of an RPL
The diagram shows in which conditions and how the values of RECLEN field of RPL are shown.

The application program can select the appropriate option when the session with the LU is established (PROC=TRUNC or KEEP specified in the NIB). Or it can select it when RECEIVE is issued (OPTCD=TRUNC or KEEP specified in the RPL).

Go to the previous page Go to the next page




Copyright IBM Corporation 1990, 2014