Hi All
I have within the same SAS EG project two programs:
One working locally, the latter working on a unix server.
I would declare the macro variables just once in the first program (the local one) and then being able to import the macro variables within the server session too.
I searched on the web but I got not straight answer to this topic. Any idea about how I should proceed?
Bests
The only way this would be possible (in a straightforward way) would be to use SAS/CONNECT if it was licensed and installed on both platforms, but then you would start the server session from the local session, and not from EG itself.
Alternatively, you could store the name/value pairs for macrovars in a dataset, move that to the server (Copy Files or Upload Dataset task), and recreate the macrovars in a data step.
Tried something like this in the local program:
%let unixsrv= misci01p.unx.xxxx.com 8561;
options comamid=tcp;
signon unixsrv user='' password="";
options remote=unixsrv;
%syslput start_dt=&start_dt;
rsubmit;
endrsubmit;
signoff unixsrv;
But then It seems not working, as the signon is not happening. Any idea if it is a code matter?
Please post the log from that code (use the {i} button for posting logs).
ERROR: A communication subsystem partner link setup request failure has occurred. ERROR: TCP link establishment failed. 2 The SAS System 11:08 Wednesday, October 9, 2019 ERROR: Remote signon to UNIXSRV canceled. 3 The SAS System 11:08 Wednesday, October 9, 2019 1 ;*';*";*/;quit;run; 2 OPTIONS PAGENO=MIN; 3 %LET _CLIENTTASKLABEL='import'; 4 %LET _CLIENTPROCESSFLOWNAME='Process Flow'; 5 %LET _CLIENTPROJECTPATH='C:\Users\spndac\OneDrive - 5 ! SAS\SAS_EG_projects\Attribution_Model_112018\code\CallMarkov_local_Aggr_Simulation_BK.egp'; 6 %LET _CLIENTPROJECTPATHHOST='spnb147b'; 7 %LET _CLIENTPROJECTNAME='CallMarkov_local_Aggr_Simulation_BK.egp'; 8 %LET _SASPROGRAMFILE=''; 9 %LET _SASPROGRAMFILEHOST=''; 10 11 ODS _ALL_ CLOSE; 12 OPTIONS DEV=PNG; 13 GOPTIONS XPIXELS=0 YPIXELS=0; 14 FILENAME EGSR TEMP; 15 ODS tagsets.sasreport13(ID=EGSR) FILE=EGSR 16 STYLE=HTMLBlue 17 STYLESHEET=(URL="file:///C:/Program%20Files%20(x86)/SASHome/x86/SASEnterpriseGuide/7.1/Styles/HTMLBlue.css") 18 NOGTITLE 19 NOGFOOTNOTE 20 GPATH=&sasworklocation SYMBOLGEN: Macro variable SASWORKLOCATION resolves to "C:\Users\spndac\AppData\Roaming\SAS\EnterpriseGuide\EGTEMP\SEG-19212-2afa42b0\contents\SAS Temporary Files\_TD7764_spnb147b_\Prc2/" 21 ENCODING=UTF8 22 options(rolap="on") 23 ; NOTE: Writing TAGSETS.SASREPORT13(EGSR) Body file: EGSR 24 25 GOPTIONS ACCESSIBLE; SYMBOLGEN: Macro variable START_DT resolves to "02Jul2018"d 26 %put &start_dt; "02Jul2018"d 27 28 %let unixsrv= misci01p.unx.xxxx.com 8561; 29 30 signon unixsrv user=xxxx password=XXXXXXXXXXXX; NOTE: Remote signon to UNIXSRV commencing (SAS Release 9.04.01M6P110718).
Attached the log with errors
You use the wrong port; 8561 is the Metadata Server. You need to specify the port on which the Connect Spawner is listening. This can be retrieved with the SAS Management Console.
Switched to
%put &start_dt;
%let unixsrv= misci01p.unx.sas.com 8581;
options comamid=tcp remote=unixsrv;
signon unixsrv username='spndac' password="Harker321!";
%syslput start_dt=&start_dt;
rsubmit;
endrsubmit;
signoff unixsrv;
Which It seems should be the spawner port. However, the code run without an end.
Could be less problematic to create a table on the local session with the macro values, and export it to the server session? But again, how to export that
Build your skills. Make connections. Enjoy creative freedom. Maybe change the world. Registration is now open through August 30th. Visit the SAS Hackathon homepage.
Register today!SAS' Charu Shankar shares her PROC SQL expertise by showing you how to master the WHERE clause using real winter weather data.
Find more tutorials on the SAS Users YouTube channel.