Log Software Error (QPDLOGER) API


  Required Parameter Group:

1 Suspected program name Input Char(10)
2 Detection ID Input Char(12)
3 Message reference key Input Char(4)
4 Point of failure Input Binary(4)
5 Print job log Input Char(1)
6 Data items Input Char(*)
7 Data item offset and length Input Array of Char(*)
8 Number of data items Input Binary(4)
9 Object name Input Array of Char(*)
10 Number of object names Input Binary(4)
11 Error code I/O Char(*)

  Optional Parameter Group 1:

12 ILE module name Input Char(10)

  Optional Parameter Group 2:

13 Problem log entry creation Input Char(1)

  Default Public Authority: *USE

  Threadsafe: Conditional; see Usage Notes.

The Log Software Error (QPDLOGER) API allows a program to report a software problem to the local System i® platform and provide the data needed to resolve the problem. When this API is called, any error data provided is spooled to one or more spooled files, a symptom string is created, an entry is created in the problem log, and a message is sent to the QSYSOPR message queue indicating that a software error has been detected.

Error data can be provided on the API call by using the data item offset and length and object name parameters.


Authorities and Locks

Authority to use the API
To use this API, you must have service (*SERVICE) special authority or must be authorized to the Service dump function of Operating System through IBM i Navigator's Application Administration support. Start of changeThe Change Function Usage (CHGFCNUSG) command with a function ID of QIBM_SERVICE_DUMP can also be used to change the list of user that are allowed to perform dump operations.
Object Authority
*USE for the object in libraries.
Object Library Authority
*EXECUTE.
End of change
Locks
None.

Required Parameter Group

Suspected program name
INPUT; CHAR(10)

The name of the program in which the error is suspected. Service programs are not supported. The Report Software Error (QpdReportSoftwareError) API must be used to report a problem against a service program. If a service program is specified on the QPDLOGER API, the service program will not be found and the suspected program will be used instead.

Valid values are:

*SAME The reporting program.
*PRV The program that called the reporting program.
program name The name of the suspected program.

The suspected program name is included in the symptom string (as F/name) created when this API is called.

Detection ID
INPUT; CHAR(12)

A message ID or other value defined by the reporting program that further identifies the problem. This value is included in the symptom string (as MSGdetectionid) created when this API is called.

Message reference key
INPUT; CHAR(4)

The message key associated with the message that is being reported (if a message is being reported). This parameter is used to verify that message CPF9999 (a function check) was not caused by a damage exception (CPF81xx). If message CPF9999 is caused by a damage exception, the problem will not be reported. This value is ignored if it does not contain a key for a CPF9999 message.

Note: The detection ID should not contain blanks. The API ignores characters after the first blank.

Point of failure
INPUT; BINARY(4)

A return code, statement number, or other value defined by the reporting program that assists in locating the problem. This value is converted to zoned decimal and included in the symptom string (as RCnnnnnnnn) created when this API is called.

Print job log
INPUT; CHAR(1)

Whether the job log and other job information is to be spooled to a spooled file.

Valid values are:

Y Print the job log and job information.
N Do not print the job log and job information.

Data items
INPUT; CHAR(*)

The data to be spooled.

Data item offset and length
INPUT; ARRAY of CHAR(*)

An array of the offsets to and lengths of the data items to be spooled to a spooled file. The array can contain up to 32 elements.

Each element has the following structure:

Data offset BINARY(4).
The offset to the data item from the start of the data.
Data length BINARY(4).
The length of this data item (must be greater than 0).

Number of data items
INPUT; BINARY(4)

The number of elements in the array of data item offsets and lengths. The number must be between 0 and 32, inclusive.

Object name
INPUT; ARRAY of CHAR(*)

An array of object names whose contents are to be spooled to a spooled file. The array can contain up to 32 elements.

Each element has the following structure:

Object name CHAR(30).
The name of the object to be spooled.
Library CHAR(30).
The library in which the object resides.

Valid values for the library name are:
*CURLIB The job's current library.
*LIBL The library list.
library name The specific library that contains the object.
Object type CHAR(10).
The object type. For a complete list of the available object types, see Object Types in the CL topic.

Number of object names
INPUT; BINARY(4)

The number of object names in the array of object names. The number must be between 0 and 32, inclusive.

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.


Optional Parameter


Group 1:

ILE module name
INPUT; CHAR(10)

The name of the integrated language environment (ILE) module in which the error is suspected. This value is included in the symptom string created when this API is called.


Group 2:

Problem log entry creation
INPUT; CHAR(1)

Whether a problem log entry is created or not.

Valid values are:

0 Unconditional - Create a problem log entry. This is the default value when this parameter is not present.
1 Conditional - Do not create a problem log entry.

Usage Notes

When this API runs within a threaded job, the Print job log parameter is ignored and the dump is done of the current thread job.


Error Messages

Message ID Error Message Text
CPF3C90 E Literal value cannot be changed.
CPF3CF1 E Error code parameter not valid.
CPF93C0 E Software error logging not active.
CPF93C2 E &1 is not a valid number of data items.
CPF93C3 E &1 is not a valid number of object names.
CPF93C4 E Error already logged.
CPF93C5 E Software problem logging (QPDLOGER) API error occurred.
CPF9872 E Program or service program &1 in library &2 ended. Reason code &3.
CPI93B2 I Software problem data for &4 has been detected.
CPI93CA I Suspected program &1 not found.
CPI93CB I Point-of-failure value not valid.
CPI93CC I Object &1 in library &2 not found.
CPI93CF I Data length or data offset not valid.


API introduced: V2R3

[ Back to top | Problem Management APIs | APIs by category ]