How to abandon a File Trigger in CA Workload Automation ESP Edition
search cancel

How to abandon a File Trigger in CA Workload Automation ESP Edition

book

Article ID: 22076

calendar_today

Updated On:

Products

ESP Workload Automation

Issue/Introduction

Summary:

You have several file-dependent distributed jobs that need to run between certain hours of the day. If the file hasn't been received by a certain time, you no longer want the job to run. The ABANDON statement works well for a normal job. However, the File Trigger becomes active as soon as it is submitted and the ABANDON statement doesn't apply. At a certain time of the day, you want the File Trigger to end. How can you accomplish that?

Environment:

CA Workload Automation ESP Edition r11.4

Instructions:

Use a LINK PROCESS with a AJ command to complete the file_trigger.

This is the current file trigger:

 APPL abc 
 FILE_TRIGGER thefile   
 /* DESC=Utility to monitor a creation of a file.   
 DELAYSUB 08:00   
 RUN 3RD-20TH DAY OF MONTH   
 AGENT myagent   
 FILENAME D:\this.txt   
 ENDJOB

This is a solution to abandon @23:59:

 APPL abc 
 JOB thefileL LINK PROCESS   
 RUN 3RD-20TH DAY OF MONTH   
 DELAYSUB 23:59   
 REXXON PROC   
 ESPAPPL=CLANGVAR('%ESPAPPL')   
 ESPAPGEN=CLANGVAR('%ESPAPGEN')   
 J=JOBONCSF('thefile','X')   
 DO I=1 TO J   
 IF XAPPL.I = ESPAPPL & XAPPLG.I= ESPAPGEN & XSTATUS.I='ACTIVE' THEN   
 "ESP AJ thefile COMPLETE APPL(%ESPAPPL..%ESPAPGEN)"   
 END   
 REXXOFF   
 ENDJOB
 FILE_TRIGGER thefile 
 /* DESC=Utility to monitor a creation of a file.    
 DELAYSUB 08:00    
 RUN 3RD-20TH DAY OF MONTH    
 AGENT myagent    
 FILENAME D:\readme.txt    
 ENDJOB

In the above example, Link Process thefileL will run @23:59.  At that time, REXX will scan the CSF scoreboard for all active versions of thefile for the current application and application generation.  REXX will then complete the file trigger thefile.

Environment

Release: WKLASG00200-5.5-Workload Automation-Service Governor-EE
Component: