BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
Santt0sh
Lapis Lazuli | Level 10

Hi Team,

I have written a macro, which will read the external files when they are available at a location.

The macro keeps looking for the files at the location for a specific interval and until the Max time assigned.

 

Now, this macro will be used in few SAS codes to read the files. I happen to forget where do I add these macros to save me from running it every time the macro is called.

As I remember it should be on Autocall.

 

Please suggest on this.

 

1 ACCEPTED SOLUTION

Accepted Solutions
ballardw
Super User

Autocall references storage locations. You use an Options statement to append or insert your specific location for storing macros to the  autocall locations SAS uses.

Example:

options insert=(SASAUTOS =("C:\folder\macrofolder"));

SASAUTOS is the option that holds the locations of the autocall macros. Insert places the location before the SAS supplied, Append would place your location at the end of the search list. The position is only important if you may use the same name as SAS supplied macro. The first version found will be used and the order of the locations matters. The path would match your operating system rules and location. Make sure that it starts at a drive or mount point.

 

The option should be added to your Autoexec.SAS or your system options so that it is available in every session.

 

View solution in original post

2 REPLIES 2
PaigeMiller
Diamond | Level 26

Yes, general macros such as this, which can be used in many programs, should go in the Autocall library.

 

A macro that is written to be used only in one program probably belongs in that one program.

--
Paige Miller
ballardw
Super User

Autocall references storage locations. You use an Options statement to append or insert your specific location for storing macros to the  autocall locations SAS uses.

Example:

options insert=(SASAUTOS =("C:\folder\macrofolder"));

SASAUTOS is the option that holds the locations of the autocall macros. Insert places the location before the SAS supplied, Append would place your location at the end of the search list. The position is only important if you may use the same name as SAS supplied macro. The first version found will be used and the order of the locations matters. The path would match your operating system rules and location. Make sure that it starts at a drive or mount point.

 

The option should be added to your Autoexec.SAS or your system options so that it is available in every session.

 

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!

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.

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
  • 2 replies
  • 371 views
  • 4 likes
  • 3 in conversation