LISTSERV at the University of Georgia
Menubar Imagemap
Home Browse Manage Request Manuals Register
Previous messageNext messagePrevious in topicNext in topicPrevious by same authorNext by same authorPrevious page (February 2004, week 3)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Wed, 18 Feb 2004 14:05:16 -0500
Reply-To:     Jose Santos <j-santos@TAMU.EDU>
Sender:       "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:         Jose Santos <j-santos@TAMU.EDU>
Subject:      Persistent error in where statement...

Hi All: Following is a log from a program in which I'm using several macro variables to filter the original data set. =================================================== data temp; set pds.maindata;

46 +where JobArea=&jobarea AND yearswit=&yearswith AND edulevel=&educationlevel AND (pcttime between &maxpercenttime and &minpercenttime) ________

The SAS System

22 76 ERROR 22-322: Syntax error, expecting one of the following: !, !!, &, (, *, **, +, -, /, <, <=, <>, =, >, >=, AND, EQ, GE, GT, LE, LT, NE, OR, ^=, |, ||, ~=.

ERROR 76-322: Syntax error, statement will be ignored.

47 +AND sfyear="&startyear" and efyear="&endyear" AND competencyid IN (&competencies); ERROR: Syntax error while parsing WHERE clause.

====================================================

It's saying that I got a problem with yearswit (there's really no "h") database variable. To discount the problem that it's not due to the yearswit variable that's causing it, I deleted the variable from the where statement. After deletion, the edulevel variable moved to the same physical position where the deleted yearswit=&yearswith was before and was showing the same error. I already checked all my macro variables against the web form and the variables in the databsse being referenced by my where statement. It seems that's there is something in the physical positioning of the variable within the where statement that's causing a problem. BTW, I am not using any option statement to run the program.

My globals are as follows: +%GLOBAL competencies competencies0 startyear endyear jobarea yearswith educationlevel minpercenttime maxpercenttime;

I really could use some help on this.

Thanks. Jose


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