Storing Macros, and use of SOURCE2

Accepted Solution Solved
Reply
Contributor
Posts: 68
Accepted Solution

Storing Macros, and use of SOURCE2

[ Edited ]

Hello

 

Can you please help me regarding saving and reusing macros in SAS

 

FILENAME AutoM '/folders/myfolders/';

OPTIONS MAUTOLOCDISPLAY MAUTOSOURCE

SASAUTOS = (AutoM);

Is this a correct way?

 

What is source2 in below codes

 

%INCLUDE '/folders/myfolders/abc.txt'/source2;

 

Kafeel


Accepted Solutions
Solution
‎03-24-2016 03:34 AM
Esteemed Advisor
Esteemed Advisor
Posts: 7,249

Re: SAS Macros

Hi,

 

You will need to be more specific about your questions.  Options sasautos=() is an options that lets you point to one or more existing folders, any macros within the files in these folders can then be executed without the need to explicitly include the file.  See:

http://support.sas.com/documentation/cdl/en/mcrolref/67912/HTML/default/viewer.htm#p12b2qq72dkxpsn1e...

 

For your second question, source/nosource, and source2/nosource2 control the writing of code from the imported file to the log:

http://support.sas.com/documentation/cdl/en/lrdict/64316/HTML/default/viewer.htm#a000279225.htm

 

View solution in original post


All Replies
Solution
‎03-24-2016 03:34 AM
Esteemed Advisor
Esteemed Advisor
Posts: 7,249

Re: SAS Macros

Hi,

 

You will need to be more specific about your questions.  Options sasautos=() is an options that lets you point to one or more existing folders, any macros within the files in these folders can then be executed without the need to explicitly include the file.  See:

http://support.sas.com/documentation/cdl/en/mcrolref/67912/HTML/default/viewer.htm#p12b2qq72dkxpsn1e...

 

For your second question, source/nosource, and source2/nosource2 control the writing of code from the imported file to the log:

http://support.sas.com/documentation/cdl/en/lrdict/64316/HTML/default/viewer.htm#a000279225.htm

 

Grand Advisor
Posts: 17,411

Re: SAS Macros

Are you using SAS UE? If so, click the 3 lines at top right menu, and you have the option to modify your autoexec directly.

Esteemed Advisor
Posts: 5,198

Re: Storing Macros, and use of SOURCE2

Renamed thread so it better describes the issue(s).

Data never sleeps
☑ This topic is SOLVED.

Need further help from the community? Please ask a new question.

Discussion stats
  • 3 replies
  • 350 views
  • 0 likes
  • 4 in conversation