<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: DOSUBL macro variable scope in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/DOSUBL-macro-variable-scope/m-p/582876#M165861</link>
    <description>&lt;P&gt;Thanks&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/16961"&gt;@ChrisNZ&lt;/a&gt;&amp;nbsp;, that's a really nice example.&lt;/P&gt;
&lt;BLOCKQUOTE&gt;
&lt;P&gt;&lt;SPAN&gt;The way I see it, when dosubl() is called from inside a macro, it has write access to the macro symbol table, and read access to the global table.&lt;/SPAN&gt;&lt;/P&gt;
&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&lt;SPAN&gt;I see it differently. I think when dosubl() is called from inside a macro, it has read/write access to both the main session global table and the main session local macro symbol table.&amp;nbsp; I added to your code a bit:&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;%symdel a b c /nowarn ;

%let a=Global_A;
%let b=Global_B;
%put --Start--; %put _USER_ ;
%macro try() ;
  %local a; 
  %let a=Local_A;
  %put --MacroStart--; %put _USER_ ;
  data _null_ ;
    rc=dosubl('%put --DoSub 1-- ; %put _user_ ; %let a=DoSubl_A ; %let b=Dosubl_B ; %let c=Dosubl_C ; %put --DoSub 2-- ; %put _USER_ ;' ) ;
  run ;
  %put --MacroEnd--; %put _USER_ ;
%mend try ;

%try()  ;
%put --End--; %put _USER_ ;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&lt;SPAN&gt;Returns:&lt;/SPAN&gt;&lt;/P&gt;
&lt;PRE&gt;--MacroStart--
TRY A Local_A
GLOBAL A Global_A
GLOBAL B Global_B

--DoSub 1--
TRY A Local_A
GLOBAL A Global_A
GLOBAL B Global_B
--DoSub 2--
GLOBAL A DoSubl_A
GLOBAL B Dosubl_B
GLOBAL C Dosubl_C
TRY A Local_A
GLOBAL A Global_A
GLOBAL B Global_B

--MacroEnd--
TRY A DoSubl_A
GLOBAL A Global_A
GLOBAL B Dosubl_B
GLOBAL C Dosubl_C
533  %put --End--; %put _USER_ ;
--End--
GLOBAL A Global_A
GLOBAL B Dosubl_B
GLOBAL C Dosubl_C
&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;That shows that DOSUBL returned A to the local symbol table of %TRY, and returned B and C to the main session global symbol table.&amp;nbsp; I think it would be better if C were returned to the local symbol table, but I can live with it.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 21 Aug 2019 16:07:05 GMT</pubDate>
    <dc:creator>Quentin</dc:creator>
    <dc:date>2019-08-21T16:07:05Z</dc:date>
    <item>
      <title>DOSUBL macro variable scope</title>
      <link>https://communities.sas.com/t5/SAS-Programming/DOSUBL-macro-variable-scope/m-p/582546#M165699</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If I submit the following code in a SAS session (9.4M4 and 9.4M6), %PUT _USER_ shows that there are two different macro variables named A:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;%let A=Global_A;

%macro try() ;
  data _null_ ;
    rc=dosubl('%let A=DoSubl_A ; %put _user_ ;' ) ;
  run ;
%mend try ;

%try()&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Returns:&lt;/P&gt;
&lt;PRE&gt;161  %try()

GLOBAL A DoSubl_A
GLOBAL A Global_A
&lt;/PRE&gt;
&lt;P&gt;Question #1: I think this suggests that the side session has it's own global symbol table.&amp;nbsp; And %PUT _USER_ is showing the content of both the main session global symbol table and the side session symbol table.&amp;nbsp; Do you agree?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Interestingly, if DoSubl is called outside of a macro, the results are different:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;%let A=Global_A;

data _null_ ;
  rc=dosubl('%let A=DoSubl_A ; %put _user_ ;' ) ;
run ;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;returns:&lt;/P&gt;
&lt;PRE&gt;GLOBAL A DoSubl_A
&lt;/PRE&gt;
&lt;P&gt;I think when DOSUBL is called outside of a macro, when the side-submitted %LET statement executes, it actually updates the value of A in the main session global symbol table, rather than create a new macro variable A in the side session global symbol table.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Question #2: Any idea *why* these two bits of code should return different results?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks,&lt;/P&gt;
&lt;P&gt;-Q.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 20 Aug 2019 19:02:08 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/DOSUBL-macro-variable-scope/m-p/582546#M165699</guid>
      <dc:creator>Quentin</dc:creator>
      <dc:date>2019-08-20T19:02:08Z</dc:date>
    </item>
    <item>
      <title>Re: DOSUBL macro variable scope</title>
      <link>https://communities.sas.com/t5/SAS-Programming/DOSUBL-macro-variable-scope/m-p/582655#M165770</link>
      <description>&lt;P&gt;My understanding:&lt;/P&gt;
&lt;P&gt;&lt;EM&gt;&amp;gt;&amp;nbsp;side session has it's own global symbol table&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;Yes it does. And that global table is deleted at then end of the Sub session.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The way I see it, when dosubl() is called from inside a macro, it has write access to the macro symbol table, and read access to the global table.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;When dosubl() is called from outside of a macro, it has write access to the global symbol table.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Look:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;%let a=Global_A;
%let b=Global_B;
%put --Start--; %put _USER_ ;
%macro try() ;
  %local a; 
  %let a=Local_A;
  %put --MacroStart--; %put _USER_ ;
  data _null_ ;
    rc=dosubl('%let a=DoSubl_A ; %put --DoSub--; %put _USER_ ;' ) ;
  run ;
  %put --MacroEnd--; %put _USER_ ;
%mend try ;

%try()  ;
%put --End--; %put _USER_ ;



%let a=Global_A;
%put --Start--; %put _USER_ ;
data _null_ ;
  rc=dosubl(' %put --Before--; %put _user_ ; %let a=DoSubl_A ; %put --After--; %put _user_ ;' ) ;
run ;    
%put --End--; %put _USER_ ;
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;--Start--&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;GLOBAL A Global_A&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;GLOBAL B Global_B&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="courier new,courier"&gt;--MacroStart--&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;TRY A Local_A&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;GLOBAL A Global_A&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;GLOBAL B Global_B&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="courier new,courier"&gt;--DoSub--&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;GLOBAL A DoSubl_A&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;TRY A Local_A&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;GLOBAL A Global_A&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;GLOBAL B Global_B&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="courier new,courier"&gt;--MacroEnd--&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;TRY A Global_A&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;GLOBAL A Global_A&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;GLOBAL B Global_B&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="courier new,courier"&gt;--End--&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;GLOBAL A Global_A&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;GLOBAL B Global_B&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;--Start--&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;GLOBAL A Global_A&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;GLOBAL B Global_B&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="courier new,courier"&gt;--Before--&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;GLOBAL A Global_A&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;GLOBAL B Global_B&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="courier new,courier"&gt;--After--&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;GLOBAL A DoSubl_A&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;GLOBAL B Global_B&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="courier new,courier"&gt;--End--&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;GLOBAL A DoSubl_A&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;GLOBAL B Global_B&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 21 Aug 2019 02:25:44 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/DOSUBL-macro-variable-scope/m-p/582655#M165770</guid>
      <dc:creator>ChrisNZ</dc:creator>
      <dc:date>2019-08-21T02:25:44Z</dc:date>
    </item>
    <item>
      <title>Re: DOSUBL macro variable scope</title>
      <link>https://communities.sas.com/t5/SAS-Programming/DOSUBL-macro-variable-scope/m-p/582876#M165861</link>
      <description>&lt;P&gt;Thanks&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/16961"&gt;@ChrisNZ&lt;/a&gt;&amp;nbsp;, that's a really nice example.&lt;/P&gt;
&lt;BLOCKQUOTE&gt;
&lt;P&gt;&lt;SPAN&gt;The way I see it, when dosubl() is called from inside a macro, it has write access to the macro symbol table, and read access to the global table.&lt;/SPAN&gt;&lt;/P&gt;
&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&lt;SPAN&gt;I see it differently. I think when dosubl() is called from inside a macro, it has read/write access to both the main session global table and the main session local macro symbol table.&amp;nbsp; I added to your code a bit:&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;%symdel a b c /nowarn ;

%let a=Global_A;
%let b=Global_B;
%put --Start--; %put _USER_ ;
%macro try() ;
  %local a; 
  %let a=Local_A;
  %put --MacroStart--; %put _USER_ ;
  data _null_ ;
    rc=dosubl('%put --DoSub 1-- ; %put _user_ ; %let a=DoSubl_A ; %let b=Dosubl_B ; %let c=Dosubl_C ; %put --DoSub 2-- ; %put _USER_ ;' ) ;
  run ;
  %put --MacroEnd--; %put _USER_ ;
%mend try ;

%try()  ;
%put --End--; %put _USER_ ;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&lt;SPAN&gt;Returns:&lt;/SPAN&gt;&lt;/P&gt;
&lt;PRE&gt;--MacroStart--
TRY A Local_A
GLOBAL A Global_A
GLOBAL B Global_B

--DoSub 1--
TRY A Local_A
GLOBAL A Global_A
GLOBAL B Global_B
--DoSub 2--
GLOBAL A DoSubl_A
GLOBAL B Dosubl_B
GLOBAL C Dosubl_C
TRY A Local_A
GLOBAL A Global_A
GLOBAL B Global_B

--MacroEnd--
TRY A DoSubl_A
GLOBAL A Global_A
GLOBAL B Dosubl_B
GLOBAL C Dosubl_C
533  %put --End--; %put _USER_ ;
--End--
GLOBAL A Global_A
GLOBAL B Dosubl_B
GLOBAL C Dosubl_C
&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;That shows that DOSUBL returned A to the local symbol table of %TRY, and returned B and C to the main session global symbol table.&amp;nbsp; I think it would be better if C were returned to the local symbol table, but I can live with it.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 21 Aug 2019 16:07:05 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/DOSUBL-macro-variable-scope/m-p/582876#M165861</guid>
      <dc:creator>Quentin</dc:creator>
      <dc:date>2019-08-21T16:07:05Z</dc:date>
    </item>
    <item>
      <title>Re: DOSUBL macro variable scope</title>
      <link>https://communities.sas.com/t5/SAS-Programming/DOSUBL-macro-variable-scope/m-p/583041#M165933</link>
      <description>&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/19879"&gt;@Quentin&lt;/a&gt;&amp;nbsp;&amp;nbsp;You results differ from mine.&lt;/P&gt;
&lt;P&gt;If I run your code, the result is:&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;--Start--&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;GLOBAL A Global_A&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;GLOBAL B Global_B&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;--MacroStart--&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;TRY A Local_A&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;GLOBAL A Global_A&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;GLOBAL B Global_B&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="courier new,courier"&gt;--DoSub 1--&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;TRY A Local_A&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;GLOBAL A Global_A&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;GLOBAL B Global_B&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="courier new,courier"&gt;--DoSub 2--&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;GLOBAL A DoSubl_A&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;GLOBAL B Dosubl_B&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;GLOBAL C Dosubl_C&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;TRY A Local_A&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;GLOBAL A Global_A&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;GLOBAL B Global_B&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="courier new,courier"&gt;--MacroEnd--&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;TRY A Global_A&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;GLOBAL A Global_A&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;GLOBAL B Global_B&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;GLOBAL C Dosubl_C&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="courier new,courier"&gt;--End--&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;GLOBAL A Global_A&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;GLOBAL B Global_B&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;GLOBAL C Dosubl_C&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="courier new,courier"&gt;SYSHOSTINFOLONG = X64_SRV12 WIN 6.2.9200 Server&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="courier new,courier"&gt;SYSVLONG4&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;= 9.04.01M2P07232014&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 22 Aug 2019 02:41:24 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/DOSUBL-macro-variable-scope/m-p/583041#M165933</guid>
      <dc:creator>ChrisNZ</dc:creator>
      <dc:date>2019-08-22T02:41:24Z</dc:date>
    </item>
    <item>
      <title>Re: DOSUBL macro variable scope</title>
      <link>https://communities.sas.com/t5/SAS-Programming/DOSUBL-macro-variable-scope/m-p/583042#M165934</link>
      <description>&lt;P&gt;I added a variable D to your code, that I delete inside the dosubl().&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;%symdel a b c /nowarn ;

%let a=Global_A;
%let b=Global_B;
%let d=Global_D;
%put --Start--; %put _USER_ ;
%macro try() ;
  %local a; 
  %let a=Local_A;
  %put --MacroStart--; %put _USER_ ;
  data _null_ ;
    rc=dosubl('%put --DoSub 1-- ; %put _user_ ; %let a=DoSubl_A ; %let b=Dosubl_B ; %let c=Dosubl_C ; %put --DoSub 2-- ; %symdel d; %put _USER_ ;' ) ;
  run ;
  %put --MacroEnd--; %put _USER_ ;
%mend try ;

%try()  ;
%put --End--; %put _USER_ ;
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;I can create global variable C and delete global variable D, but not overwrite global variable B.&lt;/P&gt;
&lt;PRE&gt;--Start--
GLOBAL A Global_A
GLOBAL B Global_B
GLOBAL D Global_D

--MacroStart--
TRY A Local_A
GLOBAL A Global_A
GLOBAL B Global_B
GLOBAL D Global_D

--DoSub 1--
TRY A Local_A
GLOBAL A Global_A
GLOBAL B Global_B
GLOBAL D Global_D

--DoSub 2--
GLOBAL A DoSubl_A
GLOBAL B Dosubl_B
GLOBAL C Dosubl_C
TRY A Local_A
GLOBAL A Global_A
GLOBAL B Global_B
   
--MacroEnd--
TRY A Global_A
GLOBAL A Global_A
GLOBAL B Global_B
GLOBAL C Dosubl_C

--End--
GLOBAL A Global_A
GLOBAL B Global_B
GLOBAL C Dosubl_C&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 22 Aug 2019 02:46:47 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/DOSUBL-macro-variable-scope/m-p/583042#M165934</guid>
      <dc:creator>ChrisNZ</dc:creator>
      <dc:date>2019-08-22T02:46:47Z</dc:date>
    </item>
    <item>
      <title>Re: DOSUBL macro variable scope</title>
      <link>https://communities.sas.com/t5/SAS-Programming/DOSUBL-macro-variable-scope/m-p/583051#M165940</link>
      <description>&lt;P&gt;The differences you see could be cause by the different sas versions involved. I think that dosubl got an update with m3.&lt;/P&gt;</description>
      <pubDate>Thu, 22 Aug 2019 05:11:22 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/DOSUBL-macro-variable-scope/m-p/583051#M165940</guid>
      <dc:creator>andreas_lds</dc:creator>
      <dc:date>2019-08-22T05:11:22Z</dc:date>
    </item>
    <item>
      <title>Re: DOSUBL macro variable scope</title>
      <link>https://communities.sas.com/t5/SAS-Programming/DOSUBL-macro-variable-scope/m-p/583058#M165946</link>
      <description>&lt;P&gt;That would make sense. &lt;EM&gt;Upgrade&lt;/EM&gt; as in &lt;EM&gt;fix&lt;/EM&gt; by the looks of it. &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 22 Aug 2019 05:44:48 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/DOSUBL-macro-variable-scope/m-p/583058#M165946</guid>
      <dc:creator>ChrisNZ</dc:creator>
      <dc:date>2019-08-22T05:44:48Z</dc:date>
    </item>
    <item>
      <title>Re: DOSUBL macro variable scope</title>
      <link>https://communities.sas.com/t5/SAS-Programming/DOSUBL-macro-variable-scope/m-p/583167#M165984</link>
      <description>&lt;P&gt;There was a fix to DOSUBL macro var scoping in 9.4M4, that likely explains the difference.&amp;nbsp; This thread discusses one bug that was fixed: &lt;A href="https://communities.sas.com/t5/SAS-Programming/DOSUBL-scope-of-returned-macro-variables/td-p/138691" target="_blank"&gt;https://communities.sas.com/t5/SAS-Programming/DOSUBL-scope-of-returned-macro-variables/td-p/138691&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I haven't tested much in M6.&amp;nbsp; I haven't heard of any changes yet.&amp;nbsp; It's one of the challenges with not having the DOSUBL macro var scoping rules documented officially.&amp;nbsp; It's sometimes hard to know what is the intended behavior we can count on to be maintained in future releases, and what behaviors might be changed in a future bug fix.&amp;nbsp; Personally, I'm hoping that the 9.4M4 scoping behavior is stable/done, even though I disagree with some small aspects.&amp;nbsp;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;That idea of deleting main session global macro variables from within DOSUBL side session is very interesting.&amp;nbsp; I can do that as well in 9.4M4.&amp;nbsp; I think this means that when the docs say that macro variables are imported from main session to side session, it's not accurate. I think the side session can directly access the symbol tables of the main session.&amp;nbsp; &amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 22 Aug 2019 13:19:38 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/DOSUBL-macro-variable-scope/m-p/583167#M165984</guid>
      <dc:creator>Quentin</dc:creator>
      <dc:date>2019-08-22T13:19:38Z</dc:date>
    </item>
  </channel>
</rss>

