The text of a manual · part 19 of 32
3270 Terminal Emulation Programmer's Reference Guide: Section 9: Data Stream Commands, pages 173 to 180
Pages 173 to 180 of 278, from 3270 Terminal Emulation Programmer's Reference Guide
The original document is the PDF (2.1 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 173
SECTION 9
"
Data Stream Commands
3270 Data Stream Format The 3270 data stream wireless station command format (WtDxyz) is an asynchronous format that an asynchronous host uses to send data to the wireless station. Syntax
Controller Response
R Response
WtDxyz<cr>
None tKas{Atu.../Atu}<cr>
Variables: t =
Wireless station number x=
3270 data stream command: ? Erase All Unprotected 5 Erase/Write = Erase Write Alternate 2 Read Buffer 6 Read Modified > Read modified all G Reset wireless station 4 SSCP 1 Write y=
3270 write control character (WCC) Bit 0 Reset MDT bits Bit 1 Keyboard restore Bit 2 Sound alarm z=
Wireless station orders or <1024 characters a=
AID key code s=
4-byte right-justified, zero-filled address of the current cursor position when the AID key was pressed (values 0--1919)
/At = Set Buffer order followed by a 4-byte rightjustified, zero-filled address of the field from where the data is returned u = Data entered or modified for this field {} = Optional 3270 Terminal Emulation Programmer’s Reference Guide
9-9
Page 174
SECTION 9
EXAMPLE:
"
Data Stream Commands
Command:
W000D5G/A0000/F’ID:/F@%/A0017/F’/A0081/ DESCRIPTION:/A0160/F@%/A0177/F’/A0241/ QUANTITY:/F@&/A0253/F’<cr>
This command is for an RT1140 in the window and 16x9 display mode. The command displays the following on the RT1140 Radio Terminal:
ID:% DESCRIPTION: % QUANTITY:&
If the user enters “210458236” for the ID field, “PEACH CRATES” for the description field, and “85” for the quantity field, the screen displays:
ID:210458236 DESCRIPTION: PEACH CRATES QUANTITY: 85
When the wireless station operator presses [ENTER], the host receives the following response: 000K’0252/A0004210458236/A0161PEACH CRATES/A025085
9-10
3270 Terminal Emulation Programmer’s Reference Guide
Page 175
SECTION 9
"
Data Stream Commands
Orders Wireless station orders may be included in each 3270 data stream command, either alone or intermixed with display data. Wireless station orders are executed sequentially, and only after the complete data stream has been received by the wireless station and checked for errors. Orders are not stored in the display buffer with other data in the data stream. For the asynchronous data stream, they are added to the data stream following a “/” character. Buffer control orders position, define, and format data being written into the buffer. They also erase selected unprotected data in the buffer and reposition the cursor address. Table 9-1 lists the orders. Table 9-1 3270 Data Stream Orders Code SNA/ SDLC
Asynch.*
Byte 2
Byte 3
Erase Unprotected to Address
12
/Exxxx
1st address byte
2nd address byte Not used
Insert Cursor
13
/C
Not used
Not used
Not used Not used
Order
Byte 4
Program Tab
05
/P
Not used
Not used
Repeat to Address
3C
/Rxxxxy
1st address byte
2nd address byte Character to be repeated
Scanner
1F
/Sttt
Bar code control byte
1st option byte
Set Buffer Address
11
/Axxxx
1st address byte
2nd address byte Not used
Start Field
1D
/Fa
Attribute character
Not used
2nd option byte Not used
* xxxx = a 4-byte buffer address, 0 to 1919, right-adjusted, zero-filled y = character to be repeated ttt = scanner order designator a = an attribute byte 3270 Terminal Emulation Programmer’s Reference Guide
9-11
Page 176
SECTION 9
"
Data Stream Commands
The following pages describe buffer control orders, which are executed sequentially at the selected wireless station, after the complete data stream has been received by the station and checked for data integrity. These orders are not stored in the display buffer. Most of the buffer control orders in Table 9-1 position, define, and format data being written into the buffer, erase selected unprotected data in the buffer, and reposition the cursor address. The Scanner order is an extension of the 3270 data stream and is not supported by the 3278 Model 2.
Erase Unprotected to Address (EUA) Order The EUA order inserts nulls in all unprotected buffer locations, starting at the current buffer address and ending at (but not including) the specified stop address. For the asynchronous data stream, the stop address is specified by address bytes “xxxx” which immediately follow the EUA order in the write data stream. For SNA/SDLC, the stop address is specified by the two address bytes which immediately follow the EUA in the write data stream. If an invalid stop address is specified (that is, an address outside the range of the wireless station’s display buffer) the following occur (not necessarily in the order listed): " The write operation is terminated at this point. " The character is not stored. " The wireless station recognizes this as an error condition. " The wireless station performs a clear memory operation. " The display buffer is set to nulls. " A clear AID character is transmitted to the wireless station control unit for forwarding to the host computer. 9-12
3270 Terminal Emulation Programmer’s Reference Guide
Page 177
SECTION 9
"
Data Stream Commands
When the stop address is lower than the current buffer address, the EUA order wraps from the end of the buffer to the beginning of the buffer and continues. When the stop address equals the current buffer address, all unprotected character locations in the buffer are erased (set to nulls).
Insert Cursor (IC) Order The IC order changes the stored cursor address to the location specified by the current buffer address. The current buffer address does not change. For example, if the IC order is issued when the current buffer address is 320 and the present stored cursor address is 0 (zero), the cursor address changes from 0 to 320. The current buffer address at the end of this operation remains at address 320. If multiple IC orders appear in the write data stream, the last one encountered is used in subsequent operations. If the IC order is placed at a location past the end of display on the wireless station, the current buffer address will be updated so that the cursor address will be located on the display. At the end of write data stream, after all orders have been executed by the wireless station and all required data has been entered into the buffer, the stored cursor address determines which unprotected field should be displayed to the user first. The following algorithm is used: 1. The wireless station searches the buffer backward to find the first protected field attribute before the stored cursor address. Unprotected attributes are not considered. 2. The wireless station then executes a forward tab (or equivalent) to an unprotected field.
3270 Terminal Emulation Programmer’s Reference Guide
9-13
Page 178
SECTION 9
"
Data Stream Commands
3. If a protected field attribute is not found before the first location of the display buffer is found (location 0), then an unconditional forward tab equivalent will be executed, causing the first unprotected field in the buffer to be displayed.
Program Tab (PT) Order The PT order advances the current buffer address of the first character position to the next unprotected field. Special conditions are as follows: "
"
"
If the PT order is issued when the current buffer address is the location of an attribute byte of an unprotected field, the buffer address is set to the next location of that field (location 1). If a PT order follows data, the rest of the field is nullfilled. If a PT order in the write data stream does not follow a control command, order (or order sequence such as WCC), Insert Cursor order, or Repeat to Address order (4-character sequence), nulls are inserted from the current buffer address to the end of the field.
When the PT order follows a control command, order, or sequence order, the buffer content is not modified for that field. The PT order stops its search at the last location in the buffer. If an attribute character for an unprotected field is not found by this point, the buffer address is set to 0 (first location of the buffer). If the PT order finds an unprotected attribute in the last location of the buffer, the buffer address is still set to location 0. "
9-14
3270 Terminal Emulation Programmer’s Reference Guide
Page 179
SECTION 9
"
Data Stream Commands
To continue the search for an unprotected attribute, a second PT order must be issued immediately following the first one. Since the current buffer address was set to 0 by the first PT order, the second PT order begins its search starting at location 0. If the previous PT order was inserting nulls in each character location when it was terminated at the last buffer location, the new PT order will continue to insert nulls from buffer location 0 to the end of the current field.
Repeat to Address (RA) Order The RA order stores a character “y” in all buffer locations starting at the current buffer address and ending at (but not including) the specified stop address. For the asynchronous protocol, the stop address is “xxxx.” The stop address and the character to be repeated are identified by the five bytes immediately following the RA order in the write data stream. For the SNA/SDLC protocol, the third character following the RA order is always interpreted as the character to be repeated. If an invalid stop address is specified (such as an address outside the range of the wireless station’s display buffer), the following occur (not necessarily in the order listed): The write operation is terminated at that point. " The character is not stored. " The wireless station recognizes this as an error condition. " The wireless station automatically performs a clear memory operation. " The entire display buffer is set to nulls. " A clear AID character is transmitted to the wireless station control unit for forwarding to the host. "
3270 Terminal Emulation Programmer’s Reference Guide
9-15
Page 180
SECTION 9
"
Data Stream Commands
When the stop address is lower than the current buffer address, the RA operation wraps from the end of the buffer to the beginning of the buffer and continues. When the stop address equals the current buffer address, the specified character is stored in all buffer locations. Attribute characters will be overwritten by the RA order if they occur before the RA order stop address.
/Sttt Scanner (SCN) Order The SCN order is an extension to the 3270 data stream and is not supported by IBM display terminal. The order tells the wireless station which bar code algorithm to apply to the bar code data read by the bar code reading device, and what the minimum and maximum length range of a valid decode is. When auto-discriminating bar codes, the probability of a cross-substitution increases. To reduce this probability, the application can enable only certain algorithms and specify what the minimum and maximum number of characters needed for a good decode are. The SCN parameters are stored in the wireless station and do not need to be sent with every Write command. These parameters are in effect for all data fields (that is, they are not specific to any one field). If the decoded data is not within the bounds of the SCN parameters, then the decode is considered to be bad. If the decode meets the SCN parameters, then the data is passed to the keyboard handler which may reject the data if it does not fit the target field attributes.
9-16
3270 Terminal Emulation Programmer’s Reference Guide