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_;
Hello
I don't see the macro definition for ProgInList in the log you have shown.
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?
April 27 – 30 | Gaylord Texan | Grapevine, Texas
Walk in ready to learn. Walk out ready to deliver. This is the data and AI conference you can't afford to miss.
Register now and lock in 2025 pricing—just $495!
Still thinking about your presentation idea? The submission deadline has been extended to Friday, Nov. 14, at 11:59 p.m. ET.
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.
Ready to level-up your skills? Choose your own adventure.