From: Robert Moniot <moniot@erdos.dsm.fordham.edu>
Subject: Please help newbie with OSF COBOL problem
Date: 1997/10/23 [thread overview]
Message-ID: <uf201cfq4w.fsf@erdos.dsm.fordham.edu> (raw)
Hi.
We are using DEC COBOL Compiler Driver V2.4-863 on OSF1 V4.0 386 alpha.
Being a typical academic, I don't know much about cobol. I am
assisting some of our students who are teaching it to themselves. We
have encountered a problem which seems to be incorrect behavior of the
compiler or the run-time library. The symptom is that when any
program tries to open a file, say "foo.dat", for input, it hangs for
about thirty seconds and then issues the message:
cobrtl: severe: Error during OPEN on file foo.dat
The file foo.dat exists and is readable by the user. Any suggestions
as to what might be the problem will be very welcome. Please e-mail
me responses since I do not normally read this group.
Here is a sample program that shows this problem. It compiles without
warnings using the command ``cobol -warn all oneline.cob -o oneline''
It runs OK on a VAX/VMS system.
IDENTIFICATION DIVISION.
PROGRAM-ID. oneline.
AUTHOR. Robert Moniot
DATE-WRITTEN. October 1997.
*This is a simple program that reads the first line of a file and
*writes it to standard output.
ENVIRONMENT DIVISION.
INPUT-OUTPUT SECTION.
FILE-CONTROL.
SELECT INPUT-FILE ASSIGN TO "foo.dat".
DATA DIVISION.
FILE SECTION.
FD INPUT-FILE
RECORD CONTAINS 80 CHARACTERS.
01 INPUT-FILE-RECORD PIC X(80).
WORKING-STORAGE SECTION.
77 INPUT-LINE PIC X(80).
PROCEDURE DIVISION.
EXECUTIVE-PARA.
OPEN INPUT INPUT-FILE.
READ INPUT-FILE RECORD INTO INPUT-LINE AT END STOP RUN.
DISPLAY INPUT-LINE.
CLOSE INPUT-FILE.
STOP RUN.
--
Bob Moniot
Fordham University email: moniot@dsm.fordham.edu
Fordham College at Lincoln Center URL: http://www.dsm.fordham.edu/~moniot/
New York, NY 10023 phone: (212) 636-6311
reply other threads:[~1997-10-23 4:00 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
read-only archive
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox