Date: Mon, 14 Sep 2009 04:51:09 -0700
Reply-To: Arthur Tabachneck <art297@NETSCAPE.NET>
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: Arthur Tabachneck <art297@NETSCAPE.NET>
Subject: Re: SAS constants cannot be used with where statement?
In-Reply-To: <bfec6d3c-8383-48b2-8621-22462fd70c26@y10g2000prg.googlegroups.com>
Content-Type: text/plain; charset=ISO-8859-1
Once again, posts on the Google side of the list aren't showing up on
the UofG side. The following is showing a discrepancy between Unix
(9.1.3 SP4) and Windows (9.1.3 SP3) regarding whether a where clause
using the function "constant" will work.
Can someone running on unix verify the problem?
Art
--------------
On Sep 13, 10:45 pm, xlr82sas <xlr82...@aol.com> wrote:
> On Sep 13, 12:08 pm, Arthur Tabachneck <art...@netscape.net> wrote:
>
>
>
>
>
> > Works fine on 9.1.3 on a Windows 2003 server. What version are you
> > using and on which operating system?
>
> > Art
> > -------------
> > On Sep 13, 2:07 pm, xlr82sas <xlr82...@aol.com> wrote:
>
> > > Hi,
>
> > > It appears that some SAS constants like constant('big') cannot be
> > > used in where statements.
>
> > > Also a 'NOTE: ERROR' is written to log, but there is no error.
>
> > > data tst;
> > > set sashelp.class;
> > > if sex='M' then flg=constant('big');
> > > else flg=0;
> > > put flg;
> > > run;
>
> > > data get;
> > > set tst(where=(flg=constant('big')));
> > > put _all_;
> > > run;
>
> > > data get;
> > > set tst;
> > > if flg=constant('big') then put _all_;
> > > run;
>
> > > 23317 data tst;
> > > 23318 set sashelp.class;
> > > 23319 if sex='M' then flg=constant('big'
> > > 23320 else flg=0;
> > > 23321 put flg;
> > > 23322 run;
>
> > > 1.797693E308
> > > 0
> > > 0
> > > 0
> > > 1.797693E308
> > > 1.797693E308
> > > 0
> > > 0
> > > 1.797693E308
> > > 1.797693E308
> > > 0
> > > 0
> > > 0
> > > 0
> > > 1.797693E308
> > > 1.797693E308
> > > 1.797693E308
> > > 1.797693E308
> > > 1.797693E308
> > > NOTE: There were 19 observations read from
> > > NOTE: The data set WORK.TST has 19 observat
> > > NOTE: Compressing data set WORK.TST increas
> > > Compressed is 2 pages; un-compressed
> > > NOTE: DATA statement used (Total process ti
> > > real time 0:00.00
> > > cpu time 0:00.01
>
> > > 23323 data get;
> > > 23324 set tst(where=(flg=constant('big')
> > > 23325 put _all_;
> > > 23326 run;
>
> > > NOTE: The SAS System stopped processing thi
> > > WARNING: The data set WORK.GET may be incom
> > > WARNING: Data set WORK.GET was not replaced
> > > NOTE: DATA statement used (Total process ti
> > > real time 0:00.00
> > > cpu time 0:00.01
>
> > > 23327 data get;
> > > 23328 set tst;
> > > 23329 if flg=constant('big') then put _a
> > > 23330 run;
>
> > > NAME=Alfred SEX=M AGE=14 HEIGHT=69 WEIGHT=1
> > > NAME=Henry SEX=M AGE=14 HEIGHT=63.5 WEIGHT=
> > > NAME=James SEX=M AGE=12 HEIGHT=57.3 WEIGHT=
> > > NAME=Jeffrey SEX=M AGE=13 HEIGHT=62.5 WEIGH
> > > NAME=John SEX=M AGE=12 HEIGHT=59 WEIGHT=99.
> > > NAME=Philip SEX=M AGE=16 HEIGHT=72 WEIGHT=1
> > > NAME=Robert SEX=M AGE=12 HEIGHT=64.8 WEIGHT
> > > NAME=Ronald SEX=M AGE=15 HEIGHT=67 WEIGHT=1
> > > NAME=Thomas SEX=M AGE=11 HEIGHT=57.5 WEIGHT
> > > NAME=William SEX=M AGE=15 HEIGHT=66.5 WEIGH
> > > NOTE: There were 19 observations read from
> > > NOTE: The data set WORK.GET has 19 observat
> > > NOTE: Compressing data set WORK.GET increas
> > > Compressed is 2 pages; un-compressed
> > > NOTE: DATA statement used (Total process ti
> > > real time 0:00.00
> > > cpu time 0:00.03
>
> > > NOTE: Remote submit to SERVER complete.- Hide quoted text -
>
> > - Show quoted text -
>
> Hi Art,
>
> It works under windows and sas 9.1.3 see log after Unix.
>
> The where clause does not work in Sun64 Unix and SAS 9.1.3?
>
> SUN UNIX
>
> SAS 9.1.3
> ---------------------------------------------
> AUTOMATIC SYSVER 9.1
> AUTOMATIC SYSVLONG 9.01.01M3P020206
> AUTOMATIC SYSVLONG4 9.01.01M3P02022006
>
> SUN
> --------------------------------------------
> AUTOMATIC SYSSCP SUN 64
> AUTOMATIC SYSSCPL SunOS
> AUTOMATIC SYSNCPU 4
> AUTOMATIC SYSENDIAN BIG
> AUTOMATIC SYSMAXLONG 9007199254740992
> AUTOMATIC SYSSIZEOFLONG 8
> AUTOMATIC SYSSIZEOFUNICODE 4
>
> Here is a clean batch log from unix with vanilla settings (no
> autoexec)
>
> NOTE: Copyright (c) 2002-2003 by SAS Institute Inc., Cary, NC,
> USA.
> NOTE: SAS (r) 9.1
> (TS1M3)
> NOTE: This session is executing on the SunOS 5.9
> platform.
>
> NOTE: (E9BX03) SAS 9.1.3 SP
> 4
>
> You are running SAS 9. Some SAS 8 files will be automatically
> converted
> by the V9 engine; others are incompatible. Please
> seehttp://support.sas.com/rnd/migration/planning/platform/64bit.html
>
> PROC MIGRATE will preserve current SAS file attributes and
> is
> recommended for converting all your SAS libraries from
> any
> SAS 8 release to SAS 9. For details and examples, please
> seehttp://support.sas.com/rnd/migration/index.html
>
> This message is contained in the SAS news file, and is presented
> upon
> initialization. Edit the file "news" in the "misc/base" directory
> to
> display site-specific news and information in the program
> log.
> The command line option "-nonews" will prevent this
> display.
>
> NOTE: SAS initialization
> used:
> real time 0.00
> seconds
> cpu time 0.10
> seconds
>
> NOTE: AUTOEXEC processing beginning; file is /dev/
> null.
>
> NOTE: AUTOEXEC processing
> completed.
>
> 1
> 2 data
> tst;
> 3 set
> sashelp.class;
> 4 if sex='M' then flg=constant
> ('big');
> 5 else
> flg=0;
> 6 put
> flg;
> 7
> run;
>
> 1.797693E308
> 0
> 0
> 0
> 1.797693E308
> 1.797693E308
> 0
> 0
> 1.797693E308
> 1.797693E308
> 2 The SAS
> System
>
> 0
> 0
> 0
> 0
> 1.797693E308
> 1.797693E308
> 1.797693E308
> 1.797693E308
> 1.797693E308
> NOTE: There were 19 observations read from the data set
> SASHELP.CLASS.
> NOTE: The data set WORK.TST has 19 observations and 6
> variables.
> NOTE: DATA statement used (Total process
> time):
> real time 0.00
> seconds
> cpu time 0.02
> seconds
>
> 8
> 9 data
> get;
> 10 set
> tst;
> 11 if flg=constant
> ('big');
> 12 put
> _all_;
> 13
> run;
>
> Name=Alfred Sex=M Age=14 Height=69 Weight=112.5 flg=1.797693E308
> _ERROR_=0 _N_=1
> Name=Henry Sex=M Age=14 Height=63.5 Weight=102.5 flg=1.797693E308
> _ERROR_=0 _N_=5
> Name=James Sex=M Age=12 Height=57.3 Weight=83 flg=1.797693E308
> _ERROR_=0 _N_=6
> Name=Jeffrey Sex=M Age=13 Height=62.5 Weight=84 flg=1.797693E308
> _ERROR_=0 _N_=9
> Name=John Sex=M Age=12 Height=59 Weight=99.5 flg=1.797693E308
> _ERROR_=0 _N_=10
> Name=Philip Sex=M Age=16 Height=72 Weight=150 flg=1.797693E308
> _ERROR_=0 _N_=15
> Name=Robert Sex=M Age=12 Height=64.8 Weight=128 flg=1.797693E308
> _ERROR_=0 _N_=16
> Name=Ronald Sex=M Age=15 Height=67 Weight=133 flg=1.797693E308
> _ERROR_=0 _N_=17
> Name=Thomas Sex=M Age=11 Height=57.5 Weight=85 flg=1.797693E308
> _ERROR_=0 _N_=18
> Name=William Sex=M Age=15 Height=66.5 Weight=112 flg=1.797693E308
> _ERROR_=0 _N_=19
> NOTE: There were 19 observations read from the data set
> WORK.TST.
> NOTE: The data set WORK.GET has 10 observations and 6
> variables.
> NOTE: DATA statement used (Total process
> time):
> real time 0.00
> seconds
> cpu time 0.00
> seconds
>
> 14
> 15 data
> get;
> 16 set tst(where=(flg=constant
> ('big')));
> 17 put
> _all_;
> 18
> run;
>
> NOTE: The SAS System stopped processing this step because of
> errors.
> WARNING: The data set WORK.GET may be incomplete. When this step was
> stopped there w
> WARNING: Data set WORK.GET was not replaced because this step was
> stopped.
> NOTE: DATA statement used (Total process
> time):
> real time 0.00
> seconds
> cpu time 0.00
> seconds
>
> 19
>
> NOTE: SAS Institute Inc., SAS Campus Drive, Cary, NC USA
> 27513-2414
> NOTE: The SAS System
> used:
> 3 The SAS
> System
>
> real time 0.00
> seconds
> cpu time 0.12
> seconds
>
> It works in Windows XP Pro SAS 9.1.3
>
> >systeminfo
>
> Host Name: LEADING-EDGE
> OS Name: Microsoft Windows XP Professional
> OS Version: 5.1.2600 Service Pack 3 Build 2600
> OS Manufacturer: Microsoft Corporation
> OS Configuration: Standalone Workstation
> OS Build Type: Uniprocessor Free
> Registered Owner: Roger DeAngelis
> Registered Organization: Personal Use
> Product ID: 55276-011-0330942-22436
> Original Install Date: 8/13/2009, 9:00:44 PM
> System Up Time: 0 Days, 2 Hours, 16 Minutes, 24 Seconds
> System Manufacturer: Hewlett-Packard
> System Model: HP Compaq nc6000 (PD469AA#ABA)
> System type: X86-based PC
> Processor(s): 1 Processor(s) Installed.
> [01]: x86 Family 6 Model 13 Stepping 6
> GenuineIntel ~589 Mhz
> BIOS Version: HP - 30080620
> Windows Directory: C:\WINDOWS
> System Directory: C:\WINDOWS\system32
> Boot Device: \Device\HarddiskVolume1
> System Locale: en-us;English (United States)
> Input Locale: en-us;English (United States)
> Time Zone: (GMT-08:00) Pacific Time (US & Canada)
> Total Physical Memory: 2,047 MB
> Available Physical Memory: 1,430 MB
> Virtual Memory: Max Size: 2,048 MB
> Virtual Memory: Available: 1,997 MB
> Virtual Memory: In Use: 51 MB
> Page File Location(s): C:\pagefile.sys
> Domain: WORKGROUP
> Logon Server: \\LEADING-EDGE
> Hotfix(s): 99 Hotfix(s) Installed.
>
> AUTOMATIC SYSENDIAN LITTLE
> AUTOMATIC SYSENV FORE
> AUTOMATIC SYSNCPU 1
> AUTOMATIC SYSPROCESSID 41D75F30E190E5604020000000000000
> AUTOMATIC SYSSCP WIN
> AUTOMATIC SYSSCPL WIN_PRO
> AUTOMATIC SYSSIZEOFLONG 4
> AUTOMATIC SYSSIZEOFUNICODE 2
> AUTOMATIC SYSVER 9.1
> AUTOMATIC SYSVLONG 9.01.01M3P020206
> AUTOMATIC SYSVLONG4 9.01.01M3P02022006
>
> WINDOWS
>
> 205 data tst;
> 206 set sashelp.class;
> 207 if sex='M' then flg=constant('big');
> 208 else flg=0;
> 209 put flg;
> 210 run;
>
> 1.797693E308
> 0
> 0
> 0
> 1.797693E308
> 1.797693E308
> 0
> 0
> 1.797693E308
> 1.797693E308
> 0
> 0
> 0
> 0
> 1.797693E308
> 1.797693E308
> 1.797693E308
> 1.797693E308
> 1.797693E308
> NOTE: There were 19 observations read from the data set SASHELP.CLASS.
> NOTE: The data set WORK.TST has 19 observations and 6 variables.
> NOTE: DATA statement used (Total process time):
> real time 0.00 seconds
> cpu time 0.00 seconds
>
> 211 data get;
> 212 set tst;
> 213 if flg=constant('big');
> 214 put _all_;
> 215 run;
>
> NAME=Alfred SEX=M AGE=14 HEIGHT=69 WEIGHT=112.5 FLG=1.797693E308
> _ERROR_=0 _N_=1
> NAME=Henry SEX=M AGE=14 HEIGHT=63.5 WEIGHT=102.5 FLG=1.797693E308
> _ERROR_=0 _N_=5
> NAME=James SEX=M AGE=12 HEIGHT=57.3 WEIGHT=83 FLG=1.797693E308
> _ERROR_=0 _N_=6 ...
>
> read more »- Hide quoted text -
>
> - Show quoted text -
|