Joseph, I don't think your question has been understood. If so, then your question hasn't been answered. My interpretation of your question is that you have real code that has LCLC &FOO in open code that is behaving like GBLC &FOO. MACRO TESTMAC , GBLC &FOO &FOO SETC "MACRO" MEND
LCLC &FOO&FOO SETC "OPEN CODE" TESTMAC , MNOTE *,"FOO=&FOO" Are you saying that your testing shows &FOO is "MACRO" instead of "OPEN CODE"? On Tuesday, June 27, 2023 at 10:37:36 AM PDT, Charles Mills <charl...@mcn.org> wrote: IOW LCLC &FOO in open code and LCLC &FOO in a macro are different variables. GBLC &FOO in open code and GBLC &FOO in a macro are the same variable. Charles -----Original Message----- From: IBM Mainframe Assembler List [mailto:ASSEMBLER-LIST@LISTSERV.UGA.EDU] On Behalf Of Jonathan Scott Sent: Tuesday, June 27, 2023 10:05 AM To: ASSEMBLER-LIST@LISTSERV.UGA.EDU Subject: Re: Conditional assembly variable scope > Would any know the difference in scope > Of a local used in open code and a global used > In a macro the both seem to have a scope of the entire assembly A local variable is unique to the context where it is defined, so a local variable defined in open code applies to all open code, and a local variable in a macro is defined only in that macro. If the same name is used for a local variable in a different context, it refers to a separate variable. A global variable is the same variable in all contexts where it is defined. Jonathan Scott, HLASM IBM Hursley, UK