Start of changeRetrieve XML Service Information (QSCRXMLI) API


  Required Parameter Group:

1 Destination information Input Char(*)
2 Destination format name Input Char(8)
3 Receiver variable Output Char(*)
4 Receiver format name Input Char(8)
5 Service selection information Input Char(*)
6 Service selection information format Input Char(8)
7 Error Code I/O Char(*)

  Default Public Authority: *USE

  Threadsafe: No

The Retrieve XML Service Information (QSCRXMLI) API lists service information like messages from a nonprogram message queue or messages sent to the program message queue of a job, in XML format, and optionally stores the output in a stream file.

The Retrieve XML Service Information API cannot be used to list messages sent to the QHST message queue.

New messages are prevented from being added to or removed from the message queue listed during the use of the QSCRXMLI API.

See Open List of Messages (QGYOLMSG) API or Open List of Job Log Messages (QGYOLJBL) API for the description of the message fields returned.


Authorities and Locks

Output File Authority (if output stored in a stream file)
Authority to the path and file are determined by the open() API. For details, see the Authorities section of the open()--Open File API for files opened with an access mode of O_WRONLY and O_TRUNC.
Output File Lock
*SHRNUP
Message Queue
*USE
Message Queue Library
*EXECUTE
User Space Lock
*EXCLRD
Job Authority

For additional information on job authorities, see Plan and set up system security.


Required Parameter Group

Destination information
INPUT; CHAR(*)

Provides information about the destination for the generated XML output.


Destination format name
INPUT; CHAR(8)

The destination format to determine where the generated XML output will be stored. Possible values are:

DEST0100 Return the XML output in the receiver variable.
DEST0200 Return the XML output in a stream file using the path name coded in the destination information parameter.

Receiver variable
OUTPUT; CHAR(*)

The variable that is to receive the generated XML output. The variable is used only when the destination format name is DEST0100. If the receiver variable is not large enough to hold all of the generated XML output, no XML output is returned.

Receiver format name
INPUT; CHAR(8)

The format of the generated XML output to be returned. You must use one of the following format names:

SIRV0100 The information returned to the caller of this API. For more information, see SIRV0100 Format.

Service selection information
INPUT; CHAR(*)

The information that identifies the source of the service information to be returned. The format of this information depends on the specified Service selection format name.


Service selection format name
INPUT; CHAR(8)

Indicates where the service information will be retrieved from. The possible values are:

SSIF0100 The list of messages will be retrieved from a nonprogram message queue as specified in SSIF0100 Service Selection Information from a Nonprogram Message Queue Format.
SSIF0200 The list of messages will be retrieved from a program message queue of a job as specified in SSIF0200 Service Selection Information from a Porgram Message of a Job Format.

Error code
I/O; CHAR(*)

The structure in which to return error information. For the format of the structure, see Error Code Parameter.


DEST0100 Format

The following information needs to be supplied in the destination information parameter (parameter 1) for the DEST0100 format.
Offset Type Field
Dec Hex
0 0 BINARY(4) Length of receiver variable

Field Descriptions

Length of receiver variable. The length of the receiver variable. If the length is larger than the size of the receiver variable, the results may not be predictable. The minimum length is 8 bytes.


DEST0200 Format

The destination information parameter (parameter 1) specifies the file path name where the generated XML output is to be returned for the DEST0200 format. See Path name format for information on specifying the output stream file path name.


SIRV0100 Format

The following information is returned in the receiver variable for the DEST0100 format.

Offset Type Field
Dec Hex
0 0 BINARY(4) Bytes returned
4 4 BINARY(4) Bytes available
8 8 BINARY(4) XML data length
12 C CHAR(*) XML data

Field Descriptions

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.

XML data. The XML output of the service information returned. If the receiver variable is not large enough to hold the entire XML output or if an unexpected error occurs while writing to the receiver variable, no data will be returned.

XML data length. The length of the XML data being returned.


SSIF0100 Service Selection Information from a Nonprogram Message Queue Format

Offset Type Field
Dec Hex
0 0 CHAR(10) Message queue name
10 0A CHAR(10) Message queue library

Field Descriptions

Message queue library. The name of the library where the message queue is located.

Message queue name. The name of the message queue whose messages are to be listed.


SSIF0200 Service Selection Information from a Program Message Queue of a Job Format

Offset Type Field
Dec Hex
0 0 CHAR(26) Qualified job name

Field Descriptions

Qualified job name. The name of the job whose messages are to be listed. The qualified job name has three parts:

Job name CHAR(10)A specific job name or one of the following special value:
* The job that this program is running in. The rest of the qualified job name parameter must be blank.
User name CHAR(10) A specific user profile name, or blanks when the job name is the special value of *.
Job number CHAR(6) A specific job number, or blanks when the job name is the special value of *.

Usage Notes

The output file path name is represented by the 'Path name' field in the 'Path Name Format' structure when using the DEST0200 destination format. The output file path name is used to store the generated XML output. The output stream file is opened for writing only, in text-only mode, in CCSID 1208, and allows sharing with readers only. If the output stream file exists, the file is truncated to zero length before writing any data. If the output stream file already exists, it should have been created with a CCSID of 1208; otherwise, the resulting XML output may not be usable. If the output file does not exist, it will be created with a CCSID of 1208 before attempting to write the XML output to it. The output file is created so that the file owner has read and write permission to it. The output file can be replaced if the user has the authority to do so. For more information on authority requirements for stream files, see the open()--Open File API in the Integrated File System section of the APIs in the Information Center.


Error Messages

The following messages may be sent from this function:

Message ID Error Message Text
CPE3006 E Input/output error.
CPE3014 E The object name is not correct.
CPE3021 E The value specified for the argument is not correct.
CPE3025 E No such path or directory.
CPE3027 E Operation not permitted.
CPE3029 E Resource busy.
CPE3401 E Permission denied.
CPE3403 E Not a directory.
CPE3404 E No space available.
CPE3406 E Operation would have caused the process to be suspended.
CPE3407 E Interrupted function call.
CPE3408 E The address used for an argument was not correct.
CPE3436 E There is not enough buffer space for the requested operation.
CPE3440 E Operation not supported.
CPE3450 E Descriptor not valid.
CPE3452 E Too many open files for this process.
CPE3453 E Too many open files in the system.
CPE3460 E Storage allocation request failed.
CPE3470 E Function not implemented.
CPE3471 E Specified target is a directory.
CPE3474 E Unknown system state.
CPE3484 E A damaged object was encountered.
CPE3485 E A loop exists in the symbolic links.
CPE3486 E A path name is too long.
CPE3489 E System resources not available to complete request.
CPE3490 E Conversion error.
CPE3499 E Object is suspended.
CPE3500 E Object is a read only object.
CPE3507 E Object too large.
CPE3511 E File ID conversion of a directory failed.
CPE3512 E A File ID could not be assigned when linking an object to directory.
CPE3513 E File handle rejected by server.
CPE3524 E Function not allowed.
CPFA09E E Object in use. Object is &1.
CPF2207 E Not authorized to use object &1 in library &3 type *&2.
CPF24B4 E Severe error while addressing parameter list.
CPF2401 E Not authorized to library &1.
CPF2441 E Not authorized to display job log.
CPF2443 E Job log not displayed or listed because job has ended.
CPF3CF1 E Error code parameter not valid.
CPF3C19 E Error occurred with receiver variable specified.
CPF3C21 E Format name &1 is not valid.
CPF3C53 E Job &3/&2/&1 not found.
CPF3C55 E Job &3/&2/&1 does not exist.
CPF3C58 E Job name specified is not valid.
CPF3C90 E Literal value cannot be changed.
CPF6565 E User profile storage limit exceeded.
CPF8100 E All CPF81xx messages could be returned. xx is from 01 to FF.
CPF9801 E Object &2 in library &3 not found.
CPF9803 E Cannot allocate object &2 in library &3.
CPF9821 E Not authorized to program &1 in library &2.
CPF9872 E Program or service program &1 in library &2 ended. Reason code &3.
CPF2403 E Message queue &1 in &2 not found.
CPF2408 E Not authorized to message queue &1.
CPF2433 E Function not allowed for system log message queue &1.

End of change


API introduced: V5R4
Top | Problem Management APIs | APIs by category