<?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 Creating macro variable on another SAS session with grdsvc_enable and rsubmit in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Creating-macro-variable-on-another-SAS-session-with-grdsvc/m-p/732194#M228159</link>
    <description>&lt;P&gt;Here I have the code that I want to execute on &amp;amp;lsaslgsr server with a new session. And the result of execution of this code. Even though I create macro variable&amp;nbsp;ProgNum inside of&amp;nbsp;rsubmit-endrsubmit, I still see the Error that indicates that PROGINLIST not resolved. Also, I don't see the execution of:&lt;/P&gt;&lt;P&gt;&lt;CODE class=" language-sas"&gt;%let checker = et;&lt;/CODE&gt;&lt;/P&gt;&lt;P&gt;&lt;CODE class=" language-sas"&gt;%put &amp;amp;ProgInList.; %put &amp;amp;checker.;&lt;/CODE&gt;&lt;CODE class=" language-sas"&gt;&lt;/CODE&gt;&lt;/P&gt;&lt;P&gt;&lt;CODE class=" language-sas"&gt;The solution that I found is to mask % symbol (like %nrstr (%%)let checker = et;) and only after that I can use this macro variable.&lt;/CODE&gt;&lt;/P&gt;&lt;P&gt;Does someone know any solution to that or the explanation why it works this way? Thank you so much in advance.&lt;/P&gt;&lt;P&gt;How can I get rid of the Error that I have now?&lt;/P&gt;&lt;P&gt;&lt;CODE class=" language-sas"&gt;&lt;/CODE&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;NOTE: Remote signon to RMPG1 complete.
NOTE: Background remote submit to RMPG1 in progress.
NOTE: Remote submit to RMPG1 commencing.
WARNING: Apparent symbolic reference PROGINLIST not resolved.
&amp;amp;ProgInList.
et
56         waitfor _all_;
1     options mstored sasmstore=allmacro;
2     data _null_;
3     ProgInList_ = (&amp;amp;SessNum-1)*(&amp;amp;LNumProgOnGrid-&amp;amp;ProgNum)+&amp;amp;SessNum*&amp;amp;ProgNum;
                                                  -
                                                  22
WARNING: Apparent symbolic reference PROGNUM not resolved.
3     ProgInList_ = (&amp;amp;SessNum-1)*(&amp;amp;LNumProgOnGrid-&amp;amp;ProgNum)+&amp;amp;SessNum*&amp;amp;ProgNum;
                                                                     -
                                                                     22
ERROR 22-322: Syntax error, expecting one of the following: a name, a quoted string, a numeric constant, a datetime constant,
              a missing value, INPUT, PUT.
 
WARNING: Apparent symbolic reference PROGNUM not resolved.
4     call symput("ProgInList",strip(put(ProgInList_,best.)));
5     put ProgInList_;
6     run;
 
NOTE: The SAS System stopped processing this step because of errors.
NOTE: DATA statement used (Total process time):

      real time           0.00 seconds
      cpu time            0.00 seconds
 
 
NOTE: Remote submit to RMPG1 complete.&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;%let lNumSessOnGrid = 1;
%let LNumProgOnGrid = 1;

%let gridchrc = %sysfunc(grdsvc_enable(_all_, server=&amp;amp;lsaslgsr));
%macro check;
  /* Loop for number of grid sessions  */
%do SessNum=1 %to &amp;amp;lNumSessOnGrid; /* 20 - LOOP OPEN */

    %syslput _all_/remote=rmpg&amp;amp;SessNum;
	rsubmit rmpg&amp;amp;SessNum wait=no connectpersist=no inheritlib=(allmacro );
	options mstored sasmstore=allmacro;

  /* Loop for number on programs on each grid */
	%let checker = et;
      %do ProgNum=1 %to &amp;amp;LNumProgOnGrid; /* 21 - LOOP OPEN */
	  data _null_;
		ProgInList_ = (&amp;amp;SessNum-1)*(&amp;amp;LNumProgOnGrid-&amp;amp;ProgNum)+&amp;amp;SessNum*&amp;amp;ProgNum;
	    call symput("ProgInList",strip(put(ProgInList_,best.)));
		put ProgInList_;
	  run;
      %put &amp;amp;ProgInList.;
	  %put &amp;amp;checker.;
	  %end;/* 21 - LOOP OPEN */

	endrsubmit;

 %end;/* 20 - LOOP CLOSE */
 %mend;
 %check;
waitfor _all_;
signoff _all_;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 08 Apr 2021 12:15:08 GMT</pubDate>
    <dc:creator>Pavlo11</dc:creator>
    <dc:date>2021-04-08T12:15:08Z</dc:date>
    <item>
      <title>Creating macro variable on another SAS session with grdsvc_enable and rsubmit</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Creating-macro-variable-on-another-SAS-session-with-grdsvc/m-p/732194#M228159</link>
      <description>&lt;P&gt;Here I have the code that I want to execute on &amp;amp;lsaslgsr server with a new session. And the result of execution of this code. Even though I create macro variable&amp;nbsp;ProgNum inside of&amp;nbsp;rsubmit-endrsubmit, I still see the Error that indicates that PROGINLIST not resolved. Also, I don't see the execution of:&lt;/P&gt;&lt;P&gt;&lt;CODE class=" language-sas"&gt;%let checker = et;&lt;/CODE&gt;&lt;/P&gt;&lt;P&gt;&lt;CODE class=" language-sas"&gt;%put &amp;amp;ProgInList.; %put &amp;amp;checker.;&lt;/CODE&gt;&lt;CODE class=" language-sas"&gt;&lt;/CODE&gt;&lt;/P&gt;&lt;P&gt;&lt;CODE class=" language-sas"&gt;The solution that I found is to mask % symbol (like %nrstr (%%)let checker = et;) and only after that I can use this macro variable.&lt;/CODE&gt;&lt;/P&gt;&lt;P&gt;Does someone know any solution to that or the explanation why it works this way? Thank you so much in advance.&lt;/P&gt;&lt;P&gt;How can I get rid of the Error that I have now?&lt;/P&gt;&lt;P&gt;&lt;CODE class=" language-sas"&gt;&lt;/CODE&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;NOTE: Remote signon to RMPG1 complete.
NOTE: Background remote submit to RMPG1 in progress.
NOTE: Remote submit to RMPG1 commencing.
WARNING: Apparent symbolic reference PROGINLIST not resolved.
&amp;amp;ProgInList.
et
56         waitfor _all_;
1     options mstored sasmstore=allmacro;
2     data _null_;
3     ProgInList_ = (&amp;amp;SessNum-1)*(&amp;amp;LNumProgOnGrid-&amp;amp;ProgNum)+&amp;amp;SessNum*&amp;amp;ProgNum;
                                                  -
                                                  22
WARNING: Apparent symbolic reference PROGNUM not resolved.
3     ProgInList_ = (&amp;amp;SessNum-1)*(&amp;amp;LNumProgOnGrid-&amp;amp;ProgNum)+&amp;amp;SessNum*&amp;amp;ProgNum;
                                                                     -
                                                                     22
ERROR 22-322: Syntax error, expecting one of the following: a name, a quoted string, a numeric constant, a datetime constant,
              a missing value, INPUT, PUT.
 
WARNING: Apparent symbolic reference PROGNUM not resolved.
4     call symput("ProgInList",strip(put(ProgInList_,best.)));
5     put ProgInList_;
6     run;
 
NOTE: The SAS System stopped processing this step because of errors.
NOTE: DATA statement used (Total process time):

      real time           0.00 seconds
      cpu time            0.00 seconds
 
 
NOTE: Remote submit to RMPG1 complete.&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;%let lNumSessOnGrid = 1;
%let LNumProgOnGrid = 1;

%let gridchrc = %sysfunc(grdsvc_enable(_all_, server=&amp;amp;lsaslgsr));
%macro check;
  /* Loop for number of grid sessions  */
%do SessNum=1 %to &amp;amp;lNumSessOnGrid; /* 20 - LOOP OPEN */

    %syslput _all_/remote=rmpg&amp;amp;SessNum;
	rsubmit rmpg&amp;amp;SessNum wait=no connectpersist=no inheritlib=(allmacro );
	options mstored sasmstore=allmacro;

  /* Loop for number on programs on each grid */
	%let checker = et;
      %do ProgNum=1 %to &amp;amp;LNumProgOnGrid; /* 21 - LOOP OPEN */
	  data _null_;
		ProgInList_ = (&amp;amp;SessNum-1)*(&amp;amp;LNumProgOnGrid-&amp;amp;ProgNum)+&amp;amp;SessNum*&amp;amp;ProgNum;
	    call symput("ProgInList",strip(put(ProgInList_,best.)));
		put ProgInList_;
	  run;
      %put &amp;amp;ProgInList.;
	  %put &amp;amp;checker.;
	  %end;/* 21 - LOOP OPEN */

	endrsubmit;

 %end;/* 20 - LOOP CLOSE */
 %mend;
 %check;
waitfor _all_;
signoff _all_;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 08 Apr 2021 12:15:08 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Creating-macro-variable-on-another-SAS-session-with-grdsvc/m-p/732194#M228159</guid>
      <dc:creator>Pavlo11</dc:creator>
      <dc:date>2021-04-08T12:15:08Z</dc:date>
    </item>
    <item>
      <title>Re: Creating macro variable on another SAS session with grdsvc_enable and rsubmit</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Creating-macro-variable-on-another-SAS-session-with-grdsvc/m-p/732239#M228177</link>
      <description>&lt;P&gt;Hello&lt;BR /&gt;I don't see the macro definition for &lt;SPAN style="background-color: #f5f5f5; font-family: Menlo, Monaco, Consolas, 'Courier New', monospace; font-size: 13px;"&gt;ProgInList in the log you have shown.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 08 Apr 2021 15:32:25 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Creating-macro-variable-on-another-SAS-session-with-grdsvc/m-p/732239#M228177</guid>
      <dc:creator>Sajid01</dc:creator>
      <dc:date>2021-04-08T15:32:25Z</dc:date>
    </item>
    <item>
      <title>Re: Creating macro variable on another SAS session with grdsvc_enable and rsubmit</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Creating-macro-variable-on-another-SAS-session-with-grdsvc/m-p/732241#M228179</link>
      <description>There is no macro definition of this variable in the log, even though I take care of it in the data step. Check the code below the log. I get this log after the execution of the SAS code below</description>
      <pubDate>Thu, 08 Apr 2021 15:37:07 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Creating-macro-variable-on-another-SAS-session-with-grdsvc/m-p/732241#M228179</guid>
      <dc:creator>Pavlo11</dc:creator>
      <dc:date>2021-04-08T15:37:07Z</dc:date>
    </item>
    <item>
      <title>Re: Creating macro variable on another SAS session with grdsvc_enable and rsubmit</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Creating-macro-variable-on-another-SAS-session-with-grdsvc/m-p/732266#M228190</link>
      <description>&lt;P&gt;I don't know why you bother with this code:&lt;/P&gt;
&lt;PRE&gt;     %do ProgNum=1 %to &amp;amp;LNumProgOnGrid; /* 21 - LOOP OPEN */
	  data _null_;
		ProgInList_ = (&amp;amp;SessNum-1)*(&amp;amp;LNumProgOnGrid-&amp;amp;ProgNum)+&amp;amp;SessNum*&amp;amp;ProgNum;
	    call symput("ProgInList",strip(put(ProgInList_,best.)));
		put ProgInList_;
	  run;
      %put &amp;amp;ProgInList.;
	  %put &amp;amp;checker.;
	  %end;/* 21 - LO&lt;/PRE&gt;
&lt;P&gt;The way you attempt to create the macro varible &amp;amp;Proginlist will only ever have the value where ProgNum = &amp;amp;LNumProgOnGrid. Each loop involving Prognum overwrites the previous &amp;amp;ProgInList.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Have you run your %check macro with OPTIONS MPRINT turned on? And possibly SYMBOLGEN?&lt;/P&gt;</description>
      <pubDate>Thu, 08 Apr 2021 16:55:08 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Creating-macro-variable-on-another-SAS-session-with-grdsvc/m-p/732266#M228190</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2021-04-08T16:55:08Z</dc:date>
    </item>
  </channel>
</rss>

