bug-gnucobol
[Top][All Lists]
Advanced

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

[open-cobol-list] Version 1.1 Bug in File-Control ?


From: Kurt Derichs
Subject: [open-cobol-list] Version 1.1 Bug in File-Control ?
Date: Tue, 19 Feb 2008 12:32:07 +0100

Hello,

I was wondering weather or not this is a compiler error that the following 
program can be compiled without error message.
SELECT INFILE ASSIGN        TO INFILE-FILE-NAME
but due to a typo the variable was never defined
03 INFILE-FILENAME                pic x(256).

I tested the program on open cobol 1.1 compiled on ubuntu 7.10 64 bit. If you 
need more infos just let me now.

Bye

Kurt

PS: I registered in the OpenCobol Forum but I can login. Perhaps someone can 
help me with this as well.

      PROGRAM-ID. hello
       AUTHOR. Kurt Derichs
       DATE-COMPILED. 20080210

       ENVIRONMENT DIVISION.
       CONFIGURATION SECTION.
       SOURCE-COMPUTER. x86.
       OBJECT-COMPUTER. x86.

       INPUT-OUTPUT SECTION.
       FILE-CONTROL.
           SELECT INFILE ASSIGN        TO INFILE-FILE-NAME
                  ORGANIZATION         IS LINE SEQUENTIAL
                  ACCESS MODE          IS SEQUENTIAL
                  FILE STATUS          IS INFILE-ERR-STATUS.

       DATA DIVISION.
       FILE SECTION.
       FD INFILE
          data record is infile-satz.
       01 INFILE-SATZ              PIC X(80). 

       WORKING-STORAGE SECTION.
       01 INFILE-DATA.
             03 INFILE-FILENAME                pic x(256).
             03 INFILE-ERR-STATUS              pic 99.

       PROCEDURE DIVISION.
       start-10.
           move "/tmp/test" to infile-filename.
           move zero          to infile-err-status.
           open input infile.
           close infile.

       start-99.
       STOP RUN.

-- 
Psssst! Schon vom neuen GMX MultiMessenger gehört?
Der kann`s mit allen: http://www.gmx.net/de/go/multimessenger


reply via email to

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