> how Z/OS handles symbol substitution. The is no "how Z/OS handles symbol substitution.", only how some particular piece of code in z/OS does it. The way, e.g., REXX, does is is quite different from what you describe.
Say we have these symbols defined in IEASYM00:- > &A1. = '01' > &B1. = 'TEST > &TEST01 = 'FOOBAR' > text string contains "&A1&B1" > After substitution the text string sill contain "FOOBAR"Say we have these > symbols defined in IEASYM00:- > &A1. = '01' > &B1. = 'TEST > &TEST01 = 'FOOBAR' > text string contains "&A1&B1" > After substitution the text string sill contain "FOOBAR" ITYM &&&B1&A1, since Â1&B1 expands to 01TEST and &B1&A1 expands to TEST01 (no ampersand). > The MVSVAR external function Do you mean an external function that you wrote or do you mean the built in TSO REXX function. If the latter, where is it documented that MVSVAR treats ampersand as anything but just another character? -- Shmuel (Seymour J.) Metz http://mason.gmu.edu/~smetz3 ________________________________________ From: IBM Mainframe Discussion List [[email protected]] on behalf of Bruce Hewson [[email protected]] Sent: Friday, March 27, 2020 12:25 AM To: [email protected] Subject: Re: REXX MVSVAR SYMDEF behavoiur Guys, the code receives a text string which may contain one or more symbols, denoted by prefix "&" and optional suffix ".", as per my reading of how Z/OS handles symbol substitution. Say we have these symbols defined in IEASYM00:- &A1. = '01' &B1. = 'TEST &TEST01 = 'FOOBAR' text string contains "&A1&B1" After substitution the text string sill contain "FOOBAR" The MVSVAR external function provides for this case, so it will substitute for any symbols in the text string, thus building a new SYMBOL name, repeating until all symbols are resolved, if possible. As I said, I was surprised that MVSVAR could take any text string, replacing any valid symbol names, returning the resulting text as a new SYMBOL NAME without error. Thank you for the comments. Regards Bruce ---------------------------------------------------------------------- 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
