BookmarkSubscribeRSS Feed
Pavlo11
Fluorite | Level 6

Here I have the code that I want to execute on &lsaslgsr server with a new session. And the result of execution of this code. Even though I create macro variable ProgNum inside of rsubmit-endrsubmit, I still see the Error that indicates that PROGINLIST not resolved. Also, I don't see the execution of:

%let checker = et;

%put &ProgInList.; %put &checker.;

The solution that I found is to mask % symbol (like %nrstr (%%)let checker = et;) and only after that I can use this macro variable.

Does someone know any solution to that or the explanation why it works this way? Thank you so much in advance.

How can I get rid of the Error that I have now?

 

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.
&ProgInList.
et
56         waitfor _all_;
1     options mstored sasmstore=allmacro;
2     data _null_;
3     ProgInList_ = (&SessNum-1)*(&LNumProgOnGrid-&ProgNum)+&SessNum*&ProgNum;
                                                  -
                                                  22
WARNING: Apparent symbolic reference PROGNUM not resolved.
3     ProgInList_ = (&SessNum-1)*(&LNumProgOnGrid-&ProgNum)+&SessNum*&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.

 

%let lNumSessOnGrid = 1;
%let LNumProgOnGrid = 1;

%let gridchrc = %sysfunc(grdsvc_enable(_all_, server=&lsaslgsr));
%macro check;
  /* Loop for number of grid sessions  */
%do SessNum=1 %to &lNumSessOnGrid; /* 20 - LOOP OPEN */

    %syslput _all_/remote=rmpg&SessNum;
	rsubmit rmpg&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 &LNumProgOnGrid; /* 21 - LOOP OPEN */
	  data _null_;
		ProgInList_ = (&SessNum-1)*(&LNumProgOnGrid-&ProgNum)+&SessNum*&ProgNum;
	    call symput("ProgInList",strip(put(ProgInList_,best.)));
		put ProgInList_;
	  run;
      %put &ProgInList.;
	  %put &checker.;
	  %end;/* 21 - LOOP OPEN */

	endrsubmit;

 %end;/* 20 - LOOP CLOSE */
 %mend;
 %check;
waitfor _all_;
signoff _all_;

 

3 REPLIES 3
Sajid01
Meteorite | Level 14

Hello
I don't see the macro definition for ProgInList in the log you have shown.

 

Pavlo11
Fluorite | Level 6
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
ballardw
Super User

I don't know why you bother with this code:

     %do ProgNum=1 %to &LNumProgOnGrid; /* 21 - LOOP OPEN */
	  data _null_;
		ProgInList_ = (&SessNum-1)*(&LNumProgOnGrid-&ProgNum)+&SessNum*&ProgNum;
	    call symput("ProgInList",strip(put(ProgInList_,best.)));
		put ProgInList_;
	  run;
      %put &ProgInList.;
	  %put &checker.;
	  %end;/* 21 - LO

The way you attempt to create the macro varible &Proginlist will only ever have the value where ProgNum = &LNumProgOnGrid. Each loop involving Prognum overwrites the previous &ProgInList.

 

Have you run your %check macro with OPTIONS MPRINT turned on? And possibly SYMBOLGEN?

SAS Innovate 2025: Call for Content

Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 16. Read more here about why you should contribute and what is in it for you!

Submit your idea!

How to Concatenate Values

Learn how use the CAT functions in SAS to join values from multiple variables into a single value.

Find more tutorials on the SAS Users YouTube channel.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 3 replies
  • 486 views
  • 0 likes
  • 3 in conversation