https://gcc.gnu.org/bugzilla/show_bug.cgi?id=119636
            Bug ID: 119636
           Summary: compile error: gcobol1 does not find file descriptions
                    in case of obsolete FD phrases
           Product: gcc
           Version: 15.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: cobol
          Assignee: unassigned at gcc dot gnu.org
          Reporter: simonsobisch at gnu dot org
  Target Milestone: ---

IX302M.CBL:15:19: error: line 19: TFIL lacks a file description
   15 | 001500     SELECT TFIL ASSIGN                                          
IX3024.2
      |                   ^
cobol1: error: failed compiling IX302M.CBL

The code from NIST in question is:


003300 DATA DIVISION.                                                  
IX3024.2
003400 FILE SECTION.                                                   
IX3024.2
003500 FD TFIL                                                         
IX3024.2
003600     LABEL RECORDS STANDARD                                      
IX3024.2
003700*Message expected for above statement: OBSOLETE                  
IX3024.2
003800                                                                 
IX3024.2
003900     VALUE OF                                                    
IX3024.2
004000     OCLABELID                                                   
IX3024.2
004100     IS                                                          
IX3024.2
004200     "OCDUMMY"                                                   
IX3024.2
004300*Message expected for above statement: OBSOLETE                  
IX3024.2
004400                                                                 
IX3024.2
004500     DATA RECORDS ARE FREC.                                      
IX3024.2
004600*Message expected for above statement: OBSOLETE                  
IX3024.2
004700                                                                 
IX3024.2
004800 01 FREC.                                                        
IX3024.2
004900     03 RKEY PIC X(8).                                           
IX3024.2


So "obviously" FD TFIL has a lot of noise, but it still should be recognised.
Why is that important: old code was not changed and still has this (at least
expect that in mainframe code).

Reply via email to