That's the right answer to the wrong question. You removed the apostrophes around foo, so the results are irrelevant. Try my code as written and I suspect that you will get results that differ from what's in the manual.
-- Shmuel (Seymour J.) Metz http://mason.gmu.edu/~smetz3 ________________________________________ From: IBM Mainframe Discussion List [[email protected]] on behalf of Dale R. Smith [[email protected]] Sent: Friday, March 27, 2020 2:39 PM To: [email protected] Subject: Re: REXX MVSVAR SYMDEF behavoiur On Fri, 27 Mar 2020 17:42:30 +0000, Seymour J Metz <[email protected]> wrote: >Even if you accept "the sky's the limit" for undefined behavior, there's still >the undocumented issue of whether it is permissible to include a leading >ampersand or a trailing period with the symbol, which is permissible in the >SYMDEF statement. Also, I'd like to see whether the following behaves as >documented: > > foo = SYSNAME > say MVSVAR('SYMDEF','foo') > > >-- >Shmuel (Seymour J.) Metz >http://mason.gmu.edu/~smetz3 Straight from REXXTRY under TSO on a z/OS V2.2 system: foo = 'SYSNAME' ............................................................................... ................................................... Say MVSVAR('SYMDEF',foo) SYS0 ............................................................................... ................................................... foo = 'INVALID' ............................................................................... ................................................... Say MVSVAR('SYMDEF',foo) ............................................................................... ................................................... say '"'MVSVAR('SYMDEF',foo)'"' "" I did that last one to show that if the Symbol Name does not exist, then SYMDEF returns a null value. &symbol is for use in JCL. SYMDEF needs the Name of the Symbol. -- Dale R. Smith Factotum ---------------------------------------------------------------------- For IBM-MAIN subscribe / signoff / archive access instructions, send email to [email protected] with the message: INFO IBM-MAIN ---------------------------------------------------------------------- For IBM-MAIN subscribe / signoff / archive access instructions, send email to [email protected] with the message: INFO IBM-MAIN
