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 (October 2009, week 2)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Fri, 9 Oct 2009 09:19:46 -0400
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: Set Environment Variable Value from SAS
In-Reply-To:  <2BC166D0A5084D358D447B0BEB5C64D1@KAM1720>
Content-Type: text/plain; charset=us-ascii

> From: Kevin Myers > Sent: Thursday, October 08, 2009 7:28 PM > To: SAS-L@listserv.uga.edu > Subject: Set Environment Variable Value from SAS > > I need to set the value of an existing system environment > variable from within SAS under Windows. This value needs to > be set in the SAS copy of the environment, NOT in the copy of > the environment for a child process, and not in the > environment of the process that started SAS. So simply > executing an operating system SET command won't work. The > environment that needs to be accessed is the same copy of the > environment from which %SYSGET() and the SYSGET() data step > function obtain their values. But I need to go the other > way, with something that might be thought of as %SYSPUT or > SYSPUT(), except that those functions don't appear to exist. > > I could swear that I have done this in the past, but I can't > remember how, and I haven't been able to come up with > anything by looking through the docs or searching the web. > > Anyone out there know how to accomplish this?

I have updated my Batch Processing under Win page with this information:

TinyUrl: http://tinyurl.com/6zlqoh

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

caution: do not use Evar-names whose length is gt 8 while %sysget returns the value assigned

proc options option=set;

lists the long-named evar values as corrupted

Ron Fehd the global constant == evar maven CDC Atlanta GA USA RJF2 at cdc dot gov


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