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

Looking for schooling on creating/saving and then using userdefined macros SPECIFICALLY IN the SAS Studio online app.

 

I understand macros in general, and not looking for help on the code within a macro.  Am asking for help using SAS Studio online.

 

UPDATE:  So basically the answer is the macro can be put where you want in the folders. My experience with the folder structure and creating folders, choosing folders etc to be quirky.  But I have extremely slow Internet, so...eh

 

I found it easiest to put the macro in my default user folder, and it is successfully referenced like this:

 

%include '/home/u12345678/sasuser.v94/YourMacroName.sas';

 

where the 12345678 would be your individual user number, I reckon.

 

Thanks for everyone's help.

1 ACCEPTED SOLUTION

Accepted Solutions
PaigeMiller
Diamond | Level 26

You can put the macros in an folder you would like, I have a folder named Macros; and I make that folder part of the Autocall library and then OPTIONS SASAUTOS=() allows you to use any macro in the Autocall library simply by calling the macro.

https://documentation.sas.com/?cdcId=pgmsascdc&cdcVersion=9.4_3.4&docsetId=mcrolref&docsetTarget=n0t...

 

If you don't know the names of the folders used by SAS Studio, you can right click on any folder that is shown, and work out the folder name from the Properties. If you want to create a new folder, you could right-click on "My Folders" and select New->Folder. Basic stuff that is relatively the same in just about any user-interface.

--
Paige Miller

View solution in original post

13 REPLIES 13
old_School
Obsidian | Level 7
Thanks. However, am looking more for how to use macros in the online SAS Studio. I was in the middle of clarifying my original post as you responded., and again thanks.
old_School
Obsidian | Level 7
What I am looking at says SAS Studio, and it is an online app. Dont know nuthin about no SAS on Demand.
Cynthia_sas
SAS Super FREQ
Hi:
The SAS Macro Facility is part of Base SAS. So the editor you use (such as SAS Studio) is irrelevant to defining and using macro variables, macro functions or macro programs.
Cynthia
old_School
Obsidian | Level 7
My issue is more like where to save macros in the online folder tree (and does it matter where in that pre-defined tree) and how to reference the path to that location and/or library,
old_School
Obsidian | Level 7
If I may, further questions:
Where would I save them, in a folder under My Libraries? How do I reference the library or location I put them in?

Where is the autocall library in SAS Studio?
old_School
Obsidian | Level 7
Part of my issue is not knowing how to reference the PATH since it is online, and not C:\xxx\xxx.
PaigeMiller
Diamond | Level 26

You can put the macros in an folder you would like, I have a folder named Macros; and I make that folder part of the Autocall library and then OPTIONS SASAUTOS=() allows you to use any macro in the Autocall library simply by calling the macro.

https://documentation.sas.com/?cdcId=pgmsascdc&cdcVersion=9.4_3.4&docsetId=mcrolref&docsetTarget=n0t...

 

If you don't know the names of the folders used by SAS Studio, you can right click on any folder that is shown, and work out the folder name from the Properties. If you want to create a new folder, you could right-click on "My Folders" and select New->Folder. Basic stuff that is relatively the same in just about any user-interface.

--
Paige Miller
old_School
Obsidian | Level 7
Thanks, that was helpful, and I am good to go...
old_School
Obsidian | Level 7
I found it easiest to put the macro in my default user folder, and it is successfully referenced like this:



%include '/home/u12345678/sasuser.v94/YourMacroName.sas';



where the 12345678 would be your individual user number, I reckon.
old_School
Obsidian | Level 7
That was helpful and let me down the right path.

sas-innovate-2024.png

Available on demand!

Missed SAS Innovate Las Vegas? Watch all the action for free! View the keynotes, general sessions and 22 breakouts on demand.

 

Register now!

SAS Enterprise Guide vs. SAS Studio

What’s the difference between SAS Enterprise Guide and SAS Studio? How are they similar? Just ask SAS’ Danny Modlin.

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
  • 13 replies
  • 910 views
  • 4 likes
  • 4 in conversation