Assembler, allegedly the model for JCL, gets both of those right. (From memory)
&FOO SETC 'Don''t' X DC C'&FOO' Gives you a constant of "Don't" (and no syntax error). C on the other hand does not substitute for symbols -- C calls them macros -- inside a character constant. #define FOO Don't char x[] = "FOO"; gives you a constant of "FOO". You have to jump through some real hoops to get a symbol into a character literal. Charles -----Original Message----- From: IBM Mainframe Discussion List [mailto:[email protected]] On Behalf Of Paul Gilmartin Sent: Thursday, February 28, 2019 5:45 PM To: [email protected] Subject: Re: How do I get a lower-case value into a "long" symbol? On Thu, 28 Feb 2019 16:25:23 -0800, Charles Mills wrote: > >As I recall now I have had this issue before, and solved it with (or >something like) > >// SET Q='''' >... >// SET LONGSYM=&Q.&SYM1.&SYM2.&Q > Yup. It is a misdesigh that symbols are not substituted between apostrophes in the operand of SET as they are in PARM, DSN, PATH, and a couple others. Does any IBM representative dare to defend this bad choice, other than, "Because we could!" In fact, why not everywhere! Be consistent. It's also wrong that apostrophes introduced by symbol substitution are not treated as ordinary text, not metacharacters. Rexx got that one right, but JCL designers seem to be too proud to learn from Rexx. ---------------------------------------------------------------------- For IBM-MAIN subscribe / signoff / archive access instructions, send email to [email protected] with the message: INFO IBM-MAIN
