On Wed, 25 Mar 2020 04:43:52 -0500, Bruce Hewson wrote:
>
>Say 'MVSVAR'("SYMDEF",'testing &sysname in &sysplex')
>
>which provides an unexpected result 
>
>&'TESTING SYSA IN PLEX01'.   
>
>The symbols &SYSNAME and &SYSPLEX were replaced.
>And, sadly, the whole lot was uppercased.
>
>Couldn't find this behaviour documented.
>
I have a conjecture.  MVSVAR("SYMDEF",string) employes a symbol translator
utility such as EZACFSM1 (? Other? Which? Documentation?).  The statement
about performing substitution is superfluous; it's what Rexx expression 
evaluation
always does.  Here, it's just a distraction.  MVSVAR("SYMDEF",string) assumes
string names a system symbol, prefixes it with an ampersand, uppercases it
because EZACFSM1 expects upper and Rexx programmers expect case-
insensitivity, and passes the result to EZACFSM1 which translates
recognized symbols and leaves "&'TESTING alone as MVSVAR passed it.

I'm mystified at where the apostrophes come from.  Rexx expression
evaluation should have removed them.

"Unpredictable" is feckless.  MVSVAR should provide an error indication
if its documented syntax rules are violated.  But, "unpredictable" can
always be used to excuse WAD.

-- gil

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [email protected] with the message: INFO IBM-MAIN

Reply via email to