Link to home
Start Free TrialLog in
Avatar of JCW2
JCW2

asked on

COBOL debugging

I got these errors:
                                                                               
     15  IGYGR0098-S   A "RELATIVE KEY" clause was missing or invalid in the "SELECT" entry for file "AREA-REC".  The file definition was discarded.                                                                  
                                                                               
     18  IGYGR1174-S   "RFILE-RELATIVE-KEY" was not defined as a data-name.  "RFILE-RELATIVE-KEY" was discarded.
                                                                               
     19  IGYGR1174-S   "FSTAT-CODE" was not defined as a data-name.  "FSTAT-CODE was discarded.
                                                                               
     19  IGYGR1174-S   "VSAM-CODE" was not defined as a data-name.  "VSAM-CODE" was discarded.
                                                                               
     24  IGYGR1216-I   A "RECORDING MODE" of "F" was assumed for file "PRINT-LINE".
                                                                               
     70  IGYPS2052-S   An error was found in the definition of file "AREA-REC".  This input/output statement was discarded.
                                                                               
                       Same message on line:    102                            
                                                                               
     82  IGYPS2053-S   An error was found in the definition of file "AREA-REC".  This input/output statement was discarded.

Would you help me understand what these errors mean?
t11job1.txt
T011.txt
I011.txt
CBL2011.txt
Avatar of Kent Olsen
Kent Olsen
Flag of United States of America image

Hi JCW2,

Can you post the entire SELECT statement associated with this file.  It starts about line 10 or so.



Thanks,
Kent
Sorry.  I opened the wrong attachment.  :)

I've copied the relative portions of the code below.

Note that there is nothing called "RFILE-RELATIVE-KEY".  You'll need to create the variable, and probably the FSTAT-CODE and VSAM-CODE variables, too.



Kent

FILE-CONTROL.                                                    
           SELECT PRINT-LINE ASSIGN TO PRTLINE.                         
           SELECT AREA-REC   ASSIGN TO AREAREC                          
               ORGANIZATION IS RELATIVE                                 
               ACCESS IS SEQUENTIAL                                     
               RELATIVE KEY IS RFILE-RELATIVE-KEY                       
               FILE STATUS IS FSTAT-CODE VSAM-CODE.                     
      *-------------                                                    
       DATA DIVISION.                                                   
      *-------------                                                    
       FILE SECTION.                                                    
                                                        
      *                                                                 
       FD  AREA-REC.                                                    
       01  AREA-REC-IN.                                                 
           05  AREA-IN        PIC X(49).                                
           05  AREA-STATE     PIC X(2).                                 
           05  FILLER         PIC X(1).                                 
           05  AREA-TYPE      PIC X(1).                                 
           05  AREA-Q1        PIC S9(8) COMP-3.                         
           05  AREA-Q2        PIC S9(8) COMP-3.                         
           05  AREA-Q3        PIC S9(8) COMP-3.                         
           05  AREA-Q4        PIC S9(8) COMP-3.                         
           05  FILLER         PIC X(7).

Open in new window

ASKER CERTIFIED SOLUTION
Avatar of Michel Plungjan
Michel Plungjan
Flag of Denmark image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of JCW2
JCW2

ASKER

Thank you for your help.