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
- Bit 0: Indicates that the system can send a 5250 WSC Customization command when set on
- Bit 1: Indicates that the system can send a 5250 Query Station State command when set on
- Bit 2: Indicates that the system can send a 5250 Workstation Customization command to select the SBA code returned in READ commands for displays with ideographic extended attributes when set on.
- Bit 3: Indicates that the 5250 Workstation Customization command may be either 6 bytes or greater than 8 bytes in length when set on.
- Bits 4-7: Reserved
Byte 1: Reserved
Device capabilities. Defines the operating capabilities of the designated device as:
Byte 0
- Bits 0-1: Indicate Row 1/Column 1 support as:
B'00' No support B'01' limited support
- Bit 2: Indicates the Read MDT Alternate command is supported when set on
- Bit 3: Indicates the work station and control unit have PA1 and PA2 support when set on
- Bit 4: Indicates the work station and control unit have PA3 support when set on
- Bit 5: Indicates the work station and control unit have cursor select support when set on
- Bit 6: Indicates the work station and control unit have move cursor order support when set on
- Bit 7: Indicates the Read Modified Immediate Alternate command is supported when set on
Byte 1--display screen capabilities
- Bits 0-3: Define screen size as:
B'0001' 24 x 80 B'0011' 24 x 80 or 27 x 132
- Bit 4: Indicates selector light pen (SLP) is supported when set on
- Bit 5: Indicates magnetic stripe reader (MSR) is supported when set on
- Bits 6-7: Define color support as:
B'00' Monochrome display B'01' Color support
Byte 2
- Bit 0: Indicates Text Symbols support when set on
- Bit 1: Indicates work station and control unit have extended primary attribute
- Bits 2-4: Indicate Office Editor/Text support as:
B'000' No Office Editor/Text support B'001' single language Office Editor/Text support B'010' dual language Office Editor/Text support
- Bit 5: Indicates work station and control unit have extended primary attribute support in data processing (DP) mode (WEA order) when set on
- Bits 6-7: Indicates extended foreground color attribute support
B'01' Available in DP mode. Fourteen colors are defined, but only seven are available. The other seven colors are mapped into the available colors. B'10' Available in DP mode. Fourteen colors are supported.
Byte 3
- Bits 0-2: Indicate ideographic capability as:
B'000' No ideographic capability B'001' Ideographic capability for presentation screen only B'010' Ideographic data type and presentation screen ideographic capability
- Bits 3-5: Indicate bidirectional support as:
B'000' No bidirectional capability B'001' Bidirectional capability
- Bit 6: Ideographic
- Bit 7: Indicates CCSID-based I/O is supported when set on.
Byte 4
- Bits 0-2: Indicate graphics capability as:
B'000' No graphics capability B'001' 5292-style graphics B'010' GDDM®-OS/2® Link Graphics
- Bit 3: Indicates extended 3270 data stream capability when set on
- Bit 4: Indicates a pointer device is available when set on
- Bit 5: Indicates that GUI-like characters are available when set on
- Bit 6: Indicates the control unit supports enhanced user interface commands
and field control words (FCWs) when set on.
The commands include:
Create Window
Unrestricted Cursor Movement
Remove GUI Window
Remove All GUI Constructs
Read Screen To Print
Read Screen To Print With Extended Attributes
Write Error Code To Window
Save Partial Screen
Restore Partial Screen
Define Selection Field
Remove GUI Selection Field
Define Scroll Bar
Remove GUI Scroll Bar
The FCWs include:
Continued
Cursor Progression
Highlighted
Pointer Device Selection
- Bit 7: Indicates Write Error Code To Window command is supported when set on
Byte 5
- Bit 0: Indicates the Write Data and Programmable Mouse Buttons structured field commands, the Word Wrap FCW, and Ideographic Continued entry fields are supported when set on
- Bit 1: Indicates this is a GUI device which will use all-points-addressable constructs for windows, selection fields, and scroll bars, when set on
- Bits 2-7: Reserved
Byte 6: Reserved
Bytes 7-8:
- Bit 0-13: Reserved
- Bit 14-15: 5250 fax or image support
B'00' No 5250 image or fax support B'01' Support for seven formats:
- TIFF
- No compression
- CCITT Group 3 fax one-dimensional, modified-Huffman run-length encoding
- CCITT Group 3 fax compression
- CCITT Group 4 fax compression
- PackBits run-length encoding
- PCX monochrome format
- Stand-alone CCITT Group 3 fax compression
B'11' Support for the seven previous formats, plus five additional formats:
- IOCA
- IBM® MMR algorithm
- No compression
- CCITT Group 3 fax one-dimensional, modified-Huffman run-length encoding
- CCITT Group 3 fax compression
- CCITT Group 4 fax compression
- TIFF
Byte 9: Reserved for use by PC emulators to indicate additional 5250 image or fax formats supported
Byte 10:
- Bit 0: Indicates printer type as:
B'0' SCS printer B'1' IPDS™ printer
- Bits 1-7: Reserved
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
|
Invisible tags. Defines more device capabilities of the designated device as:
- Bits 0-5: Reserved
- Bit 6: EBCDIC-to-ASCII translation. This is used by workstation gateway devices.
- Bit 7: True transparency.
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 ]