Query Session Status (22)

Top  Previous  Next

The Query Session Status function is used to obtain session-specific information.

 

3270

5250

Yes

Yes

 

 

Prerequisite Calls

 

There are no prerequisite calls for this function.

 

 

Call Parameters

 

 

16-bit

32-bit

Function Number

Must be 22.

 

Data String

An 18/20-byte string consisting of a 1-byte short name of the target presentation space plus 17 bytes for returned data. Position 1 can be filled with:

A blank or a null to indicate a request for the host_connected presentation space.
An * (asterisk) to indicate a request for the keyboard-owner presentation space.

 

Length

Must be 18

Must be 20

PS Position

NA

 

 

 

Return Parameters

 

This function returns a data string and a return code.

 

Byte

 

Definition

Standard

Enhanced

 

1

1

A 1-character presentation space short name (PSID)

 

2-4

Reserved

2-9

5-12

Session long name (same as profile name; or, if profile not set, same as short name)

10

13

Session  Type

D  3270 display
E  3270 printer
F  5250 display
G  5250 printer
H  ASCII VT  

11

14

Session characteristics expressed by a binary number including the following session-characteristics bits

Bit 0  EAB 0: Session has the basic attribute. 1: Session has the extended attribute
Bit 1  PSS 0: Session does not support the programmed symbols 1: Session supports the programmed symbols
Bits 2-7  Reserved

12-13

15-16

Number of rows in the host presentation space, expressed as a binary number

14-15

17-18

Number of columns in the host presentation space, expressed as a binary number

16-17

19-20

Host code page expressed as a binary number

18

 

Reserved

 

Return Code

 

The following codes are defined:

 

Return Code

Explanation

0

The Query Session Status function was successful.

1

An incorrect host presentation space was specified.

2

An incorrect string length was made.

9

A system error was encountered.

 

 

Remarks

 

To use this function, preallocate memory to receive the returned data string parameter. The statements required to preallocate this memory vary depending on the language in which your application is written.