Using JOBONCSF output to find FTP jobs in SubDelay status in CA Workload Automation ESP Edition?

Document ID : KB000024743
Last Modified Date : 14/02/2018
Show Technical Document Details

Question:

When a FTP job goes into SubDelay status, we need to find it and force complete it. How do you check JOBONCSF output for an FTP job in SubDelay status?

Answer:

Code an CA ESP WA TASK in the same Procedure that contains the FTP job:

Note: PNODE field contains "SubDelay", NOT the STATUS field.

  APPL APP1 
  FTP_JOB JOB1 
   AGENT AGENTNAME                           
   FTPFORMAT A                                  
   LOCALFILENAME 'C:\Agent Tests\file1.txt' 
   REMOTEFILENAME '''PROD.PS.DATASET''' 
   SERVERADDR 1.1.1.1                     
   SERVERPORT 2121                             
   TRANSFERDIRECTION U                         
   USER USERIDA                                 
   RUN NOW                                     
  ENDJOB                                       
JOB JOB2 TASK RUN NOW EARLYSUB NOW PLUS 1 MINUTES REXXON PROC J = JOBONCSF('JOB1','X') DO I = 1 TO J IF XAPPLG.I = CLANGVAR('%ESPAPGEN') THEN DO IF XPNODE.I = 'SubDelay' THEN DO "ESPNOMSG AJ JOB1 COMPLETE APPL(%ESPAPPL..%ESPAPGEN)" END END REXXOFF ENDJOB