BookmarkSubscribeRSS Feed
Sarra-Matri
Obsidian | Level 7

How can we assign a library automatically on startup , using a library
for data access

6 REPLIES 6
Jagadishkatam
Amethyst | Level 16
Could you please let us know the SAS platform you are using.
Thanks,
Jag
Sarra-Matri
Obsidian | Level 7
Sas Studio
sbxkoenk
SAS Super FREQ

Hello,

SAS Studio is not the platform. Windows (WIN) could be the platform or UNIX/Linux or MainFrame or Mac or .... You get it.

Submit this:

*proc options; *run;
%PUT &=sysscp;
%PUT &=sysvlong;
/* end of program */

and present us with the result (to be found in the LOG-window).

For me, it says (for the old SAS on my laptop):

31   *proc options; *run;
32   %PUT &=sysscp;
SYSSCP=WIN
33   %PUT &=sysvlong;
SYSVLONG=9.04.01M4P110916
34   /* end of program */
Reeza
Super User

@sbxkoenk wrote:

Hello,

SAS Studio is not the platform. Windows (WIN) could be the platform or UNIX/Linux or MainFrame or Mac or .... You get it.

Submit this:

*proc options; *run;
%PUT &=sysscp;
%PUT &=sysvlong;
/* end of program */

and present us with the result (to be found in the LOG-window).

For me, it says (for the old SAS on my laptop):

31   *proc options; *run;
32   %PUT &=sysscp;
SYSSCP=WIN
33   %PUT &=sysvlong;
SYSVLONG=9.04.01M4P110916
34   /* end of program */

That's interesting, I think most of us would interpret the question similar to the OP and I'd assume the OS would be Window/Unix etc....

Tom
Super User Tom
Super User

If you are using SAS/Studio then you should be able to add a LIBNAME statement to your autoexec.sas file.

Reeza
Super User
Two methods in SAS Studio, one is to add your libname statement to the Autoexec, which you can access via Edit AutoExec option in the same menu that you access Preferences (three lines at the top right of SAS Studio).

The second method is to go to the Library Pane, click the button to manually create the library and provide the path. There's also a button to click that says: "recreate this library at startup" that will add the command to your Autoexec and it'll be persistent across sessions.

sas-innovate-white.png

Missed SAS Innovate in Orlando?

Catch the best of SAS Innovate 2025 — anytime, anywhere. Stream powerful keynotes, real-world demos, and game-changing insights from the world’s leading data and AI minds.

 

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.

SAS Training: Just a Click Away

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

Browse our catalog!

Discussion stats
  • 6 replies
  • 1347 views
  • 4 likes
  • 5 in conversation