Date: Fri, 24 Oct 2008 14:19:28 -0400
Reply-To: Jack Clark <jclark@HILLTOP.UMBC.EDU>
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: Jack Clark <jclark@HILLTOP.UMBC.EDU>
Subject: Re: COMPRESS function modifier not working as expected in
Content-Type: text/plain; charset="us-ascii"
You're right! Thanks for the quick answer.
Senior Research Analyst
University of Maryland, Baltimore County
Sondheim Hall, 3rd Floor
1000 Hilltop Circle
Baltimore, MD 21250
Confidentiality Notice: This e-mail may contain information that is legally privileged and that is intended only for the use of the addressee(s) named above. If you are not the intended recipient, you are hereby notified that any disclosure, copying of this e-mail, distribution, or action taken in reliance on the contents of this e-mail and/or documents attributed to this e-mail is strictly prohibited. If you have received this information in error, please notify the sender immediately by phone and delete this entire e-mail. Thank you.-----Original Message-----
From: Dave Scocca [mailto:firstname.lastname@example.org]
Sent: Friday, October 24, 2008 2:18 PM
To: Jack Clark; SAS(r) Discussion
Subject: Re: [SAS-L] COMPRESS function modifier not working as expected
in PROC SQL
--On 10/24/2008 2:12 PM -0400 Jack Clark wrote:
> When I run it in PROC SQL, an ERROR is generated.
> 755 proc sql;
> 756 select compress(x,,"d") as y
> ERROR 22-322: Syntax error, expecting one of the following: a name, a
> quoted string,
> a numeric constant, a datetime constant, a missing
> BTRIM, INPUT, LOWER, PUT,
> SUBSTRING, UPPER, USER.
It looks like the DATA step allows two consecutive commas to represent a
missing parameter, while SQL requires an explicit specification of the
missing parameter between the commas (as . or ""). The following should
select compress(x,"","d") as y