Retrieve Alert (QALRTVA) API


  Required Parameter Group:

1 Receiver variable Output Char(*)
2 Length of receiver variable Input Binary(4)
3 Format Input Char(8)
4 Alert log identifier Input Char(8)
5 Error code I/O Char(*)

  Default Public Authority: *USE

  Threadsafe: No

The Retrieve Alert (QALRTVA) API, an alert API, retrieves an alert from the alert database. Different formats of data can be returned depending on what value is specified for the format parameter.

This API can be used to automate alerts such that an alert notification is sent to a data queue monitored by a user application whenever an alert is processed or received.


Authorities and Locks

None.


Required Parameter Group

Receiver variable
OUTPUT; CHAR(*)

The area to receive the formatted data. The data is formatted based on the format parameter. The data is either part of the alert or the alert major vector itself.

Length of receiver variable
INPUT; BINARY(4)

The receiver variable that receives the information requested. You can specify the size of the area to be smaller than the format requested as long as you specify the length parameter correctly. As a result, the API returns only the data that the area can hold.

Format
INPUT; CHAR(8)

The format of the data to return. The possible formats are:

ALRT0100 Does not return the alert. It returns information about the alert that can be seen on the Work with Alerts display. See ALRT0100 Format for more information.
ALRT0200 Does return the alert and some information about the alert that is not contained within the alert. See ALRT0200 Format for more information.

Alert log identifier
INPUT; CHAR(8)

The identifier used to retrieve the alert from the alert log. The log ID can be found in the alert notification record, which is displayed below after the ALRT0100 and ALRT0200 Format tables. The notification record is placed on a data queue during alert filtering by the send to data queue action.

Error code
I/O; CHAR(*)

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


ALRT0100 Format

See Field Descriptions for descriptions of the fields in this format.

Offset Type Field
Dec Hex
0 0 BINARY(4) Bytes available
4 4 BINARY(4) Bytes returned
8 8 CHAR(8) Timestamp
16 10 CHAR(10) User assigned to this alert
26 1A CHAR(10) Group assigned to this alert
36 24 CHAR(20) Filter used
56 38 CHAR(4) Alert ID
60 3C CHAR(10) Problem ID
70 46 CHAR(20) Origin system of problem
90 5A CHAR(1) Alert holding flag
91 5B CHAR(1) Local or received alert flag
92 5C CHAR(1) Alert held flag
93 5D CHAR(1) Delayed alert flag
94 5E CHAR(1) Operator-generated alert flag
95 5F CHAR(1) Analysis available flag
96 60 CHAR(2) Alert type code point
98 62 CHAR(4) Alert description code point
102 66 CHAR(4) First probable cause code point
106 6A CHAR(10) Resource name
116 74 CHAR(3) Resource type


ALRT0200 Format

See Field Descriptions for descriptions of the fields in this format.

Offset Type Field
Dec Hex
0 0 BINARY(4) Bytes available
4 4 BINARY(4) Bytes returned
8 8 CHAR(8) Timestamp
16 10 CHAR(10) User assigned to this alert
26 1A CHAR(10) Group assigned to this alert
36 24 CHAR(20) Filter used
56 38 CHAR(512) Alert major vector


Alert Notification Record

Offset Type Field
Dec Hex
0 0 CHAR(10) Alert Notification (always '*ALRFTR ')
10 A CHAR(2) Function code (always '01' = Alert processed)
12 C CHAR(10) Group assigned to this alert
22 16 CHAR(10) Filter used
32 20 CHAR(10) Library of the filter
42 2A CHAR(8) Alert log identifier
50 32 CHAR(30) Reserved


Field Descriptions

Alert description code point. The description of the alert. The text is found in the QALRMSG message file in the QSYS library. The prefix for the message ID is ALD, and the suffix is the value of this field.

Alert held flag. If the alert has ever been held for the purpose of sending to the focal point, this flag is set to 1; if the alert has never been held, it is set to 0.

Alert holding flag. If the alert is currently being held to send to the focal point system, this flag is set to H; if not, the field is blank.

Alert ID. An assigned value for a particular alert.

Alert major vector. This is the SNA alert major vector.

Alert type code point. The type of alert. The text for the code point is found in the QALRMSG message file in the QSYS library. The prefix for the message ID is ALT, and the suffix is the value of this field followed by 00.

Analysis available flag. If further problem analysis is available for this problem or if the alert is for a problem analysis message, then this flag is set to 1; if the message is not for problem analysis, it is set to 0.

Bytes available. The number of bytes of data available to be returned.

Bytes returned. The number of bytes of data that were returned.

Delayed alert flag. If the alert was ever delayed, this flag is set to 1; if it has never been delayed, it is set to 0.

Filter used. The filter used to categorize the alert when it was first processed. The filter is not dynamically updated.

First probable cause code point. The most probable cause for an alert. The text for the description is found in the QALRMSG message file in the QSYS library. The prefix for the message ID is ALP, and the suffix is the value of this field.

Group assigned to this alert. The group the alert is assigned to when the alert is first filtered in the system. This value can be changed from the Work with Alerts display.

Local or received alert flag. If the alert is a locally generated alert, this flag is set to L; if it is a received alert, the flag is set to R.

Operator-generated alert flag. If the alert was generated by an operator, this flag is set to 1; if not, it is set to 0.

Origin system of problem. The system that was the origin of the associated problem entry. If no problem log entry is associated with the alert, this field is blank.

Problem ID. The ID of the problem associated with the alert. If no problem log entry is associated with the alert, this field is blank.

Resource name. The name of the resource that detected the error condition. The resource name indicates the location of the actual resource with the problem that created the alert. Generally, this is the control point name of the origin system.

Resource type. The type of resource that detected the error condition, for example, diskette, tape, printer, line, or display. The failing resource is the lowest resource in the resource hierarchy. See the Alerts Support Link to PDF book for the values of the resource type.

Timestamp. The machine timestamp (time of day) the alert was logged.

User assigned to this alert. The user the alert is assigned to when the alert is first filtered into the system. This value can be changed from the Work with Alerts display.


Error Messages

Message ID Error Message Text
CPF24B4 E Severe error while addressing parameter list.
CPF3CF1 E Error code parameter not valid.
CPF3C21 E Format name &1 is not valid.
CPF3C90 E Literal value cannot be changed.
CPF7B10 E Length parameter &1 is not valid.
CPF7B11 E Alert not found.
CPF9845 E Error occurred while opening file &1.
CPF9846 E Error while processing file &1 in library &2.
CPF9847 E Error occurred while closing file &1 in library &2.
CPF9872 E Program or service program &1 in library &2 ended. Reason code &3.


API introduced: V2R2
Top | Network Management APIs | APIs by category