need help to figure out why I'm getting EXCP=2 when I (IMHO) don't think COMET


[ Follow Ups ] [ Post Followup ] [ Signature.net Forum ]

Posted by Bob A on September 21, 2010 at 14:35:20: Uploaded files: 3

Think I'm finally able to re-produce a problem that's been playing "peek-a-boo" for some time now

namely... encountering EXCP=2 when I (IMHO) don't think the should return EXCP=2

this test program

reads in a list of dummy transactions with invoice numbers, customer numbers, and a shipping date
looks each invoice up in a file (C1ADIST.TXT is a copy of the actual keyed file) that has only 8 records

the objective is to see if the customer|invoice date gets a hit, and then check if it's within date range for further processing

as one can see from the printout (TXT946.txt)... all goes swimmingly until:

read in VIDE40 on read # 19
this is greater than the last key in the lookup table (VALL58|2009-04-05) and gets EXCP=2... it's all good
however...
the next read (i.e. # 20) Customer:DNSS35 Ship Date:2009-04-02 is surely less than ETEL79|2009-01-01 (2nd record)
but...
EXCP=2 for this KEY and for every one of the 220 odd records after it when the program gets to line 190:

IF EXCP EQ excp02EndOfFile THEN
C1ADIST.AT.EOF$ = Y.ANS$
RETURN
ENDIF

even though each time I reset the file pointer in line 147 with

POSITION (C1ADIST) KEY=CNBR$

and it should no longer be sitting at the EOF point (i.e. after (VALL58|2009-04-05)) for the input file.

this used to happen (in a galaxy long ago and far away) when assembler programmers stepped on file control blocks and strange things happened.

as always... I consummatly hope this is a glaring error on my part that will be vanquished by another set of eyes, because I've been looking at it for too long, to no avail.

Thanx

Bob "A"


Follow Ups:



Post a Followup

Name:
E-Mail:

Subject:

What is the name of the main Signature System's Product?  

Comments:

Optional Link URL:
Link Title:
Optional Image URL:

You may attach up to 5 files to your followup (see below):





Each file can be a maximum of 1MB in length Uploaded files will be purged from the server on a regular basis.


[ Follow Ups ] [ Post Followup ] [ Signature.net Forum ]