Query System (20)

Top  Previous  Next

The Query System function can be used by an EHLLAPI application program to determine the level of Personal Communications support and other system-related values. This function returns a string that contains the appropriate system data.

 

The bytes in this returned string are defined in Return Parameters.

 

3270

5250

Yes

Yes

 

 

Prerequisite Calls

 

There are no prerequisite calls for this function.

 

 

Call Parameters

 

 

Standard Interface

Enhanced Interface

Function Number

Must be 20

 

Data String

Preallocated string of 35 bytes

36 bytes

Length

Must be 35

Must be 36

PS Position

NA

 

 

 

Return Parameters

 

This function returns a data string and a return code.

 

Data String

 

A data string of 35 bytes (for 16-bit) or 36 bytes (for 32-bit) is returned. The bytes are defined as follows:

 

Byte

 

Definition

Standard

Enhanced

 

1

1

EHLLAPI version number

2-3

2-3

EHLLAPI level number

4-9

4-9

Reserved

10-12

10-12

Reserved

13

13

Hardware base, U=Unable to determine

14

14

Program type

15-16

15-16

Reserved

17-18

17-18

Personal Communications version/level as a 2-byte ASCII value

19

19

Reserved

20-23

20-23

Reserved

24-27

24-27

Reserved

28-29

28-29

Reserved

 

30

Reserved

30-31

31-32

NLS type expressed as a 2-byte binary number

33-35

34-36

Reserved

 

Return Code

 

The following codes are defined:

 

Return Code

Explanation

0

The Query System function was successful; data string has been returned.

1

EHLLAPI is not loaded. (PC/3270 only)

2

An incorrect string length was specified. (PC/3270 only)

9

A system error was encountered.

 

 

Remarks

 

To use this function, preallocate memory to receive the returned data string parameter.