Create Extension panel
The Create Extension panel allows you to provide the properties for a new Extension.
See Extensions and Configuring Events and Event Sources.
How to Get There
Press F6 on the Work with Extensions panel.
Field Descriptions
Event Source
An Event Source is a location from which IBM i events are extracted. Currently, journals and message queues are supported as Event Sources. Common event sources are QAUDJRN (journal) and QSYSOPR (message queue). You may define your own journals and message queues as Event Sources.
This field indicates the Event Source to which the Event Description belongs.
Event Description
Indicates the Event Description to which the listed Event Subtype pertains.
An Event Description is a specification that defines how to identify the IBM i events in which you are interested.
Event Subtype
Indicates the Event Subtype to which the listed Extensions pertain.
An Event Subtype is a specification that further defines how to identify the IBM i events in which you are interested. Many times an Event Description will represent an action that occurred, and this "subtype" will indicate the subject of the action or different classes of the action.
Rule
Indicates the Rule to which the listed Extensions pertain.
Name
The name used on the left side of the equal sign in an extension.
Value
The value used on the right side of the equal sign in an extension. Options for the values are journal header fields, journal entry specific fields, message queue header fields, message queue variables, other extensions and functions.
JSON Data Type Override
This field allows JSON to treat the outcome of a value as character or numeric versus its original field data type.
Possible values are:
Journal header fields
Journal header fields are common to all journal entries and start with an asterisk, for example *JOBNAM. A complete list can be accessed via "F8=Insert field at cursor" and then "F8=Common Fields". Common field must be delimited by an & when placed in the value field, &*JOBNAM&.
Journal entry specific fields
Journal entry specific fields are common to an event description and any subtypes. For example a TCO event description and its subtypes N and R have access to the same set of variables. Examples COONAM and COOLIB. Entry specific fields must be delimited by an & when placed in the value field, &COONAM&.
Message queue header fields
Message queue header fields are common to all message queue entries and start with an asterisk, for example *CURUSR. Message queue header fields must be delimited by an & when placed in the value field, &*CURUSR&.
Message queue variables
Message queue variables (message fields) can be used in Extensions. For example, if a CPF1234 message is sent, and includes a message variable, the value of that message variable can be included in an Extension.
To do this, specify the field on the Value line of the Create Extension panel as follows:
&number of message field
Example for message field #1:
&1
Functions
Available functions:
%extract
, %int
, %substr, %subst, %sst, %len, %length, %ltrim, %triml, %rtrim, %trimr and %trim
Function names are not case sensitive. Character fields must be enclosed in single quotes.
%extract
function is: - Not currently available for *TIMESTAMP in Event Source type of *SYSMSG.
- Available on OS 7.4, 7.3 with TR5, and 7.2 with TR9.
- %trimr(%substr('&CAUNAM&',1,5))
- %extract(EPOCH from '&*TIMESTAMP&')
Extensions
An extension may reference another extension. This is useful when building output for the JSON format. To specify an extension the extension name must be delimited by { and }.
{myExtension}
They appear in the output as: a=1 b=2 c=3 a=X b=Y a=n
Command Keys
F3=Exit
Exit the program.
F5=Refresh
Discards changes and remains on this panel.
F8=Insert a field at cursor
Allows you to select and insert a Field reference at the cursor position. Existing text will be moved right to make room for the Field reference.
F12=Cancel
Discards changes and returns to the prior panel.