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 (January 2008, week 4)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Thu, 24 Jan 2008 09:51:24 -0500
Reply-To:     "Fehd, Ronald J. (CDC/CCHIS/NCPHI)" <rjf2@CDC.GOV>
Sender:       "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:         "Fehd, Ronald J. (CDC/CCHIS/NCPHI)" <rjf2@CDC.GOV>
Subject:      Re: Enviromental variables to macro variables
In-Reply-To:  <b2eb5fa7-93b8-4cfa-a42d-b983ea15786d@z17g2000hsg.googlegroups.com>
Content-Type: text/plain; charset=us-ascii

> From: J. Manuel Picaza > I am trying to define a set of variables in the .cfg file and then > assign its value to macro variable via %let var=!VAR; > Obviously it does not work.

... and you do not want to waste time trying to make it work either.

> Do you know how to assign them?

Here is an article I wrote, which includes information about *.cfg

http://www.sascommunity.org/wiki/Batch_processing_under_Windows

see example for SASv8.cfg

* syntax of environmental assignment statement:

-set EvarName EvarValue

depending on how you use them EvarValues may need to be enclosed within single or double quotes

* referencing Evars

use a bang or exclamation mark (!) as the prefix to the EvarName:

in *.cfg: !EvarName

note: SAS uses evars as root names:

assignment:

-SET sasroot "C:\Program Files\SAS\SAS 9.1"

reference:

/* Setup the SAS System autocall library definition */ -SET SASAUTOS ("!sasroot\core\sasmacro" ...)

in SAS: folder references: "!ProjRoot\sub-folder"

other: %Put sasroot: %sysget(sasroot);

Ron Fehd the macro maven CDC Atlanta GA USA RJF2 at cdc dot gov


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