tomh

Referencing global variables from VGET command

Discussion created by tomh on Apr 23, 2010
I have a schedule that issues the following VGET command  VGET %AP_EPSFHMD TABLE(TESTTBL)    The global variable table TESTTBL contains a variable %AP_EPSFHMD that  resolves to 'EPSSFHMD',   and the  value for that variable in the table is set to the value 'CLOSED'.    After I do the VGET, I want to  select a job in the schedule   if the value of the global variable  = 'CLOSED'.    In the code below, the value %AP_EPSFHMD = 'EPSSFHMD', not 'CLOSED', the value of the variable that I want to query in the if.  IF %AP_EPSFHMD = 'CLOSED' THEN -    
 DO                                                          
SELECT (JOB1)                                
 ENDDO                                          Is there a way to code the  if,  to query the value of the variable, not the name of the variable?? I would rather not hard code the following, which works correctly in the schedule after the VGET is run:  IF 'EPSSFHMD' = 'CLOSED' THEN -    
 DO                                                          
SELECT (JOB1)                                
 ENDDO                Thank you!                
 

Outcomes