The text of a manual · part 23 of 33
TE 2000 5250 Terminal Emulation Programmer's Guide: Section 6: Display Data Stream, pages 186 to 194
Pages 186 to 194 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 186
SECTION 6
Display Data Stream
Clear Unit Function This command clears the display and format table.
Restrictions The terminal rejects the command when it is in the SS message state.
Format The command takes the following form: ESC
Clear Unit Command
Hex 04
Hex 40
Results When the terminal receives the Clear Unit command, these occur: "
"
" " " " "
"
" NOTE:
The keyboard locks. The Input Inhibited annunciator is turned on. The error state (or system request state) is cleared. The shift, alternate, function, and insert modes are cleared. The format table is cleared. Because this is not format level 0, a default header is assumed. The MDT bit is cleared. All function keys are set up to return data. The display is cleared by writing nulls to the display buffer. A normal attribute is written byte to row 1, column 1 of the display. The cursor is placed at row 1, column 2; this makes the insert cursor address. Any AID requests and pending Read Input Fields or Read MDT Fields commands are cleared.
Operated-selected reverse image and the Message Waiting annunciator are not affected by this command.
Restore Screen Function The Restore Screen command restores all data stored by the last Save Screen command.
Restrictions The terminal rejects this command when it is in a system request or SS message state.
Format The command takes the following form:
6-10
ESC
Restore Screen Command
Data From Last Save Command
Hex 04
Hex 12
<saved data>
TE 2000t 5250 Terminal Emulation Programmer’s Guide
Page 187
SECTION 6
Display Data Stream
Results
The following describes what happens when this command is executed. These are restored: " Contents of the display. " Contents of the format table. " State of the keyboard, including the insert mode with the annunciators. " Location of the cursor and the way it was displayed. " System insert cursor address. " State of the master MDT bit. " Error code and any explanatory information provided by the host system in the Write Error Code command, if the terminal was in an error state. The error code and any information are returned via the operator ’s use of the Help key. " Requirements to send LU-LU Lustat when error line is available. " Any Read command that was pending at the time. " Any AID requests that were outstanding at the time of the Save Screen command. These conditions from the previous save are not restored: " Condition of the Shift key and the associated annunciator. " Status of the Message Waiting annunciator. " The current status of the hex mode is reset. The following conditions cause parameter errors: " Invalid data is detected. " The required amount of data is not received. " NOTE:
A Clear Unit command is executed if an error is detected.
Roll Function
The Roll command causes the image presented in the terminal display to roll up or down across the larger image area available on the IBM Display Station.
Restrictions
The command is rejected if the display is in the prehelp error, posthelp 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 system request and SS message states. The command is processed with the display in error state.
Format
The command consists of five bytes in the following form: Row Number ESC
Command
Direction
Top
Bottom
Hex 04
Hex 23
Hex 08
Hex 01
Hex 23
Bits in the direction byte define the direction and number of lines to roll. See the following chart for the bit meanings. Bit 7 is the most significant bit. TE 2000t 5250 Terminal Emulation Programmer’s Guide
6-11
Page 188
SECTION 6
Display Data Stream
Bit
Description
7
0 = Roll up 1 = Roll down Number of lines to roll
6 through 0
The top row number tells the first line for inclusion in the roll. Bottom row number tells the last row number to include. Top and bottom row numbers together define the number of lines presented on the display for the roll.
Results
The following conditions govern the Roll command: " Lines vacated due to the Roll are not cleared to nulls. " Format table is not changed (could cause bizarre results). " NOTE:
If display does not conform to the format table, roll should not be done.
Rolled over data is lost. " The lines rolled out of the area are lost (cannot be rolled back onto screen). " The state of the keyboard is not affected. " Pending AID bytes are not affected. " The following conditions cause parameter errors: A top line of zero. A top line greater than or equal to the display length. A bottom line of zero. A bottom line greater than the display length. A top line greater than or equal to the bottom line. A roll area greater than the bottom line minus the top line. A scroll distance of zero has no effect on the display. "
Write Error Code Function
The Write Error Code command forces the terminal into the prehelp state (the same state the terminal enters when the operator makes a keying error).
Restrictions
A Write Error Code clears any outstanding AID requests. The terminal rejects this command if it is in the prehelp, system request, or SS messages state.
Format
The command may take any of the following forms. The Insert Cursor (IC) order may also be embedded in the error message. " NOTE:
6-12
Headings in brackets indicate the individual field can be omitted. However, both fields cannot be omitted. Provide either an Insert Cursor order or error message to avoid an error. ESC
Write Error Code Command
Insert Cursor Order
Hex 04
Hex 21
Position cursor
ESC
Write Error Code Command
Error Message
Hex 04
Hex 21
<message text>
ESC
Write Error Code Command
Insert Cursor Order
Error Message
Hex 04
Hex 21
Position cursor
<message text>
TE 2000t 5250 Terminal Emulation Programmer’s Guide
Page 189
SECTION 6
Display Data Stream
Results
You can use the IC order to place the cursor at the beginning of the field where the error occurred. This helps the operator find the source of the error. The IC order does not affect where the error message is written. The terminal writes only the first 78 bytes of the error message to the error line. If the error line is already used for error presentation, the terminal saves data on the error line and restores it after the operator presses the Reset key. When the operator presses the Help key (prehelp error state only) in response to the error condition, characters from columns 2, 3, 4, and 5 of the error line are returned to the host system in a packed form and sent as a Signal command. These characters form an index code that elicits a user-generated description of the error for the operator. Prehelp error state is selected for the keyboard. " Input Inhibited annunciator is on. " Insert mode and Insert annunciator are cleared. " Command, dead key diacritic, and hex modes are cleared. " Cursor is blinking. " The line in the format table header defined as an error line is saved. " Cursor moves to the location specified by the IC order. If no IC order is given, the cursor does not move. " All characters (except IC order) found between the command byte and the end of the chain or next ESC are written on the error line. If the data exceeds 80 characters, an error occurs. " All outstanding AID bytes are cleared. " When the operator presses [HELP], the controller places a nonblink high intensity attribute in column 1 of the error line, replacing anything that was previously there. " The locked state of the keyboard is cleared if the keyboard was locked and the terminal was not in a posthelp error state. This allows the operator to release the keyboard by pressing the Reset key. The following conditions cause parameter errors: "
" " "
Neither an IC order nor data follows the command. Invalid IC order. More data than 80 bytes is specified.
Write to Display (WTD) Function
The WTD command does the following: " " " "
Modifies the format table and display buffer contents. Governs MDT flags and Message Waiting annunciator. Nulls nonbypass fields. Controls keyboard lock and cursor blink.
TE 2000t 5250 Terminal Emulation Programmer’s Guide
6-13
Page 190
SECTION 6
Display Data Stream
Restrictions
This command is rejected if the display is in a prehelp error, posthelp error, system request, or SS message state. If the display supports a separate message line, and the message line is selected, then only system request or SS message state result in a contention state error. If the error line is in use, however, and the WTD attempts to redefine the error line (using Start of Header byte 4), a negative response is generated.
Format
The WTD command takes either of the following forms.
" NOTE:
ESC
WTD Command CC Byte 1
CC Byte 2
Orders or Data
Hex 04 Hex 04
Hex 11 Hex 11
Hex 13 Hex 13
<orders> <data>
Hex 00 Hex 00
CC Byte 1 and CC Byte 2 are the write control characters. CC Byte 1 may do the following: Clear the master MDT flag and reset the MDT flags. Null all appropriate nonbypass fields. CC Byte 2 sets the following: Cursor blink Keyboard lock Alarm Message Waiting annunciator
Orders are described in detail starting on page 6-15. Any character that is not an order and not associated with an order is considered data, and is written on the screen at the current display address. The address is then incremented by 1 for each character written. These characters should be hex 00, hex 1C, or above hex 1F, so there is no conflict with the codes reserved for orders.
Results
If the WTD command changes the format table, the keyboard remains locked until specifically unlocked by CC Byte 1 or a subsequent WTD command. See Table 6-1 to determine the appropriate command for your particular combination of needs. To select a command, check the body of the table for the row showing the desired combination of conditions. Then refer to the left-most column to find the corresponding hex code. Table 6-1 Write to Display Control Byte 1 Clear Master MDT Null All Appropriate and Reset MDT Flags Nonbypass Fields Hex Code Reset Pending AID, Lock Keyboard 00 20 x 40 60 80 A0 C0 E0 6-14 x x x x x x
TE 2000t 5250 Terminal Emulation Programmer’s Guide
Nonbypass Fields
All
Field with MDT On
All x x x x x x x x x
Page 191
SECTION 6
Display Data Stream
Below are the bit positions for CC byte 2. The most significant bit is 7; the least significant bit is 0. Invalid orders or no data, orders, or CC following the command byte cause parameter errors: Description Bit 7 Always 00 6 0 = Cursor moves to default or IC order position when keyboard unlocks. * 1 = Cursor does not move when keyboard unlocks. 5 0 = No action; 1 = Reset blinking cursor 4 0 = No action; 1 = Set blinking cursor (if reset bit also = 1) 3 0 = No action; 1 = Unlock keyboard, reset pending AID bytes 2 0 = No action; 1 = Sound alarm 1 0 = No action; 1 = Reset Message Waiting annunciator 0 0 = No action; 1 = Set Message Waiting annunciator (even if bit 5 is set to 1) * Exception: When a WTD is received with the keyboard unlocked and the WTD does not modify the keyboard state.
Orders The following pages describe the host 5250 data stream orders the host can send to terminals on the network. Orders govern format and data expectations within the WTD command (page 6-13). The host application can include terminal orders in the WTD command, alone or intermixed with display data. The terminal executes orders sequentially and does not store orders in the display buffer with other data in the data stream. Five buffer control orders position, define, and format data written into the buffer, erase selected unprotected data in the buffer, and reposition the cursor. The TD order writes transparent data to the display. Below are the orders and hex codes. Pages reference additional information about each order. " Insert Cursor (IC) (next page) 13 " Move Cursor (MC) (page 6-16) 14 " Repeat to Address (RA) (page 6-17) 02 " Set Buffer Address (SBA) (page 6-17) 11 " Start of Field (SF) (page 6-18) 1D " Start of Header (SOH) (page 6-22) 01 " Transparent Data (TD) (page 6-24) 10
Insert Cursor (IC) Function
The IC order either sets the system insert cursor (IC) address to the location specified by the 2 bytes that follow the order when it is included in the WTD command, or moves the cursor to the specified address without affecting the system IC address when it is included in the Write Error Code command. Byte 1 gives the row address and byte 2 gives the cursor address. " NOTE:
If multiple IC orders appear in the Write data stream, the last one encountered is used in subsequent operations. TE 2000t 5250 Terminal Emulation Programmer’s Guide
6-15
Page 192
SECTION 6
Display Data Stream
Restrictions A parameter error is posted when: " " "
There are fewer than 2 bytes following the order. The row address equals 0 or is greater than 24. The column address equals 0 or is greater than 80.
Format The order takes the following form: Insert Cursor Order Row Address
Column Address
Hex 13
Hex 01
Hex 01
Results
When the order is used in the WTD command, the cursor is not immediately moved; the address is saved for later use. The cursor is moved when the entire WTD is completed. When the order is used in the Write Error Code command, the cursor is moved to the address given in the IC order and does not affect the system IC address. The cursor exits the field regardless of the type and does not perform any field checks. For example, it does not check for a filled field for a field specified as mandatory fill. You can use the IC order in the Write Error Code command to tell the terminal operator where an error has occurred. Maximum row and column addresses are determined by the character size selected through the terminal’s TE configuration menus or firmware.
Move Cursor (MC) Function
The MC order enables the host to move the cursor to a specified position without modifying the home address, and without regard to the keyboard’s state.
Restrictions None.
Format The order takes the following form: MC Order
Row Address
Column Address
Hex 14
1 byte
1 byte
If the WTD data stream contains multiple IC or MC orders, the last IC or MC order determines the cursor position. The IC order negates any previously coded MC orders and the MC order negates any previously coded IC orders, with the exception that the last IC order establishes home position. To set the home position and then move the cursor, code the IC order, and then the MC order. WTD control character values do not affect the MC order, including the move cursor flag. See page 6-15 for more information.
Results None. 6-16
TE 2000t 5250 Terminal Emulation Programmer’s Guide
Page 193
SECTION 6
Display Data Stream
Repeat to Address (RA) Function
The RA order stores a specified alphanumeric or null character in all buffer locations starting at the current buffer address and ending on the specified stop address. This stop address and the character to repeat are identified by the three bytes immediately following the RA order in the Write data stream. You can use RA orders to fill an area of the display.
Restrictions
A parameter error is posted when: " Fewer than three bytes follow the order. " A row address equals 0 or is greater than 24. " The specified ending address is less than the current display address. " NOTE:
Although any character can be repeated, avoid using hex 11 (SBA orders), because this value is the delimiter between the fields sent in response to the Read MDT Fields command.
Format None.
Results
The character is repeated from the current display address through the ending display address specified. The current display address is then updated to the value of the last position +1.
Set Buffer Address (SBA) Function
The SBA order specifies a new buffer address from which operations are to start or continue. You can use the SBA order to: " Write data into various areas of the buffer. " Precede another order in the data stream to specify the starting address for an RA order. " Specify the address at which an attribute byte is stored by a SF order.
Restrictions
A parameter error is posted when: " Fewer than two bytes follow the order. " The row address is equal to 0 or greater than 24. " The column size equals 0 or is greater than 80. Default. When the SBA is not specified in the WTD command, the data starts at row 1, column 1. This is where the WTD command initialized it.
Format
The SBA order takes the following form: SBA Order
Row Address
Column Address
Hex 11
Hex 01
Hex 01
Row addresses begin with 1, as do column addresses. However, the terminal accepts column address hex 00 and translates it to column 1. TE 2000t 5250 Terminal Emulation Programmer’s Guide
6-17
Page 194
SECTION 6
Display Data Stream
Start of Field (SF) Function
The SF order defines input and output fields. If an input field is being defined, it also resets any pending AID byte and locks the keyboard. " NOTE:
Although this order can be used for output fields, it is not recommended because it degrades performance. Use the SBA order instead.
Restrictions None.
Format
SF order takes the following form with minimal information: SF Order
Attribute
Length
Hex 1D
Hex 01
Hex 0012
You may also include format and control information in the SF order. In these cases it takes one of the following forms: " NOTE:
Brackets around “format” and “control” headings indicate these fields are optional. SF Order
[Format]
Attribute
Length
Hex 1D
Hex 4000
Hex 01
Hex 0012
SF Order [Format]
[Control] ]
Attribute
Length
Hex 1D
Hex 8102
Hex 01
Hex 0012
Hex 4000
You can only include the control word after you have provided a format word. You can also insert several control words between the format and attribute portions of the SF order, but these control words are not required. The following paragraph describes the format portion, page 6-21 describes the control portion, and page 6-21 has the attribute portion of the SF order. The 2-byte Field Format Word (FFW) contains the information listed on page 6-21. Format Portions of SF Order
Within the format portion of the SF order, the two most significant bits (15 and 14) must always be hex 01. See below for descriptions of bits 13 through 0. Description Bit 14–15 Always 01 (reserved) Bit 15 is the most significant bit. 13 0 = Nonbypass field; 1 = Bypass field. 12 0 = Duplication not allowed; 1 = Duplication allowed 11 0 = Field was not modified (MDT) bit; 1 = Field was modified 10–8 000 = Alpha shift; 001 = Alpha only; 010 = Numeric shift; 011 = Numeric only; 100 = Katakana shift (not supported); 101 = Digits only; 110 = I/O (feature input field); 111 = Signed numeric 7 0 = Auto enter disabled; 1 = Auto enter when field is exited 6 0 = Field Exit key is not required; 1 = Field Exit key is required 5 0 = Accept lowercase letters; 1 = Translate lowercase to uppercase 4 Reserved 3 0 = No mandatory entry; 1 = Mandatory entry 2–0 000 = No adjustment; 001 = Reserved; 010 = Reserved; 011 = Reserved; 100 = Reserved; 101 = Right adjust, zero fill; 110 = Right adjust, blank fill; 111 = Mandatory fill 6-18
TE 2000t 5250 Terminal Emulation Programmer’s Guide