From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 1164f8,2d0fb71f9945df5b,start X-Google-Attributes: gid1164f8,public From: Robert Moniot Subject: Please help newbie with OSF COBOL problem Date: 1997/10/23 Message-ID: #1/1 X-Deja-AN: 285122128 Followup-To: comp.sys.dec Organization: Fordham University/FCLC Newsgroups: comp.sys.dec 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