[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: [open-cobol-list] Problem with the EXTERNAL Keyword

From: Robert Sherry
Subject: RE: [open-cobol-list] Problem with the EXTERNAL Keyword
Date: Mon Dec 12 17:06:13 2005


     One more thing, here is an example program that demonstrates the

       IDENTIFICATION DIVISION.                             
       PROGRAM-ID.    FII2PA01.                              
       ENVIRONMENT DIVISION.                                  
       CONFIGURATION SECTION.                                  
       INPUT-OUTPUT SECTION.                                    
           SELECT T06312   ASSIGN TO UT-T06312                    
                           FILE STATUS IS WS1.
       DATA DIVISION.                             
       FILE SECTION.                               
       FD  T06312                                   
           RECORDING MODE IS V.                        
       01  FD-T06312-ALT-REC  PIC X(285).               
       WORKING-STORAGE SECTION.                                    
       01  WS1       PIC X(2) EXTERNAL. 

Bob Sherry

-----Original Message-----
From: address@hidden
[mailto:address@hidden On Behalf Of Robert
Sent: Monday, December 12, 2005 6:32 PM
To: 'Roger While'; address@hidden
Subject: [open-cobol-list] Problem with the EXTERNAL Keyword


    As far as I can tell, the keyword EXTERNAL is still having problems. The
problem I see occurs when a variable that is used as file status is declared
EXTERNAL. When this happens, the definition of the cob_file generated
contains a variable which is a static pointer. This results in C code that
does not compile.

     Here is how I propose to fix the problem:

1)      When generated the definition of COB_FILE with a FILE STATUS field
that is declared EXTERNAL, generate a NULL for the address of the status
2)      After the call to cob_external_addr is made for that field, generate
an assignment statement to set the appropriate field in the file structure.

Do you agree that this bug? Do you agree with my approach on how to fix the

Bob Sherry

This email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
open-cobol-list mailing list

reply via email to

[Prev in Thread] Current Thread [Next in Thread]