Thanks
ENVIRONMENT DIVISION.
CONFIGURATION SECTION.
SOURCE-COMPUTER.
PC.
OBJECT-COMPUTER.
PC.
INPUT-OUTPUT SECTION.
FILE-CONTROL.
SELECT TABLE-FILE
ASSIGN TO "E:\COBOL\LAB5\C1208.TXT"
ORGANIZATION IS INDEXED
RECORD KEY IS SSNO-IN
ACCESS IS SEQUENTIAL.
DATA DIVISION.
FILE SECTION.
FD TABLE-FILE LABEL RECORDS ARE STANDARD.
01 TABLE-REC-IN.
05 SSNO-IN PIC 9(9).
05 CREDITS-COMP-IN PIC 9(5).
05 GPA-IN PIC 9V99.
PROCEDURE DIVISION.
START-PROGRAM.
PERFORM OPEN-FILE.
PERFORM INPUT-DATA.
PERFORM READ-DATA.
PERFORM CLOSE-FILE.
PERFORM END-PROGRAM.
INPUT-DATA.
DISPLAY "ENTER SSN".
ACCEPT SSNO-IN.
OPEN-FILE.
OPEN INPUT TABLE-FILE.
READ-DATA.
READ TABLE-FILE.
CLOSE-FILE.
CLOSE TABLE-FILE.
END-PROGRAM.
STOP RUN.
The 043 error is generated by the Micro Focus run-time. The Micro Focus
Error Message guide says:
--- quote ---
043 File information missing for indexed file (fatal)
The system has crashed on your programs previous run, wile the file was
open. Information was probably added to the end of the file, but the
directory information was not updated so that data cannot be accessed by
your system. Alternatively, you have copied the indexed file from one disk
to another but have copied either only the data part of the file or only the
index.
--- end quote ---
Given that your program does no writing I would bet on the alternative. Make
sure that you have both C1208.TXT and C1208.IDX present.
Another possibility is that C1208.TXT is not an indexed file and your ASSIGN
clause is incorrect. In that case you should reread your homework
instructions and verify that you are referencing the correct file.
Good luck completing your assignment.
Karl
"anon" <an...@anon.net> wrote in message
news:14b67tkvvqsqugvuj...@4ax.com...
>Microfocus Animator on the PC. I was having some problems with index
>files so I started over and plan on working one step at a time. Here
>is my problem. The following code compiles fine but when I run it I
>get the following error. File information missing for indexed file
>(error 043). I have looked up the error message and have about 3
>books out but nothing has helped. I realize it's probably a simple
>problem but I am lost at this point.
>
How was the TABLE-FILE created?
Since you have the SELECT statement pointing to a file
with a TXT extension, I wonder if you are trying to read
a Text file that you manually created via a text editor.
Fred Snyder <fpsn...@bellsouth.net> wrote:
> Haven't worked with Micro Focus Indexed files in years but I believe
Micro
> Focus expects the data file portion to have a ".dat" extent. not a
".txt".
>
MF does not care what the file extension is (as long as it isn't .idx).
It would be happy with "C1208" or "C1208.DAT" or "C1208.TXT". I don't
know of any that do care (though some may).
> anon wrote:
>
> > I realize that most comp.lang groups aren't here for helping with
> > homework.
'Helping with homework' is OK, doing homework is not.
> > FILE-CONTROL.
> > SELECT TABLE-FILE
> > ASSIGN TO "E:\COBOL\LAB5\C1208.TXT"
> > ORGANIZATION IS INDEXED
> > RECORD KEY IS SSNO-IN
> > ACCESS IS SEQUENTIAL.
It is likely that C1208.TXT is _not_ an indexed file at all (hence the
error message), but is a text (SEQUENTIAL or LINE SEQUENTIAL) file.
You probably need to have a program read this and write an actual
indexed file containing the data. Or change the SELECT to ORGANISATION
SEQUENTIAL or LINE SEQUENTIAL with no RECORD KEY.
ie the 'ORGANISATION IS' clause needs to tell Cobol what the file _is_
not what you want it to be.
Sent via Deja.com
http://www.deja.com/
Rudy
In article <14b67tkvvqsqugvuj...@4ax.com>,