Unable to compile

From: Ben Hall (Ben_at_NOSAPMSkyBlueConnections.co.uk)
Date: 09/19/04


Date: Sun, 19 Sep 2004 11:56:28 +0000 (UTC)

Hello,
I'm new to cobol, just want to see what the lang is like, compile a few
programs, learn syntax etc.

I have got two programs, the first is Calculator.cob with code below.
        $ SET SOURCEFORMAT"FREE"
IDENTIFICATION DIVISION.
PROGRAM-ID. Selection-Program.

DATA DIVISION.
WORKING-STORAGE SECTION.
01 Num1 PIC 9 VALUE ZEROS.
01 Num2 PIC 9 VALUE ZEROS.
01 Result PIC 99 VALUE ZEROS.
01 Operator PIC X VALUE SPACE.

PROCEDURE DIVISION.
Calculator.
        ACCEPT Num1.
        ACCEPT Num2.
        ACCEPT Operator
        IF Operator = "+" THEN
                ADD Num1, Num2 GIVING Result
        END-IF
        IF Operator = "*" THEN
                MULTIPLY Num1 BY Num2 GIVING RESULT
        END-IF
        DISPLAY "Result is = ", Result
        STOP RUN.

The second is SmallestProgram.cob:

IDENTIFICATION DIVISION.
PROGRAM-ID. SmallestProgram.

PROCEDURE DIVISION.
DisplayPrompt.
     DISPLAY "I did it".
     STOP RUN.

I am trying to compile them with the COBOL650 and Fujitsu COBOL 3.0
however the Fugitsu displays a really wrong error and the 650 doesnt do
anything.

Could you please provide me with some help on this matter ASAP as I
would really like to be able to compile these programs.

Thankyou

Ben
Ben@NOSAPMSkyBlueConnections.co.uk - Remove NOSAPM to reply :)



Relevant Pages

  • Re: Unresolved external symbal error in fujitsu cobol.
    ... > IDENTIFICATION DIVISION. ... > DATA DIVISION. ... > PROCEDURE DIVISION USING BUF. ... You need to compile SM1 without a MAIN and then add SM1.LIB ...
    (comp.lang.cobol)
  • Re: COBOLs Influence on C
    ... Cobol, along with most compiled languages, is the same. ... learn of missing external names either at link or execution time. ... name at compile time and attempt to link the OBJ at link-edit time. ... Create an EXE that uses some of the subroutines in the DLL. ...
    (comp.lang.cobol)
  • Re: My COBDATA problem
    ... Might there be a cobdata executable somewhere that runs on a Windows ... So far people have used it from Fujitsu COBOL, ... If you can't get the code to compile on your platform why not simply rebuild ... with OCCURS and REDEFINES that I decided to try cobdata. ...
    (comp.lang.cobol)
  • Re: Cobol: Maximum number of FD Statements
    ... Subject: Cobol: Maximum number of FD Statements ... Sounds more like a compiler problem than a compile problem. ... Search the archives at http://bama.ua.edu/archives/ibm-main.html ... send email to listserv@xxxxxxxxxxx with the message: GET IBM-MAIN INFO ...
    (bit.listserv.ibm-main)
  • Re: Cobol: Maximum number of FD Statements
    ... Subject: Cobol: Maximum number of FD Statements ... Programmer Analyst | Programmeur-analyste ... Human Resources and Skills Development Canada | Ressources humaines et ... Sounds more like a compiler problem than a compile problem. ...
    (bit.listserv.ibm-main)