HP OpenVMS I/O User’s Reference Manual: OpenVMS Version 8.4 > Chapter 5 Terminal Driver

5.4 I/O Status Block

The I/O status block (IOSB) formats for the read, write, set mode, set characteristics, sense mode, sense characteristics, and LAT port driver I/O functions are shown in Figures Figure 5-14, Figure 5-16, Figure 5-17, and Figure 5-18. Figure 5-15 shows the IOSB format for the itemlist read function. Appendix A lists the status returns for these functions. (The OpenVMS system messages documentation provides explanations and suggested user actions for these returns.)

In Figure 5-14, the offset to terminator at IOSB+2 is the count of characters before the terminator character (see “Read Function Terminators”). The terminator character is in the buffer at the offset specified in IOSB+2. When the buffer is full, the offset at IOSB+2 is equal to the requested buffer size. At the same time, IOSB+4 is equal to 0. In the case of multiple character escape sequences that act as terminators, the terminator at IOSB+4 is the first character (ESC) of the escape sequence. IOSB+6 contains the size of the terminator string, usually 1. However, in an escape sequence, IOSB+6 contains the size of the validated escape sequence (see “Escape and Control Sequences”). The sum of IOSB+2 and IOSB+6 is the number of characters in the buffer.

Figure 5-14 IOSB Contents—Read Function

IOSB Contents—Read Function

In Figure 5-15 the terminator position word contains a number, the character of which is determined by the mode of operation. For itemlist read operations that do not specify TRM$K_EM_RDVERIFY, this word contains the number of characters from the end of the buffer to the cursor location at the time the terminator character was received. If TRM$K_EM_RDVERIFY is specified, the terminator position word contains the offset into the buffer from the nonverified character.

Figure 5-15 IOSB Contents—Itemlist Read Function

IOSB Contents—Itemlist Read Function

The byte at IOSB+5 passes the status information, listed in Table 5-30, on TRM$K_EM_RDVERIFY operations in which TRM$M_TM_ARROWS or TRM$M_TM_TOGGLE is set in TRM$_MODIFIERS.

Table 5-30 Byte IOSB+5 Status Information

BitInterpretation

7 (sign bit)

0 to indicate rest of bits valid. This applies to insert/overstrike and arrow key read verify functionality only.

6­-2

Always 0 if bit 7 is equal to 0. Not used; reserved for future use.

1 TRM$V_ST_OTHERWAY

Set to indicate that read is terminated in left-justify insert mode or right-justify overstrike mode.

0 TRM$V_ST_FIELD_FULL

Read terminated on an autotab field full condition. IOSB+7 contains an index to the cursor.

 

In Figure 5-16, the remote terminal driver does not return the number of lines output or the cursor position.

Figure 5-16 IOSB Contents—Write Function

IOSB Contents—Write Function

In Figure 5-17, the TT driver attempts to return the correct data in IOSB after a SETMODE or SETCHAR. To be sure the returned data is correct, the user should follow the SETMODE or SETCHAR with a SENSEMODE or SENSECHAR.

Figure 5-17 IOSB Contents—Set Mode, Set Characteristics, Sense Mode, and Sense Characteristics Functions

IOSB Contents—Set Mode, Set Characteristics, Sense Mode, and Sense Characteristics Functions

When an application program makes an I/O request for a connection to a remote device on a terminal server, the LAT port driver places status information about the request into the first word of the I/O status block, as shown in Figure 5-18. Table 5-29 lists the possible status returns.

If the server rejects the request, the LAT port driver returns a numeric LAT rejection code in the second word of the I/O status block. Table 5-31 lists the LAT rejection codes.

Figure 5-18 IOSB Contents—LAT Port Driver Function

IOSB Contents—LAT Port Driver Function

Table 5-31 LAT Rejection Codes

ValueReason

0

Reason is unknown.

1

User requested disconnect.

2

System shutdown in progress.

3

Invalid slot received.

4

Invalid service class received.

5

Insufficient resources to satisfy request.

6

Service in use.

7

No such service.

8

Service is disabled.

9

Service is not offered on the requested port.

10

Port name is unknown.

11

Invalid password.

12

Entry is not in queue.

13

Immediate access rejected (server queue full).

14

Access denied (group code mismatch).

15

Corrupted solicit request.

16

COMMAND_TYPE code is illegal/not supported.

17

Start slot cannot be sent.

18

Queue entry deleted by local node.

19

Inconsistent or illegal request parameters.