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
In-Reply-To: <7e9c0a1b-30af-4fc0-8db9-843106fe4d62@l39g2000yqn.googlegroups.com>
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", <http://support.sas.com/onlinedoc/913/docMainpage.jsp
>.
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
jfh@alumni.stanford.org
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
|