Use the following OPS/MVS API rule to automate the offloading/archiving processes for DC log, DC traces, and journals. This rule eliminates the need to include a WTOEXIT in the CA IDMS system, and also improves system performance when using the CA IDMS zIIP feature.
While there are many possible ways to write an API rule, this is one example of how you can implement a rule to complete the required job submissions for sample DC/UCF systems SYSTEM72 and SYSTEM73 on the same LPAR. This example processes all events starting with the string CAIDMS*. All other parsing of the messages for JOURNAL, LOG, and TRC is done by the rule itself.
)API CAIDMS*
)PROC
/**********************************************************************/
/* */
/* Proprietary and Confidential Information */
/* and Intellectual Property of CA */
/* Copyright (C) 2010 CA */
/* All Rights Reserved. */
/* */
/* Name - APIIDMS */
/* Purpose - Respond to various CA IDMS generated API events. */
/* Related - None */
/* Globals - None */
/* Notes - */
/* This sample OPS/MVS request rule demonstrates */
/* using API rules for CA IDMS sample systems SYSTEM72 */
/* and SYSTEM73. */
/* */
/* The CA OPS/MVS generic event Application Program */
/* Interface (API) enables CA software products to */
/* directly generate CA OPS/MVS events. This example */
/* will process on API events initiated by the */
/* CA IDMS product. */
/* */
/* This API example will process and perform */
/* the following actions: */
/* */
/* Offload_DC_LOG - DC log is nn% full (DC050001) */
/* or DC log is full (DC050004) */
/* messages were received. */
/* The action will be taken to submit */
/* the DC log offload job for that */
/* particular system. */
/* Offload_DC_TRC - TRC is nn% full (DC050024) */
/* or TRC is full (DC050027) */
/* messages were received. */
/* The action will be taken to submit */
/* the traces offload job for that */
/* particular system. */
/* Archive_Journal - Disk Journal is full (DC205003) */
/* message was received. */
/* The action will be taken to submit */
/* the archive journal job for that */
/* particular system. */
/* */
/**********************************************************************/
/*--------------------------------------------------------------------*/
/* Obtain needed event data as well as any need system data that */
/* required for processing. */
/*--+----1----+----2----+----3----+----4----+----5----+----6----+----7*/
msgtxt = overlay(' ',api.text,5) /* remove * from IDMS message */
localmstcons= OPSINFO('LocMstConsNm') /* Local master console */
msgid = word(msgtxt,2) /* Message ID */
system = word(msgtxt,3) /* system making request */
system = right(system,length(system)-1) /* Strip away leading V */
/*--------------------------------------------------------------------*/
/* User threshold values for DC LOG and DC Trace offloading */
/*--+----1----+----2----+----3----+----4----+----5----+----6----+----7*/
LOG_threshold = log-offload-threshold
TRC_threshold = trc-offload-threshold
/*--------------------------------------------------------------------*/
/* DC/UCF system version numbers at your IDMS site */
/*--+----1----+----2----+----3----+----4----+----5----+----6----+----7*/
SYSTEM72 = 72
SYSTEM73 = 73
/* Add more systems if needed */
/*--------------------------------------------------------------------*/
/* Display debugging information */
/*--+----1----+----2----+----3----+----4----+----5----+----6----+----7*/
MSG1 = "Text Received:" api.text
MSG2 = "MSGID:" msgid" Event:" api.id
MSG3 = "System:" system
/* Print Debugging information - uncomment the next line if needed */
/* Call Debug_rule */
/*--------------------------------------------------------------------*/
/* Process this particular class type. */
/*--+----1----+----2----+----3----+----4----+----5----+----6----+----7*/
select
/* Process "DC050001 Log % full" message */
when msgid = 'DC050001' then do
level = word(msgtxt,7) /* Current % of LOG in use */
level = left(level,length(level)-1) /* Strip away % sign */
If level >= LOG_threshold then /* DC Log has exceeded threshold */
Call Offload_DC_LOG
end
/* Process "DC050004 Log is FULL" message */
when msgid = 'DC050004' then Call Offload_DC_LOG
/* Process "DC205003 Disk Journal FULL" message */
when msgid = 'DC205003' then Call Archive_Journal
/* Process "DC050024 TRC % full" message */
when msgid = 'DC050024' then do
level = word(msgtxt,7) /* Current % of LOG in use */
level = left(level,length(level)-1) /* Strip away % sign */
If level >= TRC_threshold then /* DC Log has exceeded threshold */
Call Offload_DC_TRC
end
/* Process "DC050027 TRC is FULL"' message */
when msgid = 'DC050027' then Call Offload_DC_TRC
otherwise nop
end
return
/*--------------------------------------------------------------------*/
/* Offload DC LOG subroutine: */
/* This subroutine will submit offload IDMS DC log job for the */
/* Central Version which issued the event. */
/* */
/* Add statements for all desired DC/UCF systems to be processed */
/*--+----1----+----2----+----3----+----4----+----5----+----6----+----7*/
Offload_DC_LOG:
select
/* Submit the job for sample system SYSTEM72 */
when system = SYSTEM72 then do
MSGI = "Archive LOG job for the CV" system "has been submitted"
Call Info_rule /* Print informational message into JES log */
address TSO
"SUBMIT ‘your.custom.jcllib(jcl-member)'"
end
/* Submit the job for sample system SYSTEM73 */
when system = SYSTEM73 then do
MSGI = "Archive LOG job for the CV" system "has been submitted"
Call Info_rule /* Print informational message into JES log */
address TSO
"SUBMIT ' your.custom.jcllib(jcl-member)'"
end
/* Otherwise do nothing */
otherwise nop
end
return
/*--------------------------------------------------------------------*/
/* Archive Journal subroutine: */
/* This subroutine will submit archive journal job for the Central */
/* Version which issued the event. */
/* */
/* Add statements for all desired DC/UCF systems to be processed */
/*--+----1----+----2----+----3----+----4----+----5----+----6----+----7*/
Archive_Journal:
select
/* Submit the job for sample system SYSTEM72 */
when system = SYSTEM72 then do
MSGI = "Archive journal job for the CV" system "has been submitted"
Call Info_rule /* Print informational message into JES log */
address TSO
"SUBMIT ' your.custom.jcllib(jcl-member)'"
end
/* Submit the job for sample system SYSTEM73 */
when system = SYSTEM73 then do
MSGI = "Archive journal job for the CV" system "has been submitted"
Call Info_rule /* Print informational message into JES log */
address TSO
"SUBMIT 'your.custom.jcllib(jcl-member)'"
end
/* Otherwise do nothing */
otherwise nop
end
return
/*--------------------------------------------------------------------*/
/* Offload DC TRC subroutine: */
/* This subroutine will submit offload IDMS DC TRC job for the */
/* Central Version which issued the event. */
/* */
/* Add statements for all desired DC/UCF systems to be processed */
/*--+----1----+----2----+----3----+----4----+----5----+----6----+----7*/
Offload_DC_TRC:
select
/* Submit the job for sample system SYSTEM72 */
when system = SYSTEM72 then do
MSGI = "Archive TRC job for the CV" system "has been submitted"
Call Info_rule /* Print informational message into JES log */
address TSO
"SUBMIT 'your.custom.jcllib(jcl-member)'"
end
/* Submit the job for sample system SYSTEM73 */
when system = SYSTEM73 then do
MSGI = "Archive TRC job for the CV" system "has been submitted"
Call Info_rule /* Print informational message into JES log */
address TSO
"SUBMIT 'your.custom.jcllib(jcl-member)'"
end
/* Otherwise do nothing */
otherwise nop
end
return
/*--------------------------------------------------------------------*/
/* Info subroutine: */
/* This subroutine is used to print various informational strings */
/* into the JES log. */
/*--+----1----+----2----+----3----+----4----+----5----+----6----+----7*/
Info_rule:
MLINXT.1 = 'OPS/MVS IDMS INFORMATIONAL MESSAGE:'
MLINXT.2 = COPIES('*',70)
MLINXT.3 = '* '||CENTER(MSGI,66)||' *'
MLINXT.4 = COPIES('*',70)
address WTO
"Msgid(OPSNOTIFY) Textvar(MLINXT.) Cnname("localmstcons")"
MSGI = ""
return
/*--------------------------------------------------------------------*/
/* Debug subroutine: */
/* This subroutine is used to print various debugging strings into */
/* the JES log. */
/*--+----1----+----2----+----3----+----4----+----5----+----6----+----7*/
Debug_rule:
MLWTXT.1 = 'OPS/MVS IDMS DEBUG MESSAGE:'
MLWTXT.2 = COPIES('*',70)
MLWTXT.3 = '* '||CENTER(MSG1,66)||' *'
MLWTXT.4 = '* '||CENTER(MSG2,66)||' *'
MLWTXT.5 = '* '||CENTER(MSG3,66)||' *'
MLWTXT.6 = COPIES('*',70)
address WTO
"Msgid(OPSNOTIFY) Textvar(MLWTXT.) Cnname("localmstcons")"
MSG1 = ""
MSG2 = ""
MSG3 = ""
return
To complete the API rule, replace these variables:
Replace log-offload-threshold with the DC log offload threshold value in percent.
Replace trc-offload-threshold with the DC traces offload threshold value in percent.
The data set name of the card image (FB/80/????) JCL library containing the DC log and DC traces offload jobs and archive journal jobs.
Replace jcl-member with the name of the member containing the JCL to offload or archive the DC log, DC traces or journals for the particular CA IDMS DC/UCF system.
|
Copyright © 2010 CA.
All rights reserved.
|
|