gnucobol-users
[Top][All Lists]
Advanced

[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

Roger,

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


       IDENTIFICATION DIVISION.                             
       PROGRAM-ID.    FII2PA01.                              
       ENVIRONMENT DIVISION.                                  
       CONFIGURATION SECTION.                                  
       INPUT-OUTPUT SECTION.                                    
       FILE-CONTROL.                                             
           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. 
       PROCEDURE DIVISION.
           EXIT.                      


Bob Sherry

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

Roger,

    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
field.
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
problem?

Bob Sherry



-------------------------------------------------------
This SF.net 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!
http://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click
_______________________________________________
open-cobol-list mailing list
address@hidden
https://lists.sourceforge.net/lists/listinfo/open-cobol-list




reply via email to

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