gnucobol-users
[Top][All Lists]
Advanced

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

Re: [open-cobol-list] Cobol Compilation Error


From: John R. Culleton
Subject: Re: [open-cobol-list] Cobol Compilation Error
Date: Sun May 28 06:58:16 2006
User-agent: KMail/1.9.1

On Saturday 27 May 2006 05:23, Goutam Saraswati wrote:
> Sir,
>
> I have OpenCOBOL 3.2 on Fedora Core 5.
>
> I am getting the error *msw.cbl:5: syntax error, unexpected SELECT,
> expecting $end*
>
> I am copying the first few lines of the *msw.cbl* program:
>
> *identification division.
> program-id. wll-ir-check.
> environment division.
> input-output section.
>         select f1 assign to f1-id
>         organization is relative.
>         select f2 assign to f2-id
>         organization is relative.
>         select f3 assign to f3-id
>         organization is relative.
> data division.
> file section.
> fd f1.*
>
> The same program is running fine with MFCobol on SCO OSE 5.0.5
>
> Goutam Saraswati

Where is the file-control header? 

       ENVIRONMENT DIVISION.
       INPUT-OUTPUT SECTION.
       FILE CONTROL.
          SELECT F1 (etc.)  

I find it handy to start always with a template and then expand
it. Here is my template:


000010 IDENTIFICATION DIVISION.
000020 PROGRAM-ID. TEMPLATE.
000030 AUTHOR. JOHN CULLETON.
000040 INSTALLATION. WEXFORDPRESS
000045            Eldersburg MD.
000050*REMARKS.
000060*    THIS IS A TEMPLATE FOR OPEN COBOL AND HTCOBL.  
000070 ENVIRONMENT DIVISION.
000080 
000090 CONFIGURATION SECTION.
000100 SOURCE-COMPUTER.  
000110      Linux.
000120 OBJECT-COMPUTER. 
000230      Linux.
000140 
000150 INPUT-OUTPUT SECTION.
000160 FILE-CONTROL.
000170     SELECT PRINTFILE ASSIGN TO PRINTER.
000180 DATA DIVISION.
000190
000200 FILE SECTION.
000210
000220 WORKING-STORAGE SECTION.
000230
000240 PROCEDURE DIVISION.
000250 001-MAIN-PROCEDURE.
000260     DISPLAY "TEMPLATE".
000270          STOP RUN.
-- 

John Culleton




reply via email to

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