LISTSERV at the University of Georgia
Menubar Imagemap
Home Browse Manage Request Manuals Register
Previous (more recent) messageNext (less recent) messagePrevious (more recent) in topicNext (less recent) in topicPrevious (more recent) by same authorNext (less recent) by same authorPrevious page (January 2003, week 2)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:   Thu, 9 Jan 2003 09:48:14 -0500
Reply-To:   "Fehd, Ronald J. (PHPPO)" <rjf2@CDC.GOV>
Sender:   "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:   "Fehd, Ronald J. (PHPPO)" <rjf2@CDC.GOV>
Subject:   Re: tip filename SASAUTOS
Comments:   cc: Mike Rhoads <RHOADSM1@WESTAT.com>
Content-Type:   text/plain

> From: Mike Rhoads [mailto:RHOADSM1@WESTAT.com]

> I'm not at all sure SASAUTOS ever exists in FILEREF form, > unless you create it yourself. For many years, we here at > Westat have had code in our default autoexec (developed by > Ian, naturally) that sets up your autocall library as a > concatenation of an (optional) project library, corporate > library, and the SAS-supplied libraries, which I assume is > roughly what you are interested in doing. The two key > statements Ian's code uses are: > > filename __stdmac %sysget(SASAUTOS); > options sasautos = ( > "!ACCTMACS" /* Project library, if any */ > "f:\sasmacro" /* Westat corporate library */ > __stdmac /* SAS Institute supplied macro libraries */ > ); > > If this is what you're trying to do, give this approach a try > and see if it helps.

One of my utilities is named ARGS its purpose is to read a macro and print the header and macro definition, which lists all the parameters. macro files must be in the form: /*header*/ %macro x(parmlist=); %*macro code; %mend; so in this example the ARGS would print the first two lines to the log.

the default fileref for ARGS is SASAUTOS:

the option SASAUTOS is a list of filerefs or dQuoted filespecs. in your example above you have the filespecs "!ACCTMACS" and "f:\sasmacro" and the fileref __stdmac -- note no dQuotes.

SAS uses this option setting as a list of search paths. When macro X is called then this list of paths is searched for the file named X.sas.

However, -- I'm finally getting to the point -- if I want to either * use the ARGS macro to list the header and macro parameters * %include SASAUTOS(X); in order to update the macro definition, after editing macro X in a separate text editor SAS fails because X.sas is not in the fileref SASAUTOS.

In any further discussion please be clear which SASAUTOS you are discussing: option SASAUTOS fileref SASAUTOS,

I realize that we are addressing macro usage in two vastly different audiences: * Westat's SAS-macros-in-the-Black-Box audience of users * The Under-The-Hood -- with flashlight -- Macro Maven

I amend my earlier statement about fileref SASAUTOS not existing until after autoexec processing finished. My autoexec has macro calls.

fileref SASAUTOS does not exist until the macro facility has been used.

run this code in a vanilla SAS session:

PROC SQL;select * from DICTIONARY.EXTFILES;QUIT; %PUT SASAUTOS(%sysfunc(getoption(SASAUTOS)); %PUT SASAUTOS<%sysget(SASAUTOS)>; %INC SASAUTOS(AF)/SOURCE2;%*first file in \core\sasmacro; PROC SQL;select * from DICTIONARY.EXTFILES;QUIT;

<lightbulb ON!> having tested that my previous Industrial Strength Solution using SQL select dQuoted xPath from DICTIONARY.EXTFILES where FileRef eq 'SASAUTOS' would work after %INC SASAUTOS(AF)/noSOURCE2;

That's what I like about R&D: it stays interesting!

thanx for the clarifying commentary, Mike.

Team SAS-L rocks!

Half a Hippy Gnu Ear.

Ron Fehd the macro maven CDC Atlanta GA USA RJF2@cdc.gov

By using your intelligence you can sometimes make your problems twice as complicated. -- Ashleigh Brilliant

If you think I know what I'm doing it's probably because you know even less about it. -- Pot-Shots by Ashleigh Brilliant


Back to: Top of message | Previous page | Main SAS-L page