BookmarkSubscribeRSS Feed
☑ This topic is solved. Need further help from the community? Please sign in and ask a new question.
Mluna
Fluorite | Level 6

I came across a code from a previous co-worker that no longer works with us and I've been learning and to continue to maintain and improved on it.

at the very start of his code he created variables

%let UserID = 123456

%syslput UserID = &UserID.;

I don't understand what the point of creating the user ID then doing a %syslput afterwards to what it seems replace the variable? I don't fully understand the %syslput other than its to store variables server side? (I think) I did go through the SAS programming 1 and 2 and part of 3 and i don't recall coming across the %syslput

When i do run the code i get an error saying  "ERROR: A link must be established by executing the SIGNON command before you can communicate with UNKNOWN."

Any guidance or help would be appreciate it.

1 ACCEPTED SOLUTION

Accepted Solutions
SASKiwi
PROC Star

%SYSLPUT is only relevant if you are using SAS/CONNECT to start up another SAS session from your existing one. It is totally irrelevant if you only have the one SAS session.

 

First, you need to use the SIGNON command to start another SAS session, then you can use %SYSLPUT to copy the local &UserID macro variable to the second SAS session you just started.

 

Search the rest of your program for the SIGNON command or RSUBMIT / ENDRSUBMIT statements. Are there any? If there aren't any, I can only assume your co-worker was doing SIGNONs and remote SUBMITs via SAS's menu options.

View solution in original post

2 REPLIES 2
SASKiwi
PROC Star

%SYSLPUT is only relevant if you are using SAS/CONNECT to start up another SAS session from your existing one. It is totally irrelevant if you only have the one SAS session.

 

First, you need to use the SIGNON command to start another SAS session, then you can use %SYSLPUT to copy the local &UserID macro variable to the second SAS session you just started.

 

Search the rest of your program for the SIGNON command or RSUBMIT / ENDRSUBMIT statements. Are there any? If there aren't any, I can only assume your co-worker was doing SIGNONs and remote SUBMITs via SAS's menu options.

Mluna
Fluorite | Level 6

Thank you, yes there are Rsubmit / ENDRsubmit statements where they were importing data into an Unix server. oh ok so i was trying to run it in parts to make sense of it. I knew Rsubmits were because he was doing a remote connection i just wasn't aware that they related to the macro variables

hackathon24-white-horiz.png

The 2025 SAS Hackathon has begun!

It's finally time to hack! Remember to visit the SAS Hacker's Hub regularly for news and updates.

Latest Updates

SAS Training: Just a Click Away

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

Browse our catalog!

Discussion stats
  • 2 replies
  • 694 views
  • 1 like
  • 2 in conversation