LISTSERV at the University of Georgia
Menubar Imagemap
Home Browse Manage Request Manuals Register
Previous messageNext messagePrevious in topicNext in topicPrevious by same authorNext by same authorPrevious page (June 2003, week 2)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:   Wed, 11 Jun 2003 08:35:05 -0400
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: Determining runnung program name&path
Comments:   cc: "Gleb V. Kotelnitskyy" <kiz@PTH.NTU-KPI.KIEV.UA>
Content-Type:   text/plain

> From: 'Gleb V. Kotelnitskyy' [mailto:kiz@PTH.NTU-KPI.KIEV.UA] > > > I'm running a macro, and i want to determine the path to the > > > program, from which the the macro is invoked. > > answered last week: http://www.listserv.uga.edu/archives/sas-l.html > > subject contains: macro or system variable for sas program filename

> the problem at hand in that discussion is determining the > name of the running batch job. What i need is to know the > name of the file i'm submitting in my SAS windowing > environment,

same thread as above http://www.listserv.uga.edu/cgi-bin/wa?A2=ind0306A&L=sas-l&P=R19444

> particularly, the macro, called from SCL code.

within the macro: %put SYSMACRONAME<&SYSMACRONAME.>;

> > > Actually, the > > > program is th source entry from SAS catalog. Also interested > > > in determining the name of file, in which the macro is stored. > > in order for the macro to be autocalled

> > the name of the macro is the name of the file

> I need to know fully-qualified file name&path (what is it for > catalog entry?), especially the libref which contain the macro.

if you're the programmer how come you don't know this information?

subject: Re: compile macro or hide macro information http://www.listserv.uga.edu/cgi-bin/wa?A2=ind0306B&L=sas-l&P=R3135

> fully-qualified file name&path (what is it for catalog entry?)

stored and compiled macros are stored in sasmacr.sas7bcat

examine this to see if this has what you want: %PUT SASUSER directory: %sysfunc(getoption(SASUSER)); %LET PATH =%sysfunc(getoption(SASINITIALFOLDER)); %PUT PATH<&PATH.> from SASinitialFolder;

> especially the libref which contain the macro.

%LET LIBREF = %sysfunc(getoption(sasmstore)); %PUT LIBREF<&LIBREF.>; LIBNAME &LIBREF. list;

%LET PRINT =; proc SQL &PRINT.; select Path into :PATH separated by ' ' from DICTIONARY.LIBNAMES where LibName eq "&LIBREF." ;quit; %PUT PATH<&PATH.>;

> especially the fileref which contain the macro.

%PUT SASAUTOS<%sysfunc(getoption(SASAUTOS))>; %PUT SASAUTOS<%sysget(SASAUTOS)>;

proc SQL &PRINT.; select xPath from DICTIONARY.EXTFILES where FileRef eq "SASAUTOS" ;quit;

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

OpSys: Win_Pro Ver: 9.00 (TS M0) --> cheerful provider of UNTESTED SAS code from the Clue?Gee!Wrx <--

RTFO: I'm an engineer, I don't get paid to know, I get paid to know where to look it up. RTFO: Read The Finite Options


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