BookmarkSubscribeRSS Feed
INOV8_Br1an_g
Calcite | Level 5

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;
2 REPLIES 2
SASKiwi
PROC Star

I think your SIGNON statement should be signon RemServ not RemHst&i2.

 

 

INOV8_Br1an_g
Calcite | Level 5

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.

 

 

hackathon24-white-horiz.png

2025 SAS Hackathon: There is still time!

Good news: We've extended SAS Hackathon registration until Sept. 12, so you still have time to be part of our biggest event yet – our five-year anniversary!

Register Now

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.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 2 replies
  • 1391 views
  • 0 likes
  • 2 in conversation