NOTICE:
All information in and attached to the e-mail(s) below may be proprietary, 
confidential, privileged and otherwise protected from improper or erroneous 
disclosure.  If you are not the sender's intended recipient, you are not 
authorized to intercept, read, print, retain, copy, forward, or disseminate 
this message.  If you have erroneously received this communication, please 
notify the sender immediately by phone (704-758-1000) or by e-mail and destroy 
all copies of this message (electronic, paper, or otherwise).  Thank you.

You need to change your OR's to AND's.  If the condition matches any of
the three OR segments it will be passed.   

-----Original Message-----
From: IBM Mainframe Discussion List [mailto:[EMAIL PROTECTED] On
Behalf Of Carol Srna
Sent: Friday, March 02, 2007 9:15 AM
To: [email protected]
Subject: SAS IF Statement with ANDs and ORs

Hello All.
Input Fields:
Volser: 3-8

STATUS $ 71 

DSN: $ 10-53

Location: $ 55-62

IF STATEMENTS:
IF (STATUS = 'M' AND VOLSER NE '.' AND DSN NE ' '
   OR LOCATION NE 'OAM' OR LOCATION NE 'DYLT');

I do not want any Locations of OAM or DYLT. BUT, I am getting records
for them and also records where the VOLSER and DSN fields are blanks.

What's wrong with this code?
TIA
~~Carol
                       

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions, send
email to [EMAIL PROTECTED] with the message: GET IBM-MAIN INFO Search
the archives at http://bama.ua.edu/archives/ibm-main.html

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [EMAIL PROTECTED] with the message: GET IBM-MAIN INFO
Search the archives at http://bama.ua.edu/archives/ibm-main.html

Reply via email to