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 (March 2001, week 5)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Thu, 29 Mar 2001 12:59:16 +0000
Reply-To:     JA <donotreply@INTERBULLETIN.BOGUS>
Sender:       "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:         JA <donotreply@INTERBULLETIN.BOGUS>
Organization: BBS
Subject:      SAS Question

I'm using SAS V6.8 in the mainframe platform. My input flat file contains a field defined as packed-decimal. When I tried to compare it with literal zero, it does not give me the correct evaluation even if the field actually contains a zero value packed-decimal.


INPUT @01 varnum PD8.3; /* varnum has X'000000000000000F' */ ... IF (varnum NE 0.00) or (varnum NE .) THEN varvalid = 'N'; ELSE varvalid = 'Y';

I got varlid equal to 'N'. Why?

I was able to go around it by changing the condition to : IF ((varnum * 1) NE 0)

Why do I have to perform a numeric operation before it arives to the correct answer?

Thanks for your help in advance.

_______________________________________________ Submitted via WebNewsReader of

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