Transparent and Non-Transparent Modes [ SNA IMF Programmer's Reference Manual ] MPE/iX 5.0 Documentation
SNA IMF Programmer's Reference Manual
Transparent and Non-Transparent Modes
SNA IMF uses a data handling technique called the internal screen image.
Whenever you call the OPEN3270 intrinsic, an internal screen image is
created. The data stream is stored in the internal screen image, in SNA
Character String (SCS) format for LU.T1 sessions, or in 3270 format for
LU.T2 and LU.T3 sessions.
In transparent mode, or data stream mode, your application has access to
the untranslated data stream. Untranslated data is in EBCDIC. In
transparent mode, SNA IMF stores the untranslated data stream in the
internal screen image without interpreting any of the codes that indicate
the cursor position, the location of fields on the screen, field
attributes, and so on.
In non-transparent mode, SNA IMF translates the data stream to ASCII and
interprets all the codes that describe the appearance of a screen. In
non-transparent mode, SNA IMF can locate the cursor, position all the
fields on the screen, display the attributes of each field, and so on.
Transparent(Data Stream) Mode
The transparent (data stream) mode of SNA IMF allows your application
program to obtain the untranslated data stream in either no-wait or wait
I/O. In transparent mode, SNA IMF does not interpret any of the control
information in the data stream. It does not differentiate between the
data contained in a field and the control information that describes the
field and locates it on the screen. Therefore, in transparent mode, you
cannot call non-transparent mode SNA IMF intrinsics that access
individual fields in the internal screen image (such as READFIELD or
WRITEFIELD).
In transparent mode, you obtain data from the host by calling RECV3270
and then READSTREAM. To send LU.T2 data to the host, call WRITESTREAM and
then TRAN3270. To send LU.T1 data to the host, you need to call only
TRAN3270. You cannot call READSTREAM and WRITESTREAM in non-transparent
mode, because the original data stream is not preserved after it is
translated.
Use transparent mode only for LU.T1 emulation or for communicating with
host applications designed specifically for transferring files without
translation. You must specify transparent mode for LU.T1 sessions, which
communicate with host SCS applications.
To specify transparent mode, you open a device by calling the OPEN3270
intrinsic with bit 14 of the flags parameter set to 1 (the transparent
mode option).
An option of the OPEN3270 intrinsic allows a printer to accept both LU.T1
and LU.T3 printer sessions.When you set up a printer that way, you can
run your LU.T1 sessions in transparent mode and your LU.T3 sessions in
non-transparent mode. See the description of the OPEN3270 intrinsic, in
chapter 3, for more information.
Only the following intrinsics can be used in transparent mode:
ABORT3270
CLOSE3270
ERR3270
IODONTWAIT (SNA IMF/V only)
IODONTWAIT3270 (SNA IMF/XL only)
IOWAIT (SNA IMF/V only)
IOWAIT3270 (SNA IMF/XL only) OPEN3270
READSTREAM
RECV3270
TRAN3270
VERS3270
WRITESTREAM (for LU.T2 sessions only)
Binary datamay be transmitted in transparent mode because the SDLC
protocol allows transmission of transparent data. Because SNA IMF does
not attempt to interpret the data, all possible values of data may be
transmitted and received in transparent mode.
While in transparent mode, you are responsible for any character code
translation. Use the Native Language Support (NLS)tables to perform the
conversion. See the Native Language Support Reference Manual for more
information.
When a file is transferred from the host system to the HP 3000, the
entire file is sent in sequential blocks known as request units (RUs).
Each LU.T2 or LU.T3 RU (or each RU chain, if chaining is used)from the
host contains a 3270 data stream write command. LU.T1 RUs contain SCS
control codesinstead of 3270 data stream commands.
The received data stream is passed unaltered through the SNA IMF
software. The HP 3000 software transfers the data stream directly into
the internal screen image untranslated. The LU.T2 and LU.T3 data
returned to the user is a 3270 data stream consisting of a write command
byte and transparent data. SNA IMF processes and removes both the SNA
controls and the SDLC protocol information before passing the received
data to the user.
When transmitting data from the HP 3000 to the host system, the internal
screen image used by the WRITESTREAM intrinsic need contain only the data
to be transferred. The SNA IMF software partitions the data to be
transmitted into RUs and adds the necessary SDLC and SNA protocol
information. The SDLC protocol and SNA controls provide coordination
between the host system and the HP 3000; however, you must establish the
interprocess controls between the host application and the HP
application. For example, you must identify the start or end of a file.
The AID and cursor address values specified in your TRAN3270 intrinsic
call are optionally inserted at the beginning of the first frame. An AID
(attention identifier) is the numeric code indicating that you have
pressed a key. The AID value and cursor address can be suppressed in the
TRAN3270 call.
If AID and cursor suppression are not used, and you are sending aCLEAR or
PA key during an LU.T2 session, call WRITESTREAM with an outbuflen of
zero before calling TRAN3270. In transparent mode, SNA IMF will not
check the AID key to determine whether it is a CLEAR or PA key. In
non-transparent mode, no data is sent with the CLEAR and PA keys.
It is important to note that the lack of a true screen image invalidates
using the host READ BUFFERand READ MODIFIEDcommands. These commands will
not be executed by SNA IMF. If SNA IMF receives a READ BUFFER or READ
MODIFIED command from the host, it will reject the command with sense
code X'1003' (unsupported function). Thus, for the host to obtain data
from a transparent mode device, this device must have a TRAN3270
intrinsic request outstanding. Also, the host must be indicating that it
is ready to receive data. All other commands are accepted and passed on
to your program along with any associated data. SNA IMF performs no
other actions that normally might be associated with a specific command.
The size of the internal screen imagedetermines the amount of data that
can be transmitted or received. For LU.T2 and LU.T3 sessions, a screen
size of 480, 1920, or 3440 characters will have a buffer limitof 540,
2160, and 3870 bytes, respectively. If data received from the host
system is larger than the buffer limit, the buffer is filled to the limit
and the rest of the data is lost. When the user issues the next
READSTREAM call, a result code of 52 will be returned, indicating that
the entire data stream could not be received. For LU.T1 sessions, SNA
IMF can support an internal screen image of only 3870 bytes and an RU
size of only 3584 bytes. If you exceed this RU limit, the internal
screen image may be overwritten if the host application sends a split
order. A split order
occurs when SCS control codes or parameters span RU boundaries within an
RU chain.
If a host writes to a transparent mode device that already has data in
its internal screen image, SNA IMF will reject the data with sense code
X'082D' (device busy). When you indicate that you are ready for more
data by issuing another RECV3270 call, SNA IMF sends an LUSTAT to the
host, indicating that the device is now available (X'00010000' for LU.T1
and LU.T3, X'0001D000' for LU.T2). This intervention prevents the host
from writing over a data stream not yet obtained by the user.
Non-Transparent Mode
In non-transparent mode, the data stream is translated into the image of
a terminal screen. Once the data is translated, SNA IMF can locate the
cursor on the screen, locate each field on the screen, and identify the
attributes of each field. Data that has been entered into the fields can
be differentiated from control information in the data stream that
locates and describes the fields on the screen.
In non-transparent mode, the internal screen imageis maintained in ASCII
character code, and the data is converted to EBCDIC character code only
before being transmitted to the host system. Data received in EBCDIC
character code is translated to ASCII character code before being placed
in the internal screen image.
You cannot call READSTREAM and WRITESTREAM in non-transparent mode,
because the original data stream is not preserved after it is translated.
MPE/iX 5.0 Documentation