Re: Reading file error on AIX 5.2, microfocus cobol 4.0 SP1
- From: riplin <riplin@xxxxxxxxxxxx>
- Date: Thu, 9 Jul 2009 11:38:57 -0700 (PDT)
On Jul 10, 2:19 am, hamilton <hamiltonh...@xxxxxxxxx> wrote:
We have a cobol program to process EDI file , It is using following to
condition end of file .
READ INPUT-FILE AT END
MOVE 'Y' TO WS-END-OF-FILE-SW
GO TO 150-EXIT.
For some reason ( run-time ,environment , etc... ) , a large fiel only
be read partially , but did move 'Y' to the switch . It caused the
file onle be processed partially , but no error logs . The same file
can be re-processed sucessfully . It happens very randomly , 3 times
since last 3 months.
Help please !
On Unix a file can be opened for reading while it is still being
written. If the file is arriving by, say, ftp and your program is
running from a cron job, or otherwise cycling looking for files that
have newly arrived, then it may be trying to process the file before
it is completely written and thus reaching the 'end' at that time.
If this is the case then try doing a sleep() or somehow mark the file
and do it next cycle.
.
- Follow-Ups:
- Re: Reading file error on AIX 5.2, microfocus cobol 4.0 SP1
- From: hamilton
- Re: Reading file error on AIX 5.2, microfocus cobol 4.0 SP1
- References:
- Reading file error on AIX 5.2, microfocus cobol 4.0 SP1
- From: hamilton
- Reading file error on AIX 5.2, microfocus cobol 4.0 SP1
- Prev by Date: Re: Reading file error on AIX 5.2, microfocus cobol 4.0 SP1
- Next by Date: Re: Reading file error on AIX 5.2, microfocus cobol 4.0 SP1
- Previous by thread: Re: Reading file error on AIX 5.2, microfocus cobol 4.0 SP1
- Next by thread: Re: Reading file error on AIX 5.2, microfocus cobol 4.0 SP1
- Index(es):
Relevant Pages
|