i am trying to submit the same code to each of our grid nodes. code runs cleanly and looks ok but the code I rsubmit runs on the same server as the local session and isn't going to another node.
heres what I have:
options minoperator mprint mlogic symbolgen COMPRESS=YES;
options sascmd="!sascmd -dmr -noautoexec";
/* find the day value for the stats */
data _null_;
call symput('Run_Day',PUT(Day(Date()),z2.));
run;
/* loop through all nodes */
%do i = 1 %to 5;
/* create 2 digit node identifier */
data _null_; call symput('i2',PUT(&i.,z2.));run;
/* server that we are going to submit code too */
%let RemServ=server&i2.b.server.net;
%let RemPort=57551;
%let RemHst&i2.=&RemServ &RemPort;
OPTIONS REMOTE=RemHst&i2.;
signon RemHst&i2.;
/* create the macro variable needed within the remote session */
%syslput i2 = &i2.;
%syslput Run_Day = &Run_Day.;
/* submit code to specific node on grid, connectperst=no allows job to complete and close the session */
rsubmit wait=no connectpersist=n log="/Logs/EG_Logs/SAR_&i2._&Run_Day..log";
%put The process ID is &sysjobid running on Server &syshostname = server&i2.b;
Data _NULL_;
command=%str(%"sar -n DEV 60 720 >> /Logs/EG_Logs/sarndev_nd)&i2._d&Run_Day. %str(& sar -r 60 720 >> /Logs/EG_Logs/sarr_nd)&i2._d&Run_Day. %str(& sar -b 60 720 >> /Logs/EG_Logs/sarb_nd)&i2._d&Run_Day. %str(&%");
call system(command);
run;
endrsubmit;
%end;
I think your SIGNON statement should be signon RemServ not RemHst&i2.
hi thanks for your reply and apologies for the delay.
I tried RemServ. first iteration it runs cleanly but still doesn't submit to the expected node (on the test run it ran on node 6 rather than node1), next iteration errors out as it cant find a link to the remote session.
It's your turn to help shape SAS Innovate 2027. Share your expertise and inspire the SAS community.
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.