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


Data stream

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

The data stream (request unit contents) sent to or received from an LU type 0 3270 logical unit is further described in the component description manual. The data stream sent from an application program, using the SEND macroinstruction, consists of a 3270 command code and associated control information, followed optionally by 3270 orders and data. Note that the application program does not specify any line control information such as STX (start of text) and ETX (end of text) and does not specify an ESC (escape character). VTAM® supplies any information required to communicate with the particular terminal involved in each session. The data stream received from the logical unit, using the RECEIVE macroinstruction, consists of an AID (attention identifier) byte, usually followed by cursor information, orders, and data. As mentioned for output, no line control information is present in the RUs passed to the application program. Therefore, the basic data stream is the same for all LU type 0 3270s, independent of BSC, SDLC, or channel modes of attachment. Of course, specific device capabilities (such as a selector pen or a magnetic card reader) that each terminal has can make data streams differ from terminal to terminal.

Other information received from a 3270 terminal does not pass directly to the application program. It is, instead, intercepted by the network. It can map into an RU before passing to the application program, or can be used to cause an action, such as the scheduling of the LOSTERM exit routine. Refer to Exception conditions and sense information, for information about how exception requests and negative responses are received by the application program. Refer to Test request, for information about the purpose of the test request within the network.

An EBCDIC character set is normally used for LU type 0. For these terminals, the application program must set the code-selection indicator to CODESEL=STANDARD for SEND; VTAM sets CODESEL=STANDARD when RECEIVE completes. For each byte of the data stream, the code point (hexadecimal representation) used by VTAM is the one defined in the component description manual for communicating with an EBCDIC BSC 3270 terminal. Note that an ASCII BSC terminal can attach to a communication controller; however, the communication controller must translate the terminal's ASCII input into EBCDIC before sending the data to the host processor and must translate EBCDIC output data from the host processor into ASCII before sending it to the BSC terminal.

Certain PU type 1 3270 terminals support an ASCII character set. For these terminals, CODESEL=ALT is used for SEND and RECEIVE. The communication controller does not translate the data stream for these terminals; ASCII data is passed between the application program and the terminal.

Function management headers are not used by LU type 0, so the application program must set OPTCD=NFMHDR for SEND; VTAM sets OPTCD=NFMHDR when RECEIVE processing is completed.

An RU sent to a 3270 terminal can cause data to be returned to the application program. For example, the RU can contain a 3270 command such as Read Modified. The data returned by the 3270 in reply to such an RU is obtained by the application program by using a RECEIVE macroinstruction. The 3270 can also send data asynchronously without having been sent a request for input. For example, pressing the ENTER key causes the 3270 to send an RU to the application program.

A 0-length RU can be sent to an LU type 0 3270 LU. This is usually done to begin or end a bracket when no data is available to be sent at the same time. SEND RECLEN=0, with BRACKET set to the desired values, accomplishes this function.

An application program cannot send just the Erase/Write command to function as a no-operation at a BSC 3270. When a data stream is sent to a BSC or non-SNA channel-attached 3270, VTAM adds a null Write Control Character (WCC) to the data stream following the command code. Therefore, when the command arrives at the 3270, it is no longer just the command code and it can no longer function as a no-operation.

Go to the previous page Go to the next page




Copyright IBM Corporation 1990, 2014