• Aucun résultat trouvé

Error Recovery Procedures

Dans le document Reference Manual and Programming Guide (Page 169-180)

* RESET BIT PRIN FOR TOUT MAT START PRINT ALARM SOUND RESTORE KYBD RESET MDT

1 READ HEADING

6.4 IBM 7171 to Host Interactions

6.4.2 Error Recovery Procedures

IBM 7171 Device Detected Errors

Error conditions detected by the IBM 7171 or by an attached device are indicated to the program by Unit Check status. The program must respond to this status by using a Sense command for further definition of the condition. If a Sense

command is not performed and the sense conditions still exist, the control unit will not honor any other interrupts from the device. Subsequent recovery operations are then determined by the combined configurations of Unit Check status bits and associated sense bits.

Referenced Error Recovery Procedures

Inbound Transmissions

The recovery procedures referenced in the Error Recovery Procedure column of Figure 6-19, Figure 6-20, and Figure 6-21 are as follows:

1. Reconstruct the entire buffer image and retry the failing chain of commands.

The sequence of commands used to reconstruct this image should start with an Erase/Write command. If, after two retries, the problem is not corrected, follow procedure 5.

2. The error indicates the device is unavailable. Request and wait for operator intervention to ready the device and upon receipt of Device End status, retry the chain of commands.

3. A nonrecoverable program error has occurred. Examine the data stream to locate the problem.

4. Retry the failing chain of commands. If, after two retries, the problem is not corrected, follow procedure 1. A Write command can be retried if new fields have not been created in the buffer portion which has been cleared by a Program Tab or Erase Unprotected to Address order.

5. Request maintenance for the device that is giving trouble. After the repair, reconstruct the buffer image, starting with an Erase/Write command.

Terminals are put in a keyboard lock state when an AID generating key (such as an Enter) is hit. This can be reset by a Write, Erase/Write, or Erase/Write Alternate with the WCC Keyboard Reset bit on, or by the terminal operator sending a Reset sequence. During this time the screen can not be modified and multiple Reads will get the same data. As an example, terminal users know there is a system problem when their keyboards remain locked because the host did not issue a keyboard unlocking Write.

Inbound transmissions result from an operator Enter action, a host initiated (unso-licited) read request, or a host retry of an inbound transmission.

An operator Enter action is one that causes an attention identifier (AID) to be transmitted inbound. The host program responds with a read request. The host program must acknowledge the inbound transmission before a new inbound opera-tion can be performed.

6-34

IBM 7171 Reference Manual and Programming Guide

)

)

A host initiated read operation is an inbound transmission not caused by an oper-ator Enter action. No host acknowledgment is required before a new inbound transmission can occur.

Host retry is a retransmission of the last unacknowledged inbound transmission from the device. The host must acknowledge reception of an inbound transmission before a new inbound transmission can take place. A host retry transmission does not cause read state transitions and is not considered a new inbound transmission requiring host acknowledgment. Host retry occurs until a host acknowledgment takes place.

The type of inbound transmission is data from the device buffer (for example, modified fields of the display image). An inbound operation device characteristic (INOP), set by the controller, defines the type.

Inbound Operation Device Characteristic (INOP): The device characteristic INOP determines the operation to be performed when data is transmitted inbound on a retry transmission, or when the device is in a data pending state.

INOP is set by any of the following:

• An operator Enter action sets INOP to Read Modified.

• Host acknowledgment of an inbound transmission sets INOP to Read Modi-fied.

Read States: While powered on, a device is in one of three states with respect to read operations. The three states are: Normal, Data Pending, and Retry. The events that cause transitions between the states are shown in Figure 6-22.

Normal Read State. A device is in Normal read state when powered on, or prior to initiation of a new read operation, or after use of the Reset key in certain instances (see Figure 6-22).

When in Normal read state, an operator Enter action causes the device to prepare to generate the inbound data stream and to go into a Data Pending state.

A host initiated read operation causes the data to be transmitted with no state tran-sitions occurring. The device remains in Normal read state.

Chapter 6. IBM 7171 110 Interface to the Host System

6-35

Data Pending State.

• Data Pending Enter: the device state after an operator Enter action occurred.

A read command received while the device is in a data pending state causes the data to be transmitted and the device to be placed in the Retry state. (See Figure 6-22.)

Retry State.

• Retry Enter: the device state after the entered data was transmitted to the host.

While in a retry state, the last inbound transmission can be retried by means of a Read Modified command.

A host acknowledgment causes the device to revert from a retry state to the normal read state.

EVENTS NORMAL DATA PENDING RETRY

( 1 ) (2 ) (3 )

Enter Action 2 R R

Read Command 1 3 3

Host

acknowledgement - 1 1

Reset key - 1 1

R Reject, no state transition.

No action, no state transition.

Figure 6-22. Read State Transitions

The typical scenario would be to be in Normal state and get an Enter action (user hit enter at terminal). The terminal would switch to Data Pending state. Next, a Read command would switch the terminal to Retry state. Next, a Write command containing a

wee

with the Keyboard Reset bit set would be processed, putting the terminal back into Normal state.

Host Acknowledgments: After inbound transmissions resulting from operator Enter actions, the transmission must be acknowledged before a new inbound operation can be performed.

For inbound transmissions generated by operator Enter actions, the following are host acknowledgments:

A Write, Erase/Write or Erase/Write Alternate command containing a

wee

with the keyboard restore bit set to 1, or an Erase All Unprotected command.

• Any write transmission when the device is in Data Pending read state.

Host acknowledgment resets INOP to Read Modified.

6-36

IBM 7171 Reference Manual and Programming Guide

)

Processing of Read Commands: Read commands (Read Modified, Read Buffer) are processed as follows.

1. If the device is in Normal read state, then:

a. Data is transmitted inbound as defined by:

(1) The command (Read Modified, Read Buffer) (2) The AID (Read Modified command only).

The device remains in Normal read state.

2. If the device is in a Data Pending state then:

a. If the command is Read Modified and INOP specifies Read Modified, then data is transmitted as defined by:

(1) The Read Modified command (2) The AID.

b. If the command is Read Buffer, then data is transmitted as defined by:

(1) The command.

For items a and b, the device is placed Retry state.

3. If the device is in a Retry state, then a retry is performed as follows:

a. If the command is Read Modified and INOP specifies Read Modified, then data is transmitted as defined by:

(1) The Read Modified command (2) The AID.

b. If the command is Read Buffer, then data is transmitted as defined by:

(1) The command.

For items a and b, the device remains in the retry state.

Chapter 6. IBM 7171

II

0 Interface to the Host System

6-3 7

Keyboard Action or

Data Stream states INOP

Clear key R

System Request key R

TEST key 'ENTER' R

TEST key 'EXIT' R

Write or E/W with WCC bit 1 on R

Power on R

R - Reset NC - No Change Figure 6-23. Reset Matrix

6.4.3 Special Order Strings

Transparent Mode

The IBM 7171 provides a transparent interface to ASCII devices. In addition, special order strings· beginning with X' 2B5B' allow definition of most of the extended functions supported by the IBM 7171.

• Programming an ASCII device transparently from the host - Some ASCII hard-copy and graphic devices cannot easily simulate a 3270 screen, nor is it desir-able for them to do so. It is possible to program them from the host through a special data stream.

• Using Setup Functions - The extended functions provided by the IBM 7171 are normally initiated by keystrokes entered at the terminal. However, it is some-times desirable to have the host application program set up most of these extended functions via programming. "Setup Functions for Host Application Programs" on page 6-40 gives details on how to do this.

A transparent mode request introducer sequence at the beginning of a datastream causes the remaining data to be transmitted to the ASCII device "as is." While the

wce

and the six characters of the introducer conform to the normal structure of

·3270 orders, the rest of the data is treated as 7-bit ASCII. The high order bit is ignored. It is recommended that the high order bit be turned on for every character to "relocate" everything into the range X' 80' -X' FF', which is treated as ordi-nary graphic characters by the TP access methods. In VM/SP the fullscreen Diag-nose interface should be used to transmit the data.

Write: The Transparent Write introducer consists of two SBA sequences:

X'115D7F110000'

When encountered by the IBM 7171, the rest of the buffer is flagged as a Trans-parent Write request. Since no data editing is performed, any required control characters ~ust be supplied in the data stream, including carriage return, line feed, or padding .. The IBM 7171 will still perform pacing character (eg. XON/XOFF) processing during the transmission, provided pacing is enabled. Therefore, padding characters need not be coded for terminals which use a pacing character protocol.

While in transparent mode, the IBM 7171 still receives characters from the

ter-6-38 IBM 7171 Reference Manual and Programming Guide

minal. The special reset characters are processed immediately and are a means of escape from a host application that has failed. These are the only keys which can alter the absolute host control over the output data. If the logical keyboard lock state applies, other characters received from the terminal are not processed and remain in the typeahead buffer. If the keyboard is logically unlocked, characters are examined as received and discarded. While in transparent mode, no ordinary characters or edit requests from the keyboard are accepted. However, attention generating keys will be parsed and their AID value remembered.

When all this data has been processed, the IBM 7171 will generate an attention interrupt to the host for this device address. This signals the host that another buffer can be transmitted to the device. If the host application issues another write to the device before receiving the attention interrupt, the previous data may be overwritten with unpredictable results.

If the host responds to this attention interrupt with a Read Buffer or Read Modi-fied command, the IBM 7171 will respond with the null AID for 328x printers (X' E8'), followed by the current cursor address pointing to the byte following the last data sent. If the ASCII device has a keyboard, and the keyboard is unlocked by the

wec

beginning the write, then it is possible to change this AID value by pressing any of the attention generating keys (ENTER, PFK, or PA). All other input will be ignored.

After signalling the end of data transmission, the IBM 7171 remains in transparent mode until the next host output is received. This insures that spurious characters are not introduced in the output data stream between two consecutive buffers of transparent output data. However, this also means that input is parsed and dis-carded, and while attention generating keys will be recognized, the only action will be to save their AID for the response to the next buffer of transparent data. No second attention interrupt will be generated. It is also not possible to generate a beep in this state, so input errors like line noise and buffer overrun are not signalled at this time. If the errors have not been reset in the interim, the beep will sound when transparent mode ends.

If the host application wishes to send another buffer of transparent data after having received the attention acknowledging the receipt of the previous buffer, it simply builds a new buffer beginning with a WCC and the transparent mode introducer sequence and issues another output request. If the write operation that enters Transparent Write mode is an Erase/Write operation, then the Clear Screen CSS defined for that device will be sent before the transparent data. If the opera-tion is an Erase/Write Alternate, then the Alternate Clear Screen CSS will be sent before the transparent data. In addition, the 3270 alternate screen size buffer will be used. If an Erase/Write or an Erase/Write Alternate command is used while the device is already in Transparent mode, no screen erasure or buffer size switching will take place. For example, if a terminal type defined to be a 3278 Model 5 uses a Write or Erase/Write to enter Transparent mode, a 1920 byte buffer is available for transparent data. If Transparent mode is entered with Erase/Write Alternate, then a 3564 byte buffer is available for use.

TSO generally requires the output to end with an Insert Cursor order. If an appli-cation program does not supply it, TSO may transmit one itself, disrupting the transparent protocol. Therefore, if the last character in the data stream is an Insert Cursor order, it is logically removed from the data count and is not transmitted to the device.

Chapter 6. IBM 7171 II 0 Interface to the Host System 6-39

Transparent mode is ended by either a Master Reset sequence received from the keyboard or a non-transparent write from the host. A non-transparent write is one which contains more than the WCC and does not begin with the transparent mode introducer sequence. It is recommended that an application program issue a non-transparent write at the end before returning to the normal TSO or CMS environ-ment. A null WCC followed by an SBA to the upper left corner (X I 40114040 I) will serve nicely to end transparent mode. If Transparent mode is ended by a Master Reset from the keyboard or a Write command from the host, the device screen will not be cleared. If Erase/Write or Erase/Write Alternate is used, then the device screen will be cleared and operation will resume in the mode selected.

Write/Reod: A second form of transparent mode is the "Transparent

Write/Read," which may be specified with either of the following SBA sequences:

X I 115D7F110001 I or X ' 115D7F1100051

When this form is used, the IBM 7171 will enter transparent mode and transmit the data to the device as in normal transparent write mode. When all data has been transmitted to the device, all characters sent by the device in response will be received and saved. This receive is terminated by the receipt of an ASCII Carriage Return, the Master Reset sequence as defined in the active terminal definition table, or by receipt of more than a screen sized buffer of data. Pacing stop (as defined in the active terminal definition table) is also by default an ending condi-tion for Transparent Write/Read, but this can be disabled by setting the X I 101 bit in the System Control Flags contained in NV-RAM. Refer to section 4.4.1, "Data Area 1 Layout" on page 4-20 for the location of the flags, and to

Chapter 9, "Special Maintenance Facility and System Messages" on page 9-1 for the Maintenance Facility Display and Store commands required to set the flag.

Upon presentation of the automatic attention interrupt, the host must perform a Read Modified command. Data will be returned in Read Buffer-like format. A null AID X I E8 I will be followed by a cursor address pointing to the byte following the last received data, followed by the data in seven bit ASCII, with the X I 80 I bit set on in each byte. All input will be ignored during the transmission of the write data, and all characters received during the read (including erroneous characters and the terminating character) will be presented to the host. After the termination character is received, the terminal is left in transparent mode. If the 7171 input buffers are overrun by the device, then it will also present an Attention interrupt.

The AID returned by the mandatory Read Modified will be X I E4 I to indicate the error. Transparent Write/Read is intended for PC file transfer protocols or for . limited interactive functions such as reading crosshair positions on a graphics

device.

Setup Functions for Host Application Programs

The extended functions are mostly setup functions that can also be initiated from a host application program using a special order. Special orders are defined using the convention X I 2B I followed by a dollar sign ("$" or X I 5B I ) followed by one or more characters. Additional setup functions defined specifically for use by host application programs are described below. A list of the special orders available to a host application program is shown in Figure 6-24 on page 6-41.

6-40

IBM 7171 Reference Manual and Programming Guide

2BSB81 APL Mode On 2BSBC 1 APL Mode Off 2BSB9S 3270 Null Processing 2BSBDS Improved Null Processing 2BSBA9 Zones Mode On

2BSBE9 Zones Mode Off

2BSB8S Reverse Enter/New Line Keys 2BSBCS Restore Enter/New Line Keys 2BSB83 Reverse Column and Field Tab Keys 2BSBC3 Restore Column and Field Tab Keys 2BSB97 Restore Pacing

2BSBD7 Suppress Pacing

2BSBAS Alpha in Numeric Only Field 2BSBES 3270 Numeric Only Fields

2BSB89 3278 Insert Mode (cancel insert across attention) 2BSBC9 3277 Insert Mode (maintain insert across attention) 2BSB84 Alternate Display of Attributes

2BSBC4 Primary Display of Attributes

2BSBE3 Set Home Line, Set Left Margin, Set Column Tabs 2BSBBOxx Set Mark 'xx' at Current Buffer Address

2BSBB4 Clear Mark

2BSBA2 Enable Asynchronous Status Change Notification 2BSBE2 Disable Asynchronous Status Change Notification 2BSBBC Request Type 1 Status Message

2BSBBD Reserved

2BSBBE Request Type 1 Status Message with Attention 2BSBBF Reserved

2BSB4B Host Initiated Line Drop

Figure 6-24. List of Special Orders for Extended Functions

The setup functions in Figure 6-24 which are not described below have already been described in section 3.1.6, "Setup Functions" on page 3-3. The setup func-tions "set column tab," "set left margin," and "set home line," which can be exe-cuted by pressing the predefined key sequence on the ASCII terminal keyboard have no individual special orders assigned. Instead, a complex string is used to define these setup functions as described under "Set Home Line, Set Left Margin, Set Column Tabs" on page 6-42.

Most of these options provide convenience features for users. For example, there may be a difference between the preferred keyboard assignment for different phases of an application. Consider a text retrieval and text entry application where the terminal user first enters a search criterion into a formatted data entry menu screen with usual 3270 fields, then is presented with part of a text document which can be edited in "power typing" mode with almost no field boundary definitions at all. Most keyboards have a big TAB and RETURN key and possibly nothing else suitable for frequent usage. These order strings would allow the TAB key to be Field Tab on the formatted menu entry screen and Column Tab on the power typing text entry screen. Similarly, RETURN could be New Line on the formatted screen and ENTER on the text screen, or vice versa. By default everything (except

Most of these options provide convenience features for users. For example, there may be a difference between the preferred keyboard assignment for different phases of an application. Consider a text retrieval and text entry application where the terminal user first enters a search criterion into a formatted data entry menu screen with usual 3270 fields, then is presented with part of a text document which can be edited in "power typing" mode with almost no field boundary definitions at all. Most keyboards have a big TAB and RETURN key and possibly nothing else suitable for frequent usage. These order strings would allow the TAB key to be Field Tab on the formatted menu entry screen and Column Tab on the power typing text entry screen. Similarly, RETURN could be New Line on the formatted screen and ENTER on the text screen, or vice versa. By default everything (except

Dans le document Reference Manual and Programming Guide (Page 169-180)