skip book previous and next navigation links
go up to top of book: HP OpenVMS I/O User's Reference Manual HP OpenVMS I/O User's Reference Manual
go to beginning of chapter: Terminal Driver Terminal Driver
go to previous page: Terminal Function Codes Terminal Function Codes
go to next page: Terminal Driver Programming ExamplesTerminal Driver Programming Examples
end of book navigation links

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 IOSB ContentsRead Function, IOSB ContentsWrite Function, IOSB ContentsSet Mode, Set Characteristics, Sense Mode, and Sense Characteristics Functions, and IOSB ContentsLAT Port Driver Function. IOSB ContentsItemlist Read Function shows the IOSB format for the itemlist read function. I/O Function Codes lists the status returns for these functions. (The OpenVMS system messages documentation provides explanations and suggested user actions for these returns.)

In IOSB ContentsRead Function, 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 14  IOSB Contents--Read Function  
IOSB Contents---Read Function

In IOSB ContentsItemlist Read Function 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 15  IOSB Contents--Itemlist Read Function  
IOSB Contents---Itemlist Read Function

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

Table 31   Byte IOSB+5 Status Information
Bit Interpretation
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 IOSB ContentsWrite Function, the remote terminal driver does not return the number of lines output or the cursor position. 

Figure 16  IOSB Contents--Write Function  
IOSB Contents---Write Function

In IOSB ContentsSet Mode, Set Characteristics, Sense Mode, and Sense Characteristics Functions, 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 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 IOSB ContentsLAT Port Driver Function. IO$M_LT_CONNECT Request Status 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. LAT Rejection Codes lists the LAT rejection codes.  

Figure 18  IOSB Contents--LAT Port Driver Function  
IOSB Contents---LAT Port Driver Function

Table 32   LAT Rejection Codes
Value Reason
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.


go to previous page: Terminal Function Codes Terminal Function Codes
go to next page: Terminal Driver Programming ExamplesTerminal Driver Programming Examples