Get a Message (CEEMGET) API


  Required Parameter Group:

1 cond_token Input FEEDBACK
2 message_area Output VSTRING
3 msg_ptr I/O INT4

  Omissible Parameter:

4 fc Output FEEDBACK

  Service Program Name: QLEAWI

  Default Public Authority: *USE

  Threadsafe: Yes

The Get a Message (CEEMGET) API retrieves a message and stores it in a buffer for manipulation or output by the caller.

The API retrieves a message and places it in the storage location referenced by the message_area parameter.

The msg_ptr parameter has a value of zero on the initial call to the CEEMGET API. If the message is too large to be contained in message_area, msg_ptr is returned containing an index into the message. The index is used in subsequent calls to CEEMGET to retrieve the remaining portion of the message. When the entire message has been retrieved, msg_ptr is returned containing a value of zero.

Authorities and Locks

None.


Required Parameter Group

cond_token (input)
A 12-byte condition token. See Using Condition Management APIs for a description of the condition token.

message_area (output by descriptor)
A valid ILE string variable, passed by reference with a descriptor. The CEEMGET API places the retrieved message into this string variable.

msg_ptr (input/output)
A 4-byte integer with a value of 0 on the initial call to CEEMGET to retrieve a message. If the message is too large to be contained in the message_area, msg_ptr will be returned containing an index into the message. The index is used in subsequent calls to CEEMGET to retrieve the remaining portion of the message. When the entire message has been retrieved, msg_ptr is returned with a value of 0.

Omissible Parameter

fc (output)
A 12-byte feedback code.

Feedback Codes and Conditions

CEE0000 The API completed successfully
Severity: 00  
CEE0102 The condition token passed to &1 is not valid
Severity: 30  
CEE0454 &1 cannot find message &3 in message file &2
Severity: 30  
CEE0455 The message returned is truncated
Severity: 10  
CEE0458 &1 cannot find message file &2
Severity: 30  
CEE0501 The operational descriptor data type is not valid
Severity: 30  
CEE0502 Missing operational descriptor
Severity: 30  
CEE3103 Cannot allocate storage in &1
Severity: 30  
CEE9902 Unexpected user error occurred in &1
Severity: 30  

Usage Notes



API introduced: V2R3
Top | ILE CEE APIs | APIs by category