We need to maintain our test system, so that aged applications can be cleared.
Release : 11.4 & 12.0
Component : CA ESP WORKLOAD AUTOMATION
Here is an example:
Note: please do your own test first, and it's only an example, we officially don't support it.
- "ESP LAP -" will show all incomplete applications, with generations in descending order. When you test it, you can use "ESP LAP applname" for one APPL applname.
- "GENTIME X TODAY LESS 3 WORKDAYS" means it will check for 3 workdays before, you can change it;
- The command to complete the applications will be written to ESP auditlog, like:
ESP6620I APPLMGR: APPL TES5.49 ALL COMPLETED BY LUCY
- You can define a scheduled event and INVOKE it.
DATE1 = CLANGVAR("%XYEAR%XMM%XDD")
DO I = 1 TO LAP.0
IF LAP.I = "" THEN
PARSE UPPER VAR LAP.I VERB THEREST
WHEN VERB = "APPL" THEN
WHEN VERB = "CREATED" THEN
PARSE VAR THEREST APPL . APPLGEN .
APPLICATION = STRIP(APPL)
APPLGEN = STRIP(APPLGEN)
PARSE VAR THEREST . CREATE
"GENTIME Z" CREATE
DATE2 = CLANGVAR("%ZYEAR%ZMM%ZDD")
IF DATE2 > DATE1 THEN RETURN
"ESP AJ ALL TERMINATE APPL(" || APPLICATION || "." || APPLGEN || ")",
"REASON('FORCED BY USER')"