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.

 

hackathon24-white-horiz.png

The 2025 SAS Hackathon Kicks Off on June 11!

Watch the live Hackathon Kickoff to get all the essential information about the SAS Hackathon—including how to join, how to participate, and expert tips for success.

YouTube LinkedIn

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
  • 3 replies
  • 4076 views
  • 0 likes
  • 3 in conversation