Got ESP0013E VARIABLE ABC NOT DEFINED when ESP JOB is submitted
search cancel

Got ESP0013E VARIABLE ABC NOT DEFINED when ESP JOB is submitted

book

Article ID: 382789

calendar_today

Updated On:

Products

ESP Workload Automation

Issue/Introduction

We defined the variable ABC in one of the JOBs like below:
APPL TEST
JOB XYZ TASK SELFCOMPLETING                         
GENTIME NW  REALNOW                                 
ABC='%NWHH%NWMN%NWSS'                               
IF %ABC GE '19.30.00' THEN  DO                      
     ESPNOMSG AJ JOBB REQUEST APPL(%ESPAPPL..%ESPAPGEN) 
enddo                                                   
RUN DAILY    
RELEASE JOBB                                          
ENDJOB                            

JOB JOBB
...
ENDJOB   

And when JOBB is submitted, ESP issued following errors:
ESP0528E ERROR OCCURRED PROCESSING EVENT xxxxx
ESP0027E IF %ABC GE '19.30.00' THEN DO                                         
ESP0013E VARIABLE ABC NOT DEFINED                            

Environment

Component: ESP Workload Automation
Release: ALL

Resolution

Need to add below on the APPL level:
ABC=''

The reason is that the IF logic statements (even under JOB definitions) will be evaluated for every JOB submission. This is why the errors don't show at simulation time, but at JOB submission time.