7.6.1 Notes on the Receive JP1 Event job
The following provides precautions (items you must know in advance) for using the Receive JP1 Event job.
JP1 events are events that are managed by JP1/Base and issued when events occur in JP1 programs. JP1 events contain information about various event levels, ranging from errors and warnings to reports and messages. You can execute a different succeeding job for each event level, or execute the succeeding job only when a specific message is received. You can use regular expressions to extract parts of messages or detailed information from within JP1 events and pass the information to succeeding jobs.
Examples of jobnets that use the Receive JP1 Event job are as follows:
-
Execute the succeeding job when an error occurs in a JP1 program or a warning is reported.
-
Execute the succeeding job at the completion of all processing in situations where processing is executed by two or more JP1 programs.
-
Execute the Send JP1 Event job when a jobnet executed by JP1/AJS3 - Manager in another host ends, receive the sent JP1 event in another jobnet, and execute the succeeding job.
-
Use the JP1/Base event conversion facility to execute the succeeding job when a non-JP1 application is terminated.
For details about the event conversion facility, see the JP1/Base User's Guide.
- Organization of this subsection
(1) Notes on detecting JP1 events
The Receive JP1 Event job can only monitor events that occur after it begins monitoring. Therefore, JP1/AJS3 does not detect the following JP1 events:
-
JP1 events that occur while JP1/AJS3 is inactive
-
JP1 events that occur between the time when JP1/AJS3 starts and the job begins monitoring
As the JP1 events to be monitored by the Receive JP1 Event job, choose JP1 events that will be issued after the JP1/AJS3 event jobs enter monitoring status.
The following figure shows the timing under which detection cannot take place for a Receive JP1 Event job.
|
(2) Options available with the Receive JP1 Event job
With the Receive JP1 Event job, you can set an option that governs whether to monitor reception of JP1 events that occur before the job starts (and before monitoring of JP1 events starts). This is called the Find events prior to exec. option (the option for finding events before starting event monitoring). This option takes effect when you specify an event ID and a search range that dictates how many minutes before the start of the job are to be included in the scope of the Receive JP1 Event job. You can specify a value from 1 to 720 (in minutes). The reference time for this option is based on the local time of the host on which the Receive JP1 Event job is executed.
If you do not use this option, the job only monitors reception of JP1 events that occur after JP1 event monitoring starts.
The following cautionary notes apply when this option is used:
-
The greater the search range of the Find events prior to exec. option (the number of minutes prior to the Receive JP1 Event job starting that are included in its scope), the longer it takes to search for events that occurred prior to executing the Receive JP1 Event job. The search will also take longer if a large number of JP1 events occurred in the specified search range. Therefore, we recommend that you specify the smallest possible value (at most 10 minutes) as the search range.
-
The receive JP1 Event job acquires JP1 events from the JP1/Base event database. Therefore, even if JP1 events are generated within the event search range defined in a Receive JP1 Event job, the Receive JP1 Event job will not detect the events if the event database is changed and the JP1 events to be searched for are deleted from the event database. If there is a possibility that JP1 events to be searched for will be deleted from the event database, in the Find events prior to exec. option, specify the shortest possible time for the search range defined in the Receive JP1 Event job, and configure the operation settings so that monitored events are generated within the search range. If JP1 events to be searched for continue to be deleted from the event database even after you specify the shortest possible time, increase the size of the event database. For details about the event database, see the JP1/Base User's Guide.
-
For the JP1 event reception monitoring job that uses the Find events prior to exec. option, if there are many JP1 events in the search range, the following problems might occur:
-
CPU usage increases.
-
The JP1 event reception monitoring job requires a long time to terminate.
-
The JP1 event reception monitoring job ends abnormally.
Accordingly, use the Find events prior to exec. option only when monitoring a limited number of specific JP1 events. Do not use the Find events prior to exec. option when monitoring events that can be generated in large quantities or that can be generated repeatedly. If searching many JP1 events is necessary, specify detailed monitoring conditions for the Receive JP1 Event job to filter the JP1 events that will be searched or else narrow the search range when you specify the Find events prior to exec. option. If searching many JP1 events is necessary, specify detailed monitoring conditions for the JP1 event reception monitoring job to filer the JP1 events that will be searched. Alternatively, reduce the search range specified when you specify the Find events prior to exec. option.
If you concurrently execute multiple JP1 event reception monitoring jobs with the Find events prior to exec. option specified, the search range might be expanded# if the search conditions are joined. In this case, the expanded search range might contain more JP1 events than the case when JP1 event reception monitoring jobs are executed separately.
Therefore, when you concurrently execute multiple JP1 event reception monitoring jobs with the Find events prior to exec. option specified, we recommend that you use a moderate range of event IDs in the search range. For example, specify event IDs in the range from 0 to 1FFF for the monitoring condition.
- #
-
For example, if search ranges are joined when two JP1 event reception monitoring jobs specified as follows are executed, the resulting search range contains event IDs in the range from 1 to 7FFFFFFF:
- Monitoring condition specified for JP1 event reception monitoring job A
Event ID: 1
- Monitoring condition specified for JP1 event reception monitoring job B
Event ID: 7FFFFFFF
-
-
We recommend that you use the Find events prior to exec. option from within a start condition job. You can still use this option from within other kinds of event jobs, but if the Find events prior to exec. option is specified in these jobs, the same event might satisfy a condition multiple times. Keep the usage method in mind when using a Receive JP1 Event job as an event job.
The following shows an example when the same JP1 event satisfies a monitored condition multiple times.
- Example
-
Suppose that the Receive JP1 Event job is registered as an event job with the following conditions in the jobnet recv.
-
Start condition:
The jobnet recv is set to be started by an Interval Control job at 9:00 and 9:10.
-
Search range of Find events prior to exec. option:
30 (minutes)
-
Event ID:
111
-
Issuance conditions of the JP1 event (event ID: 111):
8:20 and 8:50
Operation
-
The Interval Control job starts the jobnet recv at 9:00.
-
The Receive JP1 Event job searches for JP1 events that occurred from 8:30 according to the conditions of the Find events prior to exec. option.
-
The Interval Control job starts the jobnet recv at 9:10.
-
The Receive JP1 Event job searches for JP1 events that occurred from 8:40 according to the conditions of the Find events prior to exec. option.
- Result
-
If the only JP1 event that satisfied the search condition occurred at 8:50, the Receive JP1 Event jobs started at 9:00 and 9:10 both detect the same JP1 event that occurred at 8:50.
Figure 7‒2: Example when the same JP1 event is detected more than once
(3) Notes on defining the Receive JP1 Event job
The following are cautionary notes on defining the Receive JP1 Event job:
-
Start the JP1/Base event service before executing a Receive JP1 Event job, and make sure that the API setting of the JP1/Base event service is keep-alive. If the JP1/Base event service is not started, the Receive JP1 Event job waits until the event service has started before executing.
-
The Receive JP1 Event job cannot receive JP1 events that occur before it enters Now running status. Make sure that the JP1 events you want to receive occur after the Receive JP1 Event job enters this status. Alternatively, you can use the Find events prior to exec. option to find events that occurred prior to the job entering Now running status.
-
A JP1 event contains messages and detailed information. If you want to use a Receive JP1 Event job to monitor JP1 events for a specific character string, specify the character string by using a regular expression. If you want to use extended regular expressions, specify the JP1/Base settings in Windows. In UNIX, regardless of the JP1/Base settings, you can use extended regular expressions by using the operating system's syntax for extended regular expressions. For details about configuring Windows to use extended regular expressions, see the explanation about extending the default regular expressions in the JP1/Base User's Guide. For details about the regular expressions available in UNIX, see the UNIX documentation.
-
If you overuse the expression .*, which matches any character or characters, it could take a long time to compare the expression against the JP1 event. For long messages, use.* only where necessary. Executing multiple Receive JP1 Event jobs that use the expression .* might exponentially increase the time it takes to compare monitoring conditions for each job against the JP1 event, greatly delaying event detection. For this reason, we recommend that you use the JP1/Base event transfer function and filter conditions on a separate host to reduce the number of JP1 events before monitoring, or add monitoring conditions to reduce the frequency with which .* is used in comparisons. Note that in UNIX you can reduce the time it takes to compare the expression against the JP1 event if you use the expression [^ ]* (matches repeated characters other than spaces) instead of .*.
-
In the start condition for a Receive JP1 Event job, you must define one or more items. If no item is defined, the Receive JP1 Event job terminates each time a JP1 event occurs on the host that performs event reception monitoring. Because the monitoring condition is satisfied even for a JP1 event issued by JP1/AJS3, the jobnet starts each time a job is executed.
-
When the JP1/Base event service on a Windows host receives JP1 events issued by the event service of JP1/SES Version 5 or JP1/AJS Version 5 or earlier, or by the JP1/SES protocol, originating IP addresses are not set in the JP1 events. As a result, in Windows, even when you specify an IP address for the event source in the monitoring conditions of a Receive JP1 Event job, the type of event described above will not satisfy the monitoring conditions.
-
Event details of a JP1 event are monitored only when the details in the JP1 event are in text format. If the details contain binary data, the details in the JP1 event are ignored and do not satisfy the monitoring condition. If the JP1 events to be monitored contain binary data, do not specify event details as a monitoring condition.
-
The name of the OS user who issued the JP1 event is set in the JP1 event as the name of the event issuer. If you specify a JP1 user name as the event issuer name in the monitoring condition of a Receive JP1 Event job, the Receive JP1 Event job cannot correctly monitor the reception of JP1 events. User names of event issuers specified in the monitoring condition of a Receive JP1 Event job are case sensitive. Specify the correct user names of event issuers in JP1 events.
-
Host names of event issuers specified as the monitoring condition of a Receive JP1 Event job are case sensitive when JP1 event reception monitoring is performed. Specify the correct host names in JP1 events (issuing event server names).
-
Partial-string matching is used for the items you specify using a regular expression. If you want to use whole-string matching, you must explicitly specify the whole string by using a regular expression.
-
The JP1 event information monitored by the Receive JP1 Event job conforms to the specifications of the JP1/Base event service. For details about the JP1 events you can monitor with the Receive JP1 Event job, see the JP1/Base User's Guide and the manual for the product that issued the JP1 event.
-
In Windows, for the users parameter in the event server settings file (conf) of the JP1/Base event service, set the user name of the account from which the JP1/AJS3 service is started. By default, this parameter is set to allow anyone to receive JP1 events.
-
IP addresses in IPv6 format are not output as the IP addresses of event issuer hosts for JP1 events. For this reason, you cannot specify IPv6 addresses as the IP addresses of event issuers.