|
View previous topic :: View next topic
|
| Author |
Message |
sanil m
New User
Joined: 24 Aug 2007 Posts: 38 Location: chennai
|
|
|
|
Hi,
I have an easytrieve program where termdate is declared as
TERMDATE 57 6 N
TRMYY 57 2 N
TRMMM 59 2 N
TRMDD 61 2 N
When i execute the condition
IF TERMDATE = 020318
I am getting the error
*******A006 PROGRAM INTERRUPT - CODE 7 (DATA EXCP)
Could anyone please help me on this.
P.S: I have seen a previous topic with the same error, but was not clarified with the answer. |
|
| Back to top |
|
 |
G-Johnson
New User
Joined: 12 Mar 2007 Posts: 20 Location: USA
|
|
|
|
| This is similar to a SOC7 - data exception. You probably have non-numeric data in field TERMDATE of your input file. |
|
| Back to top |
|
 |
dick scherrer
Moderator Emeritus

Joined: 23 Nov 2006 Posts: 19243 Location: Inside the Matrix
|
|
|
|
Hello,
Yes, it is a s0c7.
As suggested, the value in TERMDATE is not numeric.
If you post the actual value in TERMDATE, we can help. |
|
| Back to top |
|
 |
sanil m
New User
Joined: 24 Aug 2007 Posts: 38 Location: chennai
|
|
|
|
@ dich scherrer
There are 10,000 records with the termdate. So will not be able to find which record is having non-numeric data using displays. |
|
| Back to top |
|
 |
sanil m
New User
Joined: 24 Aug 2007 Posts: 38 Location: chennai
|
|
|
|
how will i be able to identify which record is having non-numeric data when there are close to 10,000 records?
Putting displays will not be a good method. |
|
| Back to top |
|
 |
G-Johnson
New User
Joined: 12 Mar 2007 Posts: 20 Location: USA
|
|
|
|
You can try changing the file definition to TERMDATE 57 6 A and test for
IF TERMDATE NE '000000' THRU '999999' |
|
| Back to top |
|
 |
Craq Giegerich
Senior Member
Joined: 19 May 2007 Posts: 1512 Location: Virginia, USA
|
|
|
|
| G-Johnson wrote: |
You can try changing the file definition to TERMDATE 57 6 A and test for
IF TERMDATE NE '000000' THRU '999999' |
What about '00zzz9'? |
|
| Back to top |
|
 |
dick scherrer
Moderator Emeritus

Joined: 23 Nov 2006 Posts: 19243 Location: Inside the Matrix
|
|
|
|
Hello,
| Quote: |
| There are 10,000 records with the termdate. So will not be able to find which record is having non-numeric data using displays. |
You might test if TERMDATE is numeric and display the value when it is not. . . (along with the record number). . .
Then that/those record(s) could be viewed on the terminal. |
|
| Back to top |
|
 |
sanil m
New User
Joined: 24 Aug 2007 Posts: 38 Location: chennai
|
|
|
|
Hi,
Thanks all of you.
I was able to solve the issue. I declared the termdate as alphanumeric
and used the condition
| Code: |
IF TERMDATE NOT NUMERIC
DISPLAY 'TERM DATE WHICH IS NOT NUMERIC IS ' TERMDATE
END-IF |
|
|
| Back to top |
|
 |
dick scherrer
Moderator Emeritus

Joined: 23 Nov 2006 Posts: 19243 Location: Inside the Matrix
|
|
|
|
You're welcome
Thank you for posting that it is solved.
d |
|
| Back to top |
|
 |
|
|