INGRMJSP

Purpose

You use the INGRMJSP automation routine to monitor JES2 spool file usage. It queries the spool usage to obtain the current spool usage and the warning level. If necessary it calls the INGRCJSP automation routine for JES2 spool recovery processing.

The INGRMJSP command also updates the SPOOL entry in the status display facility (SDF) every time it is called.

Syntax

Read syntax diagramSkip visual syntax diagram INGRMJSP

Restrictions

Monitoring by INGRMJSP is only done if it has been defined as the monitor command for an appropriate monitor resource in the customization dialog.

Usage

The INGRMJSP monitoring routine queries the spool usage by issuing the D SPOOLDEF,TGSPACE command to obtain the current spool usage and the warning level as set up by the JES2 system programmer:

  • If the spool file is full, INGRMJSP sets the health status to CRITICAL and calls INGRCJSP.
  • If the spool usage is above the warning level, INGRMJSP sets the health status to WARNING and calls INGRCJSP.
Depending on the spool full percentage and the warning level, one of the following return codes is set:
Return code Meaning
1 A severe error occurred:
  • The monitor does not have a job name
  • The monitored object is not SPOOL or associated with JES2
  • The specified job name does not refer to a JES2 resource
  • No command prefix for JES2 was found
2 Monitoring command failed:
  • The D SPOOLDEF command failed
3 OK: Spool usage is below the warning level
4 WARNING: Spool usage is above the warning level
6 CRITICAL: The spool file is full

Example

To create a spool usage monitor in the customization dialog you must define the following items:

  1. A monitor resource (MTR) with INGRMJSP as the monitoring command. For example, if you create a monitor resource called JES2SPOOL with the short description JES2 Spool Monitor, specify the following information in the MONITOR INFO policy item:
    MONITOR INFO item Entry
    Monitored Object SPOOL
    Monitored Jobname JES2
    Activate Command  
    Deactivate Command  
    Monitor Command INGRMJSP
    Monitoring interval 00:15
    Captured Messages Limit 20
    Desired Available  
    Inform List SDF
    Owner  
    Info Link  
  2. The following relationships to the JES2 application using the RELATIONSHIPS policy item:
    Relationship type Supporting Resource Condition
    HasParent JES2/APL/=  
    ForceDown JES2/APL/= WhenObservedDown
    The monitor has a HasParent relationship to the corresponding JES2 resource because it only makes sense to monitor the spool usage when JES2 is active.
  3. The following recovery actions in the HEALTHSTATE policy item:
    State Command
    WARNING INGRCJSP
    CRITICAL INGRCJSP