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 (December 2008, week 3)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Sun, 21 Dec 2008 17:38:03 -0800
Reply-To:     Jack Hamilton <jfh@STANFORDALUMNI.ORG>
Sender:       "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:         Jack Hamilton <jfh@STANFORDALUMNI.ORG>
Subject:      Re: Changing system options from within a DATA step
Comments: To: rsmphotography@GMAIL.COM
In-Reply-To:  <>
Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes

System options (most of them, anyway) can be changed only at step boundaries, not within a step. "When you specify a SAS system option setting, the setting applies to the next step and to all subsequent steps for the duration of the SAS session, or until you reset", < >.

Also, it's not generally good practice to accept the default name when you create a new data set, as in the code below. If you don't want to create an output data set, use data _null_.

-- Jack Hamilton Videtis illam spirare libertatis auram

On Dec 21, 2008, at 4:06 pm, rsmphotography@GMAIL.COM wrote:

> What I want to do is set an OPTION based on the SAS version number. > > e.g. > > data; > if &sysver="9.1" then > options linesize='90'; > else if &sysver="9.2 then > options linesize='132' > run; > > But, of course, this doesn't work. Do you know of a way to set the > OPTIONS within a DATA step. There is an SCL function OPTSETC, but it > only works in SCL. > > Robert

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