Subject: | |
From: | |
Reply To: | |
Date: | Tue, 19 Jun 2001 10:06:47 -0400 |
Content-Type: | text/plain |
Parts/Attachments: |
|
|
If it is pic 9, then the highest valid value it can have is "9", so it will
always be less than 10 and less than 113. How it deals with invalid values
depends upon the COBRUNTIME variable, but in no case should it ever consider
a single digit > 9
You could declare it PIC X and compare it to octal %161. I think there is
also a FUNCTION ORD if you use "$CONTROL POST85"
See http://docs.hp.com/cgi-bin/doc3k/B3150090013.11820/144
----- Original Message -----
From: "Dave" <[log in to unmask]>
To: <[log in to unmask]>
Sent: Monday, June 18, 2001 7:45 PM
Subject: This should be easy, but....
> I have this file that looks like this:
> E2 2A C7 04 00 00 07 D3 E8.....ad nauseum. I have to look at the file a
> byte at a time to decide what to do. I have the file set up as a bunch of
> pic 9 fields. My problem is that my compares fail. In one instace
field-1,
> a pic 9, is hex 72 or dec 114. My code:
>
> if field-1 < 113
> display "Less than 113"
> else
> display "Greater than 113".
>
> It displays "Less than 113".
>
> Any ideas?
>
> * To join/leave the list, search archives, change list settings, *
> * etc., please visit http://raven.utc.edu/archives/hp3000-l.html *
* To join/leave the list, search archives, change list settings, *
* etc., please visit http://raven.utc.edu/archives/hp3000-l.html *
|
|
|