Put Window Message (QsnPutWinMsg) API


  Required Parameter:

1 Window handle Input Binary(4)

  Omissible Parameter Group:

2 Message Input Char(*)
3 Message length Input Binary(4)
4 Lock keyboard Input Char(1)
5 Message identifier Input Char(7)
6 Qualified message file name Input Char(20)
7 Row Input Binary(4)
8 Column Input Binary(4)
9 Starting monochrome attribute Input Char(1)
10 Ending monochrome attribute Input Char(1)
11 Starting color attribute Input Char(1)
12 Ending color attribute Input Char(1)
13 Error code I/O Char(*)

  Returned Value:

  Return code Output Binary(4)

  Default Public Authority: *USE

  Service Program: QSNAPI

  Threadsafe: No

The Put Window Message (QsnPutWinMsg) API places an error message on the message line for the given window. This API is valid only if the window has a message line specified for it.


Authorities and Locks

None.


Required Parameter

Window handle
INPUT; BINARY(4)

A handle for the window in which the message should be placed.


Omissible Parameter Group

Message
INPUT; CHAR(*)

The message to be displayed. If the message does not fit within the window, it is truncated to fit. If the message length parameter is specified as nonzero, the message parameter is required. The message or the message ID parameter must be specified. If the message parameter is specified, the message ID parameter is ignored and no help key support is available for the message.

Message length
INPUT; BINARY(4)

The number of bytes of message data to be displayed.

Lock keyboard
INPUT; CHAR(1)

Whether the keyboard should be placed in prehelp error state of not. The possible values are:

0 Do not place the keyboard in prehelp error state.
1 Place the keyboard in prehelp error state. If 1 is specified, the processing of this API follows that of the QsnSetErr API and the QsnPutWinMsg API must be followed by an AID-associated read API. This is the default.

Message identifier
INPUT; CHAR(7)

The identifying code for the predefined message to be displayed. The first level text is displayed. If the user moves the cursor to the message line and presses the Help key, the message No help text available is displayed. This parameter is required if the message parameter is omitted.

Qualified message file name
INPUT; CHAR(20)

The name of the message file from which to retrieve the message information, and the library in which the message file resides. This parameter is required if the message parameter is omitted. The format of this parameter is:

Bytes Value
1-10 Message file name
11-20 Message file library. This can be an actual library name or one of the special values *CURLIB or *LIBL.

Row
INPUT; BINARY(4)

The relative window row at which to position the cursor when the message is displayed. To move the cursor, the API must be followed by an AID-associated read API.

If both row and column are omitted or specified with a zero value, the cursor is not moved. Row and column must both be specified or omitted; one cannot be specified if the other is omitted.

Column
INPUT; BINARY(4)

The relative window column at which to position the cursor when the message is displayed.

Starting monochrome attribute
INPUT; CHAR(1)

The initial screen attribute for monochrome displays. If this parameter is omitted and monochrome attributes are to be used, no initial attribute is written to the display for the data.

The monochrome and color attributes parameters are the initial and ending screen attributes: an initial and ending screen attribute to be used for a monochrome or a color display, respectively. One of these parameters will be selected based on the underlying display type, and the other will be discarded. Any of the attributes can be specified as a special value, X'00', indicating that no screen attribute should be written to the display. If the initial screen attribute is specified as an actual attribute, the data column, if specified, must be greater than or equal to 2. The initial screen attribute, if not X'00', will be written to the screen at the column previous to the first data character if row and column are specified, otherwise to the current display address. The ending screen attribute, if not X'00', will be written at the column directly after the last data character.

See Screen Attribute Characters for a description of the screen attribute values.

Ending monochrome attribute
INPUT; CHAR(1)

The ending screen attribute for monochrome displays. If this parameter is omitted and monochrome attributes are to be used, no ending attribute is written to the display for the data.

Starting color attribute
INPUT; CHAR(1)

The initial screen attribute for color displays. If this parameter is omitted and color attributes are to be used, no initial attribute is written to the display for the data. See Screen Attribute Characters for a description of the screen attribute values.

Ending color attribute
INPUT; CHAR(1)

The ending screen attribute for color displays. If this parameter is omitted and color attributes are to be used, no ending attributes are written to the display for the data.

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.


Error Messages

Message ID Error Message Text
CPF24B4 E Severe error while addressing parameter list.
CPF3CF1 E Error code parameter not valid.
CPF3CF2 E Error(s) occurred during running of &1 API.
CPFA307 E Screen position &1, &2 outside of display or window area.
CPFA30D E Invalid screen attribute.
CPFA31E E Required parameter &1 omitted.
CPFA333 E Parameter &1 not positive integer value.
CPFA335 E Screen address parameter error.
CPFA343 E Output operation not done.
CPFA344 E The file &2 in library &3 is not valid.
CPFA345 E The invite active flag is not valid.
CPFA3A4 E Specified window is not active.
CPFA3A7 E Window does not have a message line.
CPFA3A8 E Error occurred retrieving message text.
CPFA3AA E Window handle incorrect.
CPFA3AB E The value for &1 must be '0' or '1'.


API introduced: V2R3

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