BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
wtien196838
Quartz | Level 8

Dear SAS community contributors,

 

I store weekend '20160409' into local macro variable END_OF_THIS_WEEK
     and '01OCT2015'd into local macro variable START_FISCAL_YEAR.
     I want to remote submit two macro varibles above to server to run SQL
     but it failed.  

 /******* my code:  ***********/

signon rlink;
libname rwork slibref=work server=prod;

rsubmit;

%SYSLPUT  END_WEEK_REMOTE = &END_OF_THIS_WEEK ;
%SYSLPUT  START_FY_REMOTE = &START_FISCAL_YEAR ;
 .....
proc sql;
......

endrsubmit;


 /*** error log ***/

    signon rlink;
NOTE: A link to PROD has been previously established. SIGNON is not necessary.
   libname rwork slibref=work server=prod;
NOTE: Libref RWORK was successfully assigned as follows:
      Engine:        REMOTE
      Physical Name: /saswork/SAS_work00810012_imapsrac1
      rsubmit;
NOTE: Remote submit to PROD commencing.
WARNING: Apparent symbolic reference END_OF_THIS_WEEK not resolved.
ERROR: A link must be established by executing the SIGNON command before you can communicate
       with UNKNOWN.
      %SYSLPUT  END_WEEK_REMOTE = &END_OF_THIS_WEEK ;
     %SYSLPUT  START_FY_REMOTE = &START_FISCAL_YEAR ;
WARNING: Apparent symbolic reference START_FISCAL_YEAR not resolved.
ERROR: A link must be established by executing the SIGNON command before you can communicate
       with UNKNOWN.


    I use PC SAS 9.3 and SAS/Connect to unix server.
    Do you have any suggestion to solve this issue ? Thanks in advance.


  Regards,

  William

1 ACCEPTED SOLUTION

Accepted Solutions
wtien196838
Quartz | Level 8

Thanks for all replies. I coded as follows:

 

filename rlink '<..path>\filename.scr';
signon rlink;
libname rwork slibref=work server=prod;
 
%syslput _all_ ;

 

rsubmit;

.....

endrsubmit;

 

It works and moves all my LOCAL macro variables to REMOTE macro variables.

One minor point, the filename links to a "filename.scr" which is pronpt the user to enter user name and password to sign on unix server.

Is it possible that I hard code inside the code so that the users do not need to interact the screen to enter information ?

Thanks for your answer.

 

View solution in original post

3 REPLIES 3
ballardw
Super User

Any time I get a macro failure about values I try running OPTIONS MPRINT SYMBOLGEN; before the lines that seem to cause the error to see what the values of variables may be resolving to.

 

The warning message appears to say that a value is not currently assigned to your END_OF_THIS_WEEK variable. the options may confirm that.

 

LinusH
Tourmaline | Level 20
Syslput should appear outside the rsubmit block.
If you need to execute it on the server use sysrput instead.

http://support.sas.com/documentation/cdl/en/connref/67933/HTML/default/viewer.htm#n1bc4zi0lp02ivn1ox...
Data never sleeps
wtien196838
Quartz | Level 8

Thanks for all replies. I coded as follows:

 

filename rlink '<..path>\filename.scr';
signon rlink;
libname rwork slibref=work server=prod;
 
%syslput _all_ ;

 

rsubmit;

.....

endrsubmit;

 

It works and moves all my LOCAL macro variables to REMOTE macro variables.

One minor point, the filename links to a "filename.scr" which is pronpt the user to enter user name and password to sign on unix server.

Is it possible that I hard code inside the code so that the users do not need to interact the screen to enter information ?

Thanks for your answer.

 

sas-innovate-2024.png

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

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.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 3 replies
  • 3360 views
  • 0 likes
  • 3 in conversation