View previous topic :: View next topic
|
Author |
Message |
melmania
New User
Joined: 22 Sep 2006 Posts: 4 Location: Phoenix, AZ
|
|
|
|
I have a file that contains a 2-byte field which I defined as 'N'. In the file the field has a hex value of x'F5C2'. My program does a check to determine if the field is numeric (some of the records contain spaces). This record fails the numeric check and is not added to the total. Does anyone know how to handle this? |
|
Back to top |
|
|
guptae
Moderator
Joined: 14 Oct 2005 Posts: 1208 Location: Bangalore,India
|
|
|
|
Hi melmania,
Just try to defined as
ws-var 2 P
then try to add it. I hope it should work.
Just try it & let us know the result |
|
Back to top |
|
|
melmania
New User
Joined: 22 Sep 2006 Posts: 4 Location: Phoenix, AZ
|
|
|
|
Ekta,
Thanks for your suggestion. As I expected, it did not work. If the field was a packed field it should be x'052C', not x'F5C2'. I tried several statements, add, move... but all with the same result: Code 7 (Data Excp). |
|
Back to top |
|
|
guptae
Moderator
Joined: 14 Oct 2005 Posts: 1208 Location: Bangalore,India
|
|
|
|
HI melmania,
Just try to defined as
ws-var 2 b
then try to add it. I hope it should work.
Just try it & let us know the result |
|
Back to top |
|
|
melmania
New User
Joined: 22 Sep 2006 Posts: 4 Location: Phoenix, AZ
|
|
|
|
I took out the numeric check and Easytrieve added the value correctly. However, it fails the numeric check. Interesting. |
|
Back to top |
|
|
guptae
Moderator
Joined: 14 Oct 2005 Posts: 1208 Location: Bangalore,India
|
|
|
|
Thats great |
|
Back to top |
|
|
|