How to trap the job name and partition for an abended job.
Release: 5.1
Component: FAQS-Automated Systems Operation
Enter AO as a FAQS command,
1. select 'I' Initialization and Configuration
2. Select 'M' Message Definitions
3. Edit the Action file your site is using.
Put an A add next to an action to define a new message.
This example looks for 1S78I when found it will issue the command ABENDJOB, and pass the jobname, partition ID.
Action Name ==> 1S78I _______________________________________
Message = ==> 1S78I Scan ( 01 , 01 ) MTWRFSS
Message2 = ==> Scan ( , ) _______
Occurrences ==> Phase ==>
Frequency ==> ( 00 : 00 : 00 ) Jobname ==>
Time Range ==> ( 00 : 00 , 00 : 00 ) CPUID ==> *
_ Pid =
ACTION Enabled
Highlight ( ) Disable Generics ( _ )
Hold ( ) Simulate Action ( _ )
Unhold ( ) Stop After Match ( _ )
Suppress ( ) Old Style Args ( _ )
Delete ( ) Command Delay ( 00 : 00 ) MM
Put an 'X' in command and ABENDJOB &P &J in the command input area
&P= partition
&J=jobname
This example uses ABENDJOB, it can be any name.
REXX IMOD ( ) ==>
Reply ( ) ==>
Command ( X ) ==> ABENDJOB &P &J
Mask ( ) Mask= Length= Offset=
Notify ( ) Type= User= Node= RSCS=
Next - type AO from the FAQS console,
1. SELECT 'I' Initialization and Configuration
2. SELECT 'C' Command Definitions
3. Define a new command called ABENDJOB (or the name you gave it above)
New Command ==> ABENDJOB <== Console command to intercept
Put a 'x' in Log command YES
YES NO
LOG Command ( X ) ( )
Run an REXX IMOD for the COMMAND
Enter the name of the IMOD.
EDIT
_ IMOD ==> ABENDJOB <== REXX EXEC to Execute
Args ==> _ Old Style Args
Replace COMMAND with the CMD below
==>
1. put an 'x' and hit enter next to IMOD x IMOD
2. Add the JCL below to strip the jobname/pid
/* */
PARSE ARG PID REPLID MSGID .
PID = SUBSTR(STRIP(PID),1,2) /* PARSE PARTITION ID */
JID=JOBNAME(PID)
/* */
IF RC=0 THEN SAY PID JID CANCEL CAPTURED /* ECHO PID JOBNAME */
/* */
SAY THE JOBNAME OF JID IN PARTITION PID HAS CANCELLED
/* set vars */
CALL $PVAR PTNID PID
CALL $PVAR JBID JID
/* */
3. FILE the IMOD
4. press PF5 to save the command
5. press PF3 to go back 1 screen
6. press PF6 to load the command file.
If you also have FAQS/PCS, you can set up a FAQS/PCS WHEN condition of MESSAGE to look for a message from
the IMOD and kick off an event that will send an EMAIL.
This JCL will call the Variables created in the above IMOD and send an email.
|CALL $GVAR &PTNID
|CALL $GVAR &JBID
// JOB JOBALRTS EMAIL FOR JOB CANCELS
// EXEC BSTTMTPC,SIZE=BSTTMTPC
ID 00
OPEN xxxx.xxxx..xxxx
*
.
.
SUBJ SUBJECT: JOB &JBID &PTNID CANCELLED