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.
%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.
%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.
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
Nearly 200 sessions are now available on demand with the SAS Innovate Digital Pass.
Explore Now →Ready to level-up your skills? Choose your own adventure.