The text of a manual · part 22 of 33
TE 2000 5250 Terminal Emulation Programmer's Guide: Section 6: Display Data Stream, pages 177 to 185
Pages 177 to 185 of 270, from TE 2000 5250 Terminal Emulation Programmer's Guide
The original document is the PDF (4.4 MB). This is its text as extracted, unedited; tables and drawings read best in the PDF, and each page heading opens it at that page.
For the Intermec 6400
Page 177
Section 6
Display Data Stream "
"
"
"
"
"
"
"
"
"
"
"
"
"
"
"
"
"
"
"
This section describes the following: The host 5250 display data stream commands the host application can send to terminals. " The host 5250 data stream orders the host can send to terminals. Orders govern format and data expectations within the Write to Display command. " Asynchronous 5250 prefixes. " System messages and parameter errors that can appear in the terminal’s display. This section is not intended as a specific guide for programming, but a comparison with your existing system. The information helps identify differences between your screen-generating utilities and the features the terminals support. "
Screen Design Aid This section, along with your Screen Design Aid (SDA) documentation, can help you resolve occasional questions concerning discrepancies that may arise regarding attribute selection and the capabilities of the terminals. This section includes information you may not need, because you can use your SDA to do much, if not all, of the programming to handle commands and orders for the network. This information is provided to assure you have the most accurate and detailed information available and to describe variations from the 5250 data stream where they occur. If you are comfortable using the SDA on your host computer, you can flip through this section to find out which commands and orders the terminals support. You can then read Section 7, which describes the extended commands you can use to do operations beyond the capability of the IBM Display Station.
Applications If you need to write applications specifically for the terminal, it is recommended that you use the corner mode window onto the IBM Display Station and write programs using the portion of the display available without moving the window. This is the most efficient method for developing custom applications for the terminal.
TE 2000t 5250 Terminal Emulation Programmer’s Guide
6-1
Page 178
SECTION 6
Display Data Stream
Data Stream Command Structure The 5250 command structure enables the terminal to display prompts and accept keyboard or scanner input. A second kind of command, called an order, works with the Write-To-Display command to define display characteristics, buffer sizes, and acceptable data types. Display data stream commands form two categories: the input commands and the output commands. The IBM 5250 Information Display System Functions Reference Manual (IBM part number SA21-9247-6 provides more detailed descriptions than those presented in this programmer ’s guide).
Input Commands and Hex Codes Below are the input commands and hex codes. Pages reference additional information about each command. " " " " " " " "
Read Immediate (page 6-3) Read Modified Immediate Alternate (page 6-4) Read Input Fields (page 6-4) Read MDT Fields (page 6-6) Read MDT Alternate (page 6-7) Read Screen (page 6-7) Save Screen (page 6-8) Write Structured Field
72 83 42 52 82 62 02 Not supported
Output Commands and Hex Codes Below are the output commands and hex codes. Pages reference additional information about each command. " " " " " " "
6-2
Clear Format Table (page 6-9) Clear Unit (page 6-10) Clear Unit Alternate Restore Screen (page 6-10) Roll (page 6-11) Write Error Code (page 6-12) Write to Display (WTD) (page 6-13)
TE 2000t 5250 Terminal Emulation Programmer’s Guide
50 40 Not supported 12 23 21 11
Page 179
SECTION 6
Display Data Stream
Input Commands Input commands consist of immediate and AID-associated Read commands. Immediate commands are executed when the controller receives the command. AID-associated commands are queued until the operator presses an AID-generating key such as Enter/Rec Adv. Other AID-generating keys are listed in the section for each terminal.
Read Immediate Function
The Read Immediate command is similar to the Read Screen command, except the data comes from the format table rather than the display. The command sends back the contents of all the input fields on the display.
Restrictions
This command must be the last command in the chain and the controller must have change of direction (CD). The command is rejected if the terminal is in an error, system request, or SS message state. " NOTE:
If the display supports a separate message line, and the message line is selected, the command is rejected only for the system request and SS message states. The command is processed with the display in error state.
Format
The command takes the following form: ESC
Read Immediate Command
Hex 04
Hex 72
Results
Information associated with this command returns to the user in the LU-LU nonexpedited flow. What the user receives when they issue this command depends on the condition of the master modified data tag (MDT) bit: If the MDT bit is not set, the user receives: Cursor Address AID Code " If the master MDT bit is set, the user receives: Cursor Address AID Code Field Data The field data consists of the contents of all input fields as they appear on the display, unless resequencing has been specified. Any attributes contained in a field are treated as data and returned as such. Field boundary attributes are not considered part of the field. All nulls are converted to blanks. If the specified field is a signed numeric field, the last character is not sent. "
If that same field is negative, the zone position of the next-to-the-last character is changed to hex D. In each case, the returned cursor address indicates the current location of the cursor and the AID code is hex 00. " NOTE:
Queued Read commands and pending AID codes are not cleared. The format table, display annunciators, insert mode keying history, and display contents are not affected.
TE 2000t 5250 Terminal Emulation Programmer’s Guide
6-3
Page 180
SECTION 6
Display Data Stream
Read Modified Immediate Alternate Function
The Read Modified Immediate Alternate command enables the host to read data from modified input fields without depending on the operator to press an AID request key.
Restrictions None.
Format The command takes the following form: ESC
Read Modified Immediate Alternate Command
Hex 04
Hex 83
Results
This command is processed the same as the Read Immediate command, except for these differences in the format of data sent to host: "
"
"
"
Controller only returns data from those fields in the format table that have the MDT bit on. Data field is delimited by Set Buffer Address (SBA) orders in the same way as the response data field for the Read MDT Fields command. Leading and imbedded nulls within each field’s data are not converted to blanks. Trailing nulls within each field’s data are suppressed.
Read Input Fields Function
The Read Input Fields command causes the terminal to wait for the operator to press an active AID-generating key, then sends the contents of all fields defined in the format table to the host.
Restrictions The operator must press an AID-generating key to execute this command. Also, CD in the Request/Response Header (RH) must be on before the AID byte can be serviced. This command is cleared if: " "
"
"
The host system issues a session control request (such as Unbind). The host system issues a Clear Unit command and the controller executes it. The host system sends another Read command to the same LU and overlays this command. The Read command is executed.
Format The command takes the following form:
6-4
ESC
Read Input Fields Command
CC Byte 1
CC Byte 2
Hex 04
Hex 42
Hex 00
Hex 13
TE 2000t 5250 Terminal Emulation Programmer’s Guide
Page 181
SECTION 6
Display Data Stream
Results
Information associated with this command returns to the user in the LU-LU nonexpedited flow. Note that the host system cannot receive this information until the operator presses an AID-generating key. What the user receives when they issue this command depends on the condition of the master MDT bit: "
"
"
If the master MDT bit is not set, the user receives: Cursor Address AID Code " Cursor Address: Position of the cursor when the AID-generating key was pressed. " AID Code: Code for the AID-generating key the operator used. The user receives the cursor address and AID code if any of the following keys are pressed: Clear Help Print Record Backspace in home position If the master MDT bit is on, the user receives: Cursor Address AID Code Field Data " Cursor Address: Position of the cursor when the AID-generating key was pressed. " AID Code: Code for the AID-generating key the operator used. " Field Data: Returned only when one of the following AID-generating keys is used: Roll Up Roll Down Enter/Rec Adv An unmasked function key When it is returned, the field data consists of the contents of all input fields as they appear on the display unless resequencing was specified.
Any attributes in a field are treated as data and returned as such. Field attributes are not considered part of the field. All nulls are converted to blanks. All pending AID request bytes are cleared. If the specified field is signed numeric, the first character is not sent; if that same field is negative, the zone position of the next-to-the-last character is changed to hex D. Though data is not sent, the CC bytes are processed. To determine the appropriate codes for the control character (CC) bytes, see the “Write To Display” topic (page 6-13).
Format The format of the returned data is: Bytes 1 and 2
Byte 3
Byte 4
Byte 5
Cursor address
AID code
Field data
Field data
Byte 6 and all that follow contain the remaining field data from the format table. The terminal returns complete contents of each field, with nulls converted to blanks.
TE 2000t 5250 Terminal Emulation Programmer’s Guide
6-5
Page 182
SECTION 6
Display Data Stream
Read MDT Fields Function
The Read MDT Fields command causes the terminal to wait for the operator to press an active AID-generating key, then sends all fields that have their MDT bit set. The bit could have been set by the operator entering data in the field or by the WTD command.
Restrictions
The operator must press an AID-generating key to execute this command. In addition, the CD in the RH for the requested LU must be on before any information can be sent back to the host system in response to the command. The command is cleared if: " " "
"
A session control request (such as Unbind) is issued by the host. A Clear Unit command is issued. The host system sends another Read command to the same LU and overlays this command. The Read command is serviced.
Format
The command take the following form: ESC
Read MDT Command
CC Byte 1
CC Byte 2
Hex 04
Hex 52
00
13
The format of the returned data is: Byte 1 and 2
Byte 3
Cursor address AID code " NOTE:
Byte 4
Byte 5
Byte 6
{SBA
Field address
Field data}
The {} brackets around the last three fields indicate these fields may be repeated as a unit.
The cursor address gives the cursor location on the display. The SBA fields are formatted as Set Buffer Address orders. The field address comes from the address portion of the order and gives the address of the modified field (excluding the attribute).
Results
The contents of each field that has an MDT bit on are returned to the host system in the order that the fields appear in the format table, if one of the following AID-generating keys is used: Roll up/Page down Roll down/Page up Enter/Rec Adv Unmasked function keys If no MDT bits are on, or if the operator does not use one of the acceptable AIDgenerating keys (Clear, Help, Print, or Record Backspace), only the cursor and AID code are returned to the host system. The host system can use field control words (FCWs) to rearrange the sequence in which the fields are returned. If data is returned, the following formatting is done. If the field is not a transparent data field, the following occurs: "
"
6-6
Trailing nulls are stripped. If the field consists of all nulls, only the Set Buffer Address, row, and column are returned. Leading and embedded nulls are converted to blanks.
TE 2000t 5250 Terminal Emulation Programmer’s Guide
Page 183
SECTION 6
Display Data Stream
If the field is signed numeric, the last character is not sent. If that same field is negative, the zone position of the next-to-the-last character is changed to hex D. Hex 10 and hex 11 are control data. Avoid writing hex 10 and hex 11 to the display as data unless they are written in transparent data fields.
Read MDT Alternate Function
Read MDT Alternate is similar to the Read MDT Fields command with these exceptions: "
"
Leading and embedded nulls within the fields remain nulls. Trailing nulls are stripped. For fields that are nulls but have their MDT bit on, the controller returns an SBA order followed by the field’s address.
Restrictions None.
Format None.
Results None.
Read Screen (Immediate) Function
The Read Screen command sends the contents of the display to the host in the same order information appears on the screen. For example, row 1 goes first.
Restrictions
This command must be the last command in the SNA chain, and CD must be on. The terminal rejects the command when it is in the prehelp error, posthelp error, system request, or SS message state. During transmission the keyboard is locked, but pending AID requests or Read commands are retained. " NOTE:
If the display supports a separate message line, and the message line is selected, the command is rejected only for the system request and SS message states. The command is processed with the display in error state.
Format
The command takes the following form: ESC
Read Screen Command
Hex 04
Hex 62
TE 2000t 5250 Terminal Emulation Programmer’s Guide
6-7
Page 184
SECTION 6
Display Data Stream
Results
The contents of the entire display, including the attributes, is sent to the host system just as it appears in the regeneration buffer (no formatting or conversion is done). Cursor address and AID are not returned. This command does not clear either pending Read commands or AID requests. The keyboard is temporarily locked. The following are unaltered: " " "
Annunciators Cursor location Modes
Keying history " Display contents " Format table "
Save Screen (Immediate) Function
The Save Screen command sends the state of the terminal to the host. Information sent to the host includes: " " " "
Format table Display buffer Keyboard state Cursor location
Code returned in response to the Help key " Any outstanding AID requests " Any outstanding Read commands "
Restrictions
This command must be the last command in the SNA chain and CD must be on. The command is rejected if the addressed LU is in either the system request or SS message state.
Format
The command takes the following form: ESC
Save Screen Command
Hex 04
Hex 02
The format of the returned data is: Byte 1
Byte 2
Byte 3
Byte 4
Escape
Restore Screen
<terminal state>
<terminal state>
Byte 5 and all remaining bytes contain the Save Screen information.
Results
All data required for restoring the display are sent to the host system. It must not be modified by the host system if the result of the Restore Screen command is to have integrity.
6-8
TE 2000t 5250 Terminal Emulation Programmer’s Guide
Page 185
SECTION 6
Display Data Stream
Output Commands Some output commands have associated data and control information (write characters and orders). The Write commands are executed immediately.
Clear Format Table Function
The Clear Format Table command clears the format table without erasing data in the display buffer.
Restrictions
The terminal rejects the command when in an error, system request, or SS message state. " NOTE:
If the display supports a separate message line, and the message line is selected, the command is rejected only for the system request and SS message states. The command is processed with the display in error state.
Format
The command takes the following form: ESC
Clear Format Table Command
Hex 04
Hex 50
Results
The following list describes what happens when this command is executed. "
"
"
" " " "
" NOTE:
The keyboard is locked. The keyboard clicker is turned off. The Input Inhibited annunciator is turned on. The insert mode is cleared (as is the annunciator). The format table is cleared. The format table header formats as follows: Format ID Hex 00 First field transmitted to host system 0 (Resequencing is disabled) Error line Bottom line of display The system insert cursor address is set to row 1, column 1. This clears a previous Insert Cursor order. Any pending AID request is cleared. All keying history is cleared. The master MDT bit is cleared. A blinking cursor caused by waiting for a required Field Exit key is reset.
Operator-selected reverse image and the Message Waiting annunciator are not affected by this command.
TE 2000t 5250 Terminal Emulation Programmer’s Guide
6-9