Go Back   Rhinocerus > Newsgroup > Newsgroup comp.soft-sys.sas

Reply
 
Thread Tools Display Modes
  #1 (permalink)  
Old 07-26-2007, 03:11 PM
toby dunn
Guest
 
Posts: n/a
Default Re: Create macro variable to refer to program name - for multiple

Kat ,

Hmmm well basically it shold be the same as you have only incliuded the code
form the %included file in your second program. Thus, you are only running
one program.

What does your %Include look like, is it the full path with the file name or
a fielname and you refernece the filename alias and file you want included?



Toby Dunn

If anything simply cannot go wrong, it will anyway. Murphys Law #2.

The buddy system is essential to your survival; it gives the enemy somebody
else to shoot at.
Murphys Law #


Tell a man there are 300 billion stars in the universe and he'll believe
you. Tell him a bench has wet paint on it and he'll have to touch to be
sure. Murphys Law #9






From: kat j <axnjxntx@YAHOO.COM>
Reply-To: kat j <axnjxntx@YAHOO.COM>
To: SAS-L@LISTSERV.UGA.EDU
Subject: Create macro variable to refer to program name - for multiple
programs
Date: Thu, 26 Jul 2007 07:58:35 -0700

Morning all...

I am trying to create a macro variable that will contain the path & name of
the program. I tend to use this macro in my output, so I know what program
to refer to, if need be.

I basically know how to do this --
%let fname=%sysget(sas_execfilepath)
-- however, I have a question about creating more than one macro variable to
refer to different programs.

I have one program (program #1) that I use to create (& manipulate) the
data, and a second program (program #2) that does the runs (cross tabs,
models, etc). I've got it set up right now so that program #2 calls program
#1 with an %include statement.

What I want is macro variables that refer to each program, separately.
In program #1, I have this statement:
%let fname=%sysget(SAS_EXECFILEPATH);

In program #2, I have this statement:
%let fname2=%sysget(SAS_EXECFILEPATH);

HOWEVER, when I look at the information stored in both of these variables,
they both have the path & program name for program #2.

I even tried this in program #1:
%let fname=&path\%sysget(SAS_EXECFILENAME);

But once I run program #2, the value of &fname refers to the name of program
#2.

How can I create 2 separate variables that refer to each program, while
calling/running program #1 from an %include statement in program #2?

Thanks.
-Kat



__________________________________________________ __________________________________
Boardwalk for $500? In 2007? Ha! Play Monopoly Here and Now (it's updated
for today's economy) at Yahoo! Games.
yahoo.com/proddesc?gamekey=monopolyherenow" target="_blank">http://get.games.yahoo.com/proddesc?...onopolyherenow

__________________________________________________ _______________
Local listings, incredible imagery, and driving directions - all in one
place! http://maps.live.com/?wip=69&FORM=MGAC01
Reply With Quote
Alt Today
Advertising
 
and become member of Rhinocerus
Standard Sponsored Links

Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
SAS Tip: (was RE: length of the macro parameter) Terjeson, Mark Newsgroup comp.soft-sys.sas 0 06-13-2008 04:41 PM
Re: Macro variable not resolving outside macro program data _null_, Newsgroup comp.soft-sys.sas 0 06-10-2008 11:27 AM
Re: PASSING macro variable from sas program to JCL Droogendyk, Harry Newsgroup comp.soft-sys.sas 0 12-29-2005 09:37 PM
Re: using macro to assign a Global Variable by condition toby dunn Newsgroup comp.soft-sys.sas 0 11-05-2005 04:42 AM
Re: macro variable contains invalid chars Fehd, Ronald J. Newsgroup comp.soft-sys.sas 1 10-25-2004 01:38 PM



All times are GMT. The time now is 03:38 PM.


Copyright ©2009

LinkBacks Enabled by vBSEO 3.3.0 RC2 © 2009, Crawlability, Inc.