Houdy,
Cooter here usen Jem's stuff.
COBOL program, select file, assign file, no status, no file equates.
File is created in temporary domain, program aborts and raises
tombstone on 10,001 writes.
Add FILE STATUS. Upon 10,001 write file status becomes 34 and
program continues to run until manually aborted. The temporary
files EOF is left at 10000.
We may conclude that poor Jem's problem was a result of.......well
Jeez now I'm confused. The file definitions and open are the same
as the program the poor turkey was running Saturday/Sunday. Jem tells me
that the file must have been opened as NEW and just ran it's merry
way. This test mimics the behaviour of the original pain in the...
the other program so........here we are again.
No tombstone nor any other error was reported by either the OS or
the application program on Sunday therefore the program obviously
uses FILE STATUS as in the above example and just never tests
the status. Simple enough, but the program does *not* use the
FILE STATUS clause..........lemme go check........nope no status
clause therefore it matches case one above except there are no
error messages therefore it matches case two above but there's
no status checking so it matches case one so.......ummmm
must be beer o'clock. Hope someone let's Jem outta thet kloset
I left em in.
$CONTROL SOURCE 11 FEB99
IDENTIFICATION DIVISION. 11 FEB99
PROGRAM-ID. TSTPRG. 11 FEB99
ENVIRONMENT DIVISION. 11 FEB99
INPUT-OUTPUT SECTION. 11 FEB99
FILE-CONTROL. 11 FEB99
11 FEB99
SELECT TEST-FILE ASSIGN TO "TSTFILE" 11 FEB99
FILE STATUS IS F-STAT. 11 FEB99
DATA DIVISION. 11 FEB99
FILE SECTION. 11 FEB99
11 FEB99
FD TEST-FILE. 11 FEB99
11 FEB99
01 TEST-REC PIC X(80). 11 FEB99
11 FEB99
WORKING-STORAGE SECTION. 11 FEB99
01 F-STAT PIC XX. 11 FEB99
01 REC-CNT PIC S9(9) COMP. 11 FEB99
11 FEB99
11 FEB99
PROCEDURE DIVISION. 11 FEB99
01-CNTL-PARA. 11 FEB99
11 FEB99
OPEN OUTPUT TEST-FILE. 11 FEB99
MOVE SPACES TO TEST-REC. 11 FEB99
11 FEB99
02-DEATH-LOOP. 11 FEB99
WRITE TEST-REC. 11 FEB99
DISPLAY "F-STAT " F-STAT. 11 FEB99
ADD 1 TO REC-CNT. 11 FEB99
DISPLAY REC-CNT. 11 FEB99
IF REC-CNT = 10005 GO TO 03-EXIT. 11 FEB99
GO TO 02-DEATH-LOOP. 11 FEB99
11 FEB99
03-EXIT. 11 FEB99
CLOSE TEST-FILE. 11 FEB99
STOP RUN. 11 FEB99
/
Coot
> -----Original Message-----
> From: Jim Phillips [SMTP:[log in to unmask]]
> Sent: Wednesday, February 10, 1999 8:59 PM
> To: [log in to unmask]
> Subject: Re: Where's the file?
>
> Jeff Woods writes:
>
> >5. Same scenario as 4 except the file is too small to hold all the data,
> so
> >errors would have occurred when the file overflowed, but those errors
> went
> >undetected by the application because it wasn't checking for errors,
> which
> >is the case as I understand the thread so far.
>
> Yes, but. . .
>
> It's been my experience that when using COBOL *and* you reach the end of
> file *and* you are not using error checking, then the program will abort.
>
> That is my anecdotal evidence, and I wish someone would chime in with
> some "real" evidence.
>
> Actually, I'm 99% sure that the program would abort in such a case, so
> I'm sure there must some explanation, such as a large file limit on the
> SELECT statement or some such. If we could just find Cooter, we could
> get to the bottom of this.
>
> Jim Phillips Manager of Information Systems
> Voice: (330) 527-2124 Therm-O-Link, Inc.
> Fax: (330) 527-2123 PO Box 285; 10513 Freedom St.
> Email: [log in to unmask] Garrettsville, Ohio 44231
|