Date: Wed, 31 Oct 2001 06:32:36 -0800
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: Len De La Cruz <lend@IWON.COM>
Subject: Re: SAS-L Digest - 31 Oct 2001 - Special issue (#2001-1350)
Content-Type: text/plain; charset="ISO-8859-1"
Sorry, I should have clarified this.
I know that the "TERM" is causing the problem. It is part of
the name that came from a selection list in an AppDev Web-AF
application using JAVA. The whereclause is dynamically created
from this selection list and is passed on to the SAS program.
The program is submitted using a submitInterface.
In my reply to Karsten, I have tried other macro functions, but it seem
not to work.
Thanks for replying.
-- Original Message --
>An extract of Len's original post is below:
>the 'TERM' following the quotes is causing the SAS System to interpret
>contents of the quotes as defining a time literal. To overcome this, can
>you insert a space between the closing quote and the 'TERM' string?
>Changing the type of quote mark won't assist.
>Perhaps this log extract using a common data set and the date literal will
>83 Data CARS;
>84 Set SASUSER.CARS( Where = ( MONTH > '01jan1960'd) );
>NOTE: The data set WORK.CARS has 560 observations and 4 variables.
>NOTE: The DATA statement used 0.47 seconds.
>87 Data CARS;
>88 Set SASUSER.CARS( Where = ( MONTH > 'A string'date) );
>ERROR: Invalid date/time/datetime constant 'A string'd.
>ERROR: Syntax error while parsing WHERE clause.
>Note that '01Jan1960'date is still an invalid date literal, but the SAS
>Supervisor has assumed you intended to specify a date literal, and produces
>the appropriate error, before it then complains about the characters that
>follow the 'd'.
>To quote the SAS OnLine help on this subject...
>"You can create a constant representing a date or time by writing the
>or time enclosed in single or double quotes, followed by a D (date), T
>(time) or DT (datetime) to indicate the type of value."
>I don't know if you have had a reply on this, I seem to be missing digests
>* 07092 25 9556
>This message is attributable to the sender and does not necessarily reflect
>the view of Halifax Group plc or its subsidiaries.
>on Tue, Oct 30, 2001 at 08:44:21PM -0800, Len De La Cruz (lend@IWON.COM)
>> Hi Sas-lers,
>> Here is an error that I encountered in using a whereclause containing
>> value that has double quotes.
>> 133 %let totalWhere =3D %str(where ; );%let inquiryWhere =3D %str(where
>> 133! PRODNAME in ("MINTZ & JOSEPHSON "TERM."" ););PROC SUMMARY
>> 133! DATA=3DWHSE.SEPSALES MISSING NWAY; &totalWhere ;
>> 133! &inquiryWhere ;CLASS PRODNAME ;VAR _NUMERIC_ ; OUTPUT
>> NOTE: PROCEDURE DATASETS used:
>> real time 12.10 seconds
>> cpu time 0.08 seconds
>Halifax plc, Registered in England No. 2367076. Registered Office: Trinity
>Road, Halifax, West Yorkshire HX1 2RG. Represents only the Halifax Financial
>Services Marketing Group for the purposes of advising on and selling life
>assurance, pensions and unit trust business. The Marketing Group is regulated
>by the Personal Investment Authority. Switchboard 01422 333333.
Visit iWon.com - the Internet's largest guaranteed cash giveaway! Click
here now for your "Thank You" gift: