Ralphiep
asked on
Cobol12(Compiler error # 71 - Record NOT Defined
Has anyone had this "simple" problem before? Below is the relevant portion of my code the, the FD statement. Is there someone there who can tell me what I'm doing wrong? The problem is with LETFILE. I get an error message saying that the FD for it (line 25 in the listing) has no RECORD defined for it, which you see I do define in line 29. The whole program is only about 100 lines long. If anyone can help with this I would be very grateful. Thanks.
000009 FILE-CONTROL.
000010 SELECT DISKFILE ASSIGN TO DISK
000011 ORGANIZATION SEQUENTIAL ACCESS SEQUENTIAL
000012 FILE STATUS IS FILE-STATUS
000013 RECORD DELIMITER IS STANDARD-1.
000014 SELECT LETFILE ASSIGN TO DISK
000015 ORGANIZATION SEQUENTIAL ACCESS SEQUENTIAL
000016* FILE STATUS IS FILE-STATUS
000017 RECORD DELIMITER IS STANDARD-1.
000018
000019 DATA DIVISION.
000020 FILE SECTION.
000021 FD DISKFILE
000022 LABEL RECORD IS STANDARD
000023 VALUE OF ID IS "SKELFIL4.TXT"
000024 DATA RECORD IS FLD1.
000025 FD LETFILE
000026 BLOCK CONTAINS 1 RECORD
000027 RECORD CONTAINS 15 CHARACTERS
000028 LABEL RECORD IS STANDARD
000029 DATA RECORD IS LETVAL
000030 VALUE OF ID IS "LETFILE.TXT".
000031 01 FLD1.
000032 02 FLD2 PIC A(15) OCCURS 15 TIMES.
000033 01 LETVAL.
000034 05 LET15 PIC X(15).
000035
000036 WORKING-STORAGE SECTION.
000037 01 ALPHAVAL.
000038 05 LETFIELD PIC X OCCURS 15 TIMES INDEXED BY NT.
I don't know if I can assign a difficulty. I think I'm probably making a very simple, stupid error that I just don't see.
000009 FILE-CONTROL.
000010 SELECT DISKFILE ASSIGN TO DISK
000011 ORGANIZATION SEQUENTIAL ACCESS SEQUENTIAL
000012 FILE STATUS IS FILE-STATUS
000013 RECORD DELIMITER IS STANDARD-1.
000014 SELECT LETFILE ASSIGN TO DISK
000015 ORGANIZATION SEQUENTIAL ACCESS SEQUENTIAL
000016* FILE STATUS IS FILE-STATUS
000017 RECORD DELIMITER IS STANDARD-1.
000018
000019 DATA DIVISION.
000020 FILE SECTION.
000021 FD DISKFILE
000022 LABEL RECORD IS STANDARD
000023 VALUE OF ID IS "SKELFIL4.TXT"
000024 DATA RECORD IS FLD1.
000025 FD LETFILE
000026 BLOCK CONTAINS 1 RECORD
000027 RECORD CONTAINS 15 CHARACTERS
000028 LABEL RECORD IS STANDARD
000029 DATA RECORD IS LETVAL
000030 VALUE OF ID IS "LETFILE.TXT".
000031 01 FLD1.
000032 02 FLD2 PIC A(15) OCCURS 15 TIMES.
000033 01 LETVAL.
000034 05 LET15 PIC X(15).
000035
000036 WORKING-STORAGE SECTION.
000037 01 ALPHAVAL.
000038 05 LETFIELD PIC X OCCURS 15 TIMES INDEXED BY NT.
I don't know if I can assign a difficulty. I think I'm probably making a very simple, stupid error that I just don't see.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
You're welcome.
BTW... what is Cobol12? I've worked with dozens of versions of COBOL over the last 40 years but never heard of this one. Who makes it?
Lynn
BTW... what is Cobol12? I've worked with dozens of versions of COBOL over the last 40 years but never heard of this one. Who makes it?
Lynn
ASKER
Lynn (Jester Too),
Here is some information about Cobol12.
COBOL 16-bit Compiler for Video Mode 12H
Freeware
John Soeberg
jsoeberg@paradise.net.nz
-------------------------- ---------- ---------- ---------- ---------- ---------- ----
COBOL12 is a 16-bit COBOL compiler that runs under DOS or Windows. The compiler was originally based on Ansi74, but has undergone many changes since its inception. It does not include some features such as SORT and STRING, but it has many non-standard features included.
Indexed sequential files are supported by the standard COBOL statements for these files, and by the provision of the BTRIEVE indexed file system.
The compiled programs use video mode 12H, a graphical mode of 640 by 480 pixels, 30 text lines of 80 characters each, and 16 colours.
Two non-standard modules are included to provide the program interface to the screen.
Now that the problem is solved should I close the question. How do I do that? Did you get your points? Thanks again.
- Ralph
Here is some information about Cobol12.
COBOL 16-bit Compiler for Video Mode 12H
Freeware
John Soeberg
jsoeberg@paradise.net.nz
--------------------------
COBOL12 is a 16-bit COBOL compiler that runs under DOS or Windows. The compiler was originally based on Ansi74, but has undergone many changes since its inception. It does not include some features such as SORT and STRING, but it has many non-standard features included.
Indexed sequential files are supported by the standard COBOL statements for these files, and by the provision of the BTRIEVE indexed file system.
The compiled programs use video mode 12H, a graphical mode of 640 by 480 pixels, 30 text lines of 80 characters each, and 16 colours.
Two non-standard modules are included to provide the program interface to the screen.
Now that the problem is solved should I close the question. How do I do that? Did you get your points? Thanks again.
- Ralph
Hi, Ralph. Thanks for the info. I think I'll download a copy and play around with it.
Yes, you need to take some action to close a question. Otherwise, one of the "cleanup volunteers" may force a closure in a different manner than you'd prefer after 21 days of no activity. And they prefer not to have to do that.
Read this link on how to close out a question: (if you're accepting 1 answer then basically you just click on the "Accept" button at the far right of the screen on the "header" of the answer you want to accept and assign a grade to it. You can also split points among multiple experts... the link show all your options and how to perform them.
https://www.experts-exchange.com/Programming/Programming_Languages/help.jsp#hs5
Regards,
Lynn
Yes, you need to take some action to close a question. Otherwise, one of the "cleanup volunteers" may force a closure in a different manner than you'd prefer after 21 days of no activity. And they prefer not to have to do that.
Read this link on how to close out a question: (if you're accepting 1 answer then basically you just click on the "Accept" button at the far right of the screen on the "header" of the answer you want to accept and assign a grade to it. You can also split points among multiple experts... the link show all your options and how to perform them.
https://www.experts-exchange.com/Programming/Programming_Languages/help.jsp#hs5
Regards,
Lynn
ASKER