Query 5250 (QsnQry5250) API


  Required Parameter Group:

1 Receiver variable Output Char(*)
2 Length of receiver variable Input Binary(4)

  Omissible Parameter:

3 Error Code I/O Char(*)

  Returned Value:

Return code Output Binary(4)

  Default Public Authority: *USE

  Service Program: QSNAPI

  Threadsafe: No

The Query 5250 (QsnQry5250) API is used to retrieve the results of the Query 5250 command for the current device. The Query 5250 command returns device and controller attributes for the current device, such as whether wide mode and graphical user interface (GUI) are supported.


Authorities and Locks

None.


Restrictions

This command is not supported by all control units. A query status of 3 indicates if the query failed.


Required Parameter Group

Receiver variable
OUTPUT; CHAR(*)

The receiver variable that is to receive the result of the query. You can specify that the size of the area be smaller than the format requested as long as you specify the length of the receiver variable parameter correctly. As a result, the API returns only the data the area can hold. The format of the data returned is shown in Format of the Query Data.

Length of receiver variable
INPUT; BINARY(4)

The length of the receiver variable. If the length is larger than the size of the receiver variable, the results are unpredictable. The minimum length is 8 bytes.

The API returns as much information as it can fit in this length. If the available information is longer, it is truncated. If the available information is shorter, the unused output is unchanged; whatever is already stored in that space remains there. To determine how much information the API actually returns in response to this call, see the bytes returned field. To determine how much information the API could return if space were available, see the bytes available field.


Omissible Parameter

Error code
I/O; CHAR(*)

The structure in which to return error information. For the format of the structure, see Error code parameter. If this parameter is omitted, diagnostic and escape messages are issued to the application.


Returned Value

Return code
OUTPUT; BINARY(4)

A return code indicating the result of the operation. The value returned will be 0 if the operation was successful, or -1 otherwise.


Format of the Query Data

Offset Type Field
Dec Hex
0 0 BINARY(4) Bytes returned
4 4 BINARY(4) Bytes available
8 8 CHAR(1) Query status
9 9 BINARY(2) Work station control unit
11 B CHAR(3) Code Level
14 E CHAR(16) Reserved
30 1E CHAR(1) Work station type code
31 1F CHAR(4) Machine type code
35 23 CHAR(3) Model number
38 26 CHAR(1) Keyboard ID
39 27 CHAR(1) Extended keyboard ID
40 28 CHAR(1) PC keyboard ID
41 29 CHAR(4) Serial number
45 2D BINARY(2) Maximum input fields
47 2F CHAR(2) Control unit customization
48 30 CHAR(1) Reserved
50 32 CHAR(12) Device capabilities
62 3E CHAR(1) Grid buffers
63 3F CHAR(1) Type of grid line support
64 40 CHAR(1) Reserved
65 41 CHAR(1) Images or faxes
66 42 CHAR(1) Image or fax scaling granularity
67 43 CHAR(1) Image or fax rotating granularity
68 44 CHAR(1) Image or fax support
69 45 CHAR(1) Invisible tags
70 46 CHAR(2) Reserved


Field Descriptions

Further details on the fields listed can be found in the 5494 Remote Control Unit Functions Reference, SC30-3533, manual.

Bytes available. The number of bytes of data available to be returned. All available data is returned if enough space is provided.

Bytes returned. The number of bytes of data returned.

Code Level. Identifies the code release level.

Control unit customization. Indicates customization parameters for the control unit as:

Byte 0

Byte 1: Reserved

Device capabilities. Defines the operating capabilities of the designated device as:

Byte 0

Byte 1--display screen capabilities

Byte 2

Byte 3

Byte 4

Byte 5

Byte 6: Reserved

Bytes 7-8:

Byte 9: Reserved for use by PC emulators to indicate additional 5250 image or fax formats supported

Byte 10:

Byte 11: Reserved

Extended keyboard ID. The device code for extended 5250 keyboards.

Grid buffers. The number of grid buffers that are available in the device.

X'00' Not grid-capable.

Images or faxes. The number of images or faxes that can be presented on a display screen.

X'00' No 5250 image or fax support
X'01-FE' Number allowed
X'FF' Variable, dependent on the size of the image or fax

Image or fax scaling granularity.

X'00' No 5250 image or fax support
X'01' Support for scaling percentages from 3% to 400%. No scroll-bar scaling, fill scaling, no change scaling, increment and decrement
X'02-7E' Reserved
X'7F' Support for continuous scaling
X'80-FF' Reserved for use by 5250 PWS emulators

Image or fax rotating granularity.

X'00' No 5250 image or fax support
X'01' Support for rotating of 0, 90, 180, and 270 degrees
X'02-7E' Reserved
X'7F' Support for continuous rotation
X'80-FF' Reserved for use by 5250 PWS emulators

Image or fax support.

X'00' No 5250 image or fax support
B'0' Pop-up and pull-down windows that were written after image or fax are presented over image or fax data when set on
B'1' This device supports transparent mode.
B'2-7' Reserved

Invisible tags. Defines more device capabilities of the designated device as:

Keyboard ID. Reserved. This field is set to X'00'.

Machine type code. An EBCDIC code for the machine type.

Maximum input fields. The maximum number of input fields available (256).

Model number. An EBCDIC code for the machine model number.

PC keyboard ID. Device code for PC keyboards attached to a 5250 work station (X'00' for nonprogrammable work stations).

Query status. The status of the 5250 query data. The possible values are:

DSM_5250Q_YES (1) Query information successfully retrieved.
DSM_5250Q_NO (2) Query cannot be issued for the device. This occurs when the device configuration specifies that the query command should not be issued against the device.
DSM_5250Q_FAIL (3) Query command failed. Default values are supplied based on the device type. This occurs, for example, when the controller does not support the query command.

Reserved. An ignored field.

Serial number. Field for device serial number. This field is set to zero for a work station with no serial number.

Type of grid line support.

X'00' No grid line support
X'01' Type 1 grid line support including support for grid line commands

Work station control unit. The type of control unit.

Work station type code. The workstation type. The value is X'01' for display station.


Error Messages

Message ID Error Message Text
CPF24B4 E Severe error while addressing parameter list.
CPF3C24 E Length of the receiver variable is not valid.
CPF3CF1 E Error code parameter not valid.
CPF3CF2 E Error(s) occurred during running of &1 API.
CPFA31E E Required parameter &1 omitted.


API introduced: V2R3

[ Back to top | Dynamic Screen Manager APIs | APIs by category ]