LISTSERV at the University of Georgia
Menubar Imagemap
Home Browse Manage Request Manuals Register
Previous (more recent) messageNext (less recent) messagePrevious (more recent) in topicNext (less recent) in topicPrevious (more recent) by same authorNext (less recent) by same authorPrevious page (August 2002, week 1)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Thu, 1 Aug 2002 09:40:32 +0200
Reply-To:     Bas Pruijn <bas.pruijn@CMG.COM>
Sender:       "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
Comments:     To: "Huang, Ya" <ya.huang@PFIZER.COM>
From:         Bas Pruijn <bas.pruijn@CMG.COM>
Subject:      Re: A bug in where clause? (V8.2)
Comments: To: SAS-L@LISTSERV.VT.EDU
Content-Type: text/plain; charset="iso-8859-1"

It is the same in version 9

Bas

-----Original Message----- From: Huang, Ya To: SAS-L@AKH-WIEN.AC.AT Sent: 1-8-2002 0:37 Subject: Re: A bug in where clause? (V8.2)

It dose look like a bug:

907 %let limit=199; 908 %let WHERE=%sysfunc(repeat(0, &limit)); 909 910 data TOTO; 911 length x $1000; 912 x=repeat('0',199); output; 913 run;

NOTE: The data set WORK.TOTO has 1 observations and 1 variables. NOTE: DATA statement used: real time 0.01 seconds cpu time 0.01 seconds

914 915 *-- Apply a simple where clause: --*; 916 data TITI; 917 set TOTO (where=(x = symget('where'))); 918 run;

NOTE: There were 1 observations read from the data set WORK.TOTO. WHERE x=SYMGET('where'); NOTE: The data set WORK.TITI has 1 observations and 1 variables. NOTE: DATA statement used: real time 0.01 seconds cpu time 0.01 seconds

919 920 %let limit=200; 921 %let WHERE=%sysfunc(repeat(0, &limit)); 922 923 data TOTO; 924 length x $1000; 925 x=repeat('0',200); output; 926 run;

NOTE: The data set WORK.TOTO has 1 observations and 1 variables. NOTE: DATA statement used: real time 0.01 seconds cpu time 0.01 seconds

927 928 *-- Apply a simple where clause: --*; 929 data TITI; 930 set TOTO (where=(x = symget('where'))); 931 run;

NOTE: There were 0 observations read from the data set WORK.TOTO. WHERE x=SYMGET('where'); NOTE: The data set WORK.TITI has 0 observations and 1 variables. NOTE: DATA statement used: real time 0.01 seconds cpu time 0.01 seconds

The cutoff point is 200. Looks like something to do with v6, but this was run in v8.2/win.

-----Original Message----- From: Xavier Autret [mailto:xav_x@NOOS.FR] Sent: Wednesday, July 31, 2002 1:08 PM To: SAS-L@LISTSERV.UGA.EDU Subject: A bug in where clause? (V8.2)

Hello!

I m in V8.2 under UNIX and Windows.

A bug in where clause?

I want to know the length limit of a where clause...

My problem is that an application use the content of a macro variable as a where clause. (the application don t use views don t tell me why...).

Under V8 the length of a macro variable value can be 32767 long.

So I wan t to allow the user to provide a macro variable of 32767 char.

BUT BUT BUT:

see that small pieace off code===> (CAUTION SAS halts!!!)

*-- works for limit = 628 --*; %let limit=628; %let WHERE=%sysfunc(repeat(0, &limit))1;

data TOTO; x=3; run;

*-- Apply a simple where clause: --*; data TITI; set TOTO(where=(not("0" = "&WHERE"))); run;

*-- !!!!! halts for limit > 628 --*; %let limit=629; %let WHERE=%sysfunc(repeat(0, &limit))1;

data TOTO; x=3; run;

*-- Apply a simple where clause: --*; data TITI; set TOTO(where=(not("0" = "&WHERE"))); run;

so what s is the limit? is it OS dependent? is it corrected in V9?

Xavier

ps: sorry for my poor english.....


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