Unable to compile
From: Ben Hall (Ben_at_NOSAPMSkyBlueConnections.co.uk)
Date: 09/19/04
- Next message: Frederico Fonseca: "Re: Unable to compile"
- Previous message: Robert Jones: "Re: Is a General File Maintenance Routine possible?"
- Next in thread: Frederico Fonseca: "Re: Unable to compile"
- Reply: Frederico Fonseca: "Re: Unable to compile"
- Reply: wahlers: "Re: Unable to compile"
- Reply: Robert Wagner: "Re: Unable to compile"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
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 :)
- Next message: Frederico Fonseca: "Re: Unable to compile"
- Previous message: Robert Jones: "Re: Is a General File Maintenance Routine possible?"
- Next in thread: Frederico Fonseca: "Re: Unable to compile"
- Reply: Frederico Fonseca: "Re: Unable to compile"
- Reply: wahlers: "Re: Unable to compile"
- Reply: Robert Wagner: "Re: Unable to compile"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|