I have an ESP proc using REXX that is trying to parse an ESP global variable.
What needs to be done to get the PARSE instruction to work using a variable that equals the global variable name?
Release : 12.0
Component : CA ESP WORKLOAD AUTOMATION
Converting REXX variable to ESP variable within a PARSE.
In order to parse a variable assigned in a Global Variable Table you would need the following.
REXXON
TRACE I
VARNAM='JHHT' /* set VARNAM to JHHT */
"VARNAM='"VARNAM"'" /* Pass REXX variable VARNAM */
"ESP VGET (%VARNAM) TABLE(VIEWMAIL)" /* Get the variable JHHT from GVT */
VARNAM1 = CLANGVAR('%JHHT') /* Convert REXX variable to ESP Variable */
PARSE VAR VARNAM1 JNAME JNUMBER MSG /* Parse the ESP variable JHHT */
"JNUMBER = '"JNUMBER"'"
"JNAME = '"JNAME"'"
"MSG = '"MSG"'"
REXXOFF