On Wed, 25 Mar 2020 04:43:52 -0500, Bruce Hewson wrote:
>
>In a REXX exec I was building I stumbled onto:-
>
>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 wonder how this is influenced by the statement in the Ref.:
    The MVSVAR('SYMDEF',string) function goes through REXX substitution for 
string first,
    the result of which must be a 1-8 character symbolic-name specifying the 
symbol that
    has been defined in the SYMDEF statement. Any other values including REXX 
delimiters
    might cause unpredictable results.

... since the value of an unassigned symbol is its name, uppercased.
What happens if you provide values for the symbol-tokens?:

testing = 'xxxx'
in = 'yyyy'
Say 'MVSVAR'("SYMDEF",'testing &sysname in &sysplex')

... pretty weird regardless.

-- gil

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

Reply via email to