jeudi 13 novembre 2014

Defining libref of current work library in Enterprise Guide


Vote count:

0




I am using SAS Enterprise Guide on a SAS GRID server and have some code that enables my code to execute on the quietest node of the GRID for speed and efficiency purposes. The node that is quietest at any given time is unlikely to be the one that I sign onto by default and this is creating difficulties with using temporary tables in Work libraries:



/* Grid enable the EG session */
%let rc=%sysfunc(grdsvc_enable(_all_, server=SASApp));
signon grid ;

/* Use rsubmit to submit your SAS code to the Grid. This way your code will run on the least busy node */
rsubmit grid;
data work.test;
a = 1;
run;
%put &SYSHOSTNAME;
Proc options option = work; run;
endrsubmit;

/* Without the rsubmit, the code will always run on the same Grid node
i.e. the Grid node which you connected to when EG started up */
%put &SYSHOSTNAME;
Proc options option = work; run;


In this example the file work.test may be the work library on node 2, whereas I logged into EG on node 1. EG will not allow to remote submit to GRID without signing on using a profile (which has to specify a node to connect to).


What I think I need is to define a libname statement for what the correct work library is. As this will change whenever I log on, I need something that can grab the libname of the work library on node1 and put it into a macro variable which can be used within a libname statement remote submitted to the GRID.


This libname statement will always point to node1, no matter what node the code executes on and stop me needing to store permanent tables at every transform.


Is this possible?


Thanks



asked 2 mins ago







Defining libref of current work library in Enterprise Guide

Aucun commentaire:

Enregistrer un commentaire