-
[RESOLVED] DOS based COBOL compiler
Hi guys :wave:
Can you please tell me where to find a COBOL compiler ? It's for one of my friends. He is studying at Madurai Kamaraj University and he is having COBOL as a part of syllabus. He got the textbook for doing the labs. But he don't know how to do the compiling and where to find the compiler !!!
Please help...
:wave:
-
Re: DOS based COBOL compiler
Back in college I used MicroFocus, but it isn't for DOS, it is meant to be run under Windows.
http://www.microfocus.com/mcro/cobol/index.aspx
Looks like they have a newer version out now.
-
Re: DOS based COBOL compiler
Quote:
Originally Posted by
kfcSmitty
Thanks :wave:
But that is "visual" cobol. He is meant to use those DOS based ones, where we type the code in notepad or somewhere and compiles the program by passing the filename to the compiler. I have downloaded one COBOL which says Microsoft COBOL v2.20 (1982-87).
And I have tried compiling a program(a basic program which I found from a site). But it gives null point exception.
Do you have a simple program that just do a message displaying or addition of two numbers or something, so that I could test it ?
-
Re: DOS based COBOL compiler
Unfortunately I haven't touched COBOL for ages, so I wouldn't be able to write a program for it if my life depended on it...
This link, however, seems to have some command line compilers for COBOL85: http://www.freeprogrammingresources.com/cobol.html
-
Re: DOS based COBOL compiler
Quote:
Originally Posted by
akhileshbc
Do you have a simple program that just do a message displaying or addition of two numbers or something, so that I could test it ?
Post the code you tried - it has been a while but maybe I can help with the error you are getting...
-
Re: DOS based COBOL compiler
Thank you guys :wave:
This is the program that I have tried.
Code:
IDENTIFICATION DIVISION.
PROGRAM-ID. Multiplier.
AUTHOR. Michael Coughlan.
* Example program using ACCEPT, DISPLAY and MULTIPLY to
* get two single digit numbers from the user and multiply them together
DATA DIVISION.
WORKING-STORAGE SECTION.
01 Num1 PIC 9 VALUE ZEROS.
01 Num2 PIC 9 VALUE ZEROS.
01 Result PIC 99 VALUE ZEROS.
PROCEDURE DIVISION.
DISPLAY "Enter first number (1 digit) : " WITH NO ADVANCING.
ACCEPT Num1.
DISPLAY "Enter second number (1 digit) : " WITH NO ADVANCING.
ACCEPT Num2.
MULTIPLY Num1 BY Num2 GIVING Result.
DISPLAY "Result is = ", Result.
STOP RUN.
I have also tried another program today. But it's also giving me the same error: "Error 2001: Null pointer assignment"
Any ideas ?:wave:
-
Re: DOS based COBOL compiler
In COBOL that I have downloaded, there are only these EXE files:
Code:
COBOL.EXE
FASTCOB.EXE
ISAM.EXE
RUNCOB.EXE
TINST.EXE
TPC.EXE
For compiling, I used the following in command prompt:
Code:
c:\COBOL> cobol filename.cob;
That's when the compiler showed that error.
:wave:
-
Re: DOS based COBOL compiler
I have downloaded that COBOL650 and copied my test.cob file to that directory. Then in command prompt, typed "COBOL" and it opened that cobol.exe file in a new screen. And in it, it asked for the file to compile. I have entered the "test"(without extension) and when I presses enter key, it showed "send your 25$ donation to..." like that. So, I pressed escape key and it gets back to the command prompt and is showing a message "FCB Unavailable. Abort, Fail ?"
When I pressed "A", it quitted. In the next run, when I pressed "F", it showed "Not ready reading drive A" and then quitted.
:cry:
-
Re: DOS based COBOL compiler
Your code looks good to me...
Doing a google search for
error 2001 null pointer assignment cobol
Came up with lots and lots of links...
-
Re: DOS based COBOL compiler
Quote:
Originally Posted by
szlamany
Your code looks good to me...
Doing a google search for
error 2001 null pointer assignment cobol
Came up with lots and lots of links...
I did that. But most of them were mere questions with no correct solutions !
Also, some says it was because of the old version of the compiler, running on the newer PCs !
I am all lost. Let me see if I could find some lecturers of that university who knows COBOL.. :cry:
-
Re: DOS based COBOL compiler
You don't appear to be having a SYNTAX issue - it certainly looks like it's not working on whatever version of the O/S you are trying it on.
-
Re: DOS based COBOL compiler
Sounds like it wants floppy drives (A:) or something. I doubt it was ever a very good Cobol system anyway.
Cobol compilers for Windows are fairly rare and usually quite pricey. There has been a lot of consolidation/collusion in the market to keep prices high as well. For a number of years now I've felt that this is an untapped market for somebody with the skills to write a new one and sell it fairly cheaply. There are a lot of people who'd love to have a working compiler to use in formal classes or for self-study.
-
Re: DOS based COBOL compiler
I am using Windows XP SP3.
I have told my friend to ask any lab assistants in his university, about this. And he said, they all are dumb and don't know much ! :(
There's theory as well as lab in COBOL for him. And he is screwed up because of this damn thing.
I don't think COBOL should still be in the curriculum ! Why these people didn't changed it!!
Why don't they include new languages instead of these legacy ones !! :mad:
I'm gonna kill them. :p
-
Re: DOS based COBOL compiler
What in God's name is Cobol ? What is that language used for ?
-
Re: DOS based COBOL compiler
Quote:
Originally Posted by
Niya
What in God's name is Cobol ? What is that language used for ?
Getting a job?
It is still very broadly used and there are tons of legacy applications that need support.
-
Re: DOS based COBOL compiler
BTW: One source for "cheap" student compilers can be textbooks that have a bundled CD containing a Cobol development package. These are usually the lowest ("standard") edition or even a stripped down "student" edition but may be good enough.
With careful shopping you might find a used copy with the CD intact for under $10 shipped.
-
Re: DOS based COBOL compiler
Quote:
Originally Posted by
dilettante
BTW: One source for "cheap" student compilers can be textbooks that have a bundled CD containing a Cobol development package. These are usually the lowest ("standard") edition or even a stripped down "student" edition but may be good enough.
With careful shopping you might find a used copy with the CD intact for under $10 shipped.
hmm.. Thanks.. I will check that..
:wave:
-
Re: DOS based COBOL compiler
Such a good idea I just bought one myself through an Amazon partner for $5.25 USD shipped. :p
Be sure to look for explicit confirmation that the CD is still with the book and part of the deal.
Quote:
COBOL: From Micro to Mainframe: Fujitsu Version (3rd Edition) [Paperback]
The Fujitsu Version of COBOL: From Micro to Mainframe, Third Edition parallels our earlier work, but has been updated to support Fujitsu COBOL Version 4.0. All listings in the text have been modified for the new compiler, especially those listings pertaining to screen 1/O. We have added an extensive appendix with supporting documentation and hands-on exercises that describe how to use the new software to full advantage. The set of student programming projects has also been thoroughly revised. As in the previous edition, the Fujitsu software is provided with the text at no additional cost.
Based on the reviews this is a Windows based version, not DOS, and pre-.Net. A double plus to me, not being a "damaged code" fan. We'll see what actually shows up in the mail, but the seller claimed they still had the CD as part of the package.
-
Re: DOS based COBOL compiler
You already brought one ? :)
Let me see if I could find one in the shops here. I am going for a purchase tomorrow(for a new desktop)
So, after that I could do some searching for that book.
Thanks :wave:
-
Re: DOS based COBOL compiler
It helps if you have a used bookseller specializing in technical and textbooks. We used to have a few here who set up booths at ~ monthly "computers and parts" sale shows but most sell through eBay, etc. now.
-
Re: DOS based COBOL compiler
Quote:
Originally Posted by
dilettante
It helps if you have a used bookseller specializing in technical and textbooks. We used to have a few here who set up booths at ~ monthly "computers and parts" sale shows but most sell through eBay, etc. now.
Here there are some of those road-side sellers. They have a large collection os used books. But don't know whether their collection contains something useful. Have to find out. :)
:wave:
-
Re: DOS based COBOL compiler
I don't know how useful this one is even for introductory self-study, or whether it even runs! But the link is still good today (er, the download... downloads).
COBOL12
You'll need a 16- or 32-bit machine or VM to use it.
-
Re: DOS based COBOL compiler
Quote:
Originally Posted by
dilettante
I don't know how useful this one is even for introductory self-study, or whether it even runs! But the link is still good today (er, the download... downloads).
COBOL12
You'll need a 16- or 32-bit machine or VM to use it.
Thanks :wave:
I have tried it. I am running Windows XP SP3 32bit OS. So when I opened ECOB.BAT file, it showed a message in command prompt alerting that it is a 16bit app. So, I pressed the "Ignore" button and continued.
It opens a GUI. And I can open any previously written ".cob" files.
Pressing "Alt+F" gives options to "Open, Save, New, Compile, Run" etc... I'll have a look at it by using some sample programs.
:wave:
-
Re: DOS based COBOL compiler
Quote:
Originally Posted by
akhileshbc
Thank you guys :wave:
This is the program that I have tried.
Code:
IDENTIFICATION DIVISION.
PROGRAM-ID. Multiplier.
AUTHOR. Michael Coughlan.
* Example program using ACCEPT, DISPLAY and MULTIPLY to
* get two single digit numbers from the user and multiply them together
DATA DIVISION.
WORKING-STORAGE SECTION.
01 Num1 PIC 9 VALUE ZEROS.
01 Num2 PIC 9 VALUE ZEROS.
01 Result PIC 99 VALUE ZEROS.
PROCEDURE DIVISION.
DISPLAY "Enter first number (1 digit) : " WITH NO ADVANCING.
ACCEPT Num1.
DISPLAY "Enter second number (1 digit) : " WITH NO ADVANCING.
ACCEPT Num2.
MULTIPLY Num1 BY Num2 GIVING Result.
DISPLAY "Result is = ", Result.
STOP RUN.
I have also tried another program today. But it's also giving me the same error: "
Error 2001: Null pointer assignment"
Any ideas ?:wave:
At a glance you are missing the ENVIRONMENT DIVISION, bit rusty on COBOL but vaguely remember always spelling that one wrong - which generates about a million errors.
-
Re: DOS based COBOL compiler
Quote:
Originally Posted by
KiwiDexter
At a glance you are missing the ENVIRONMENT DIVISION, bit rusty on COBOL but vaguely remember always spelling that one wrong - which generates about a million errors.
Thanks man. :wave:
I have given him that COBOL12 and he said he would try to figure it out by himself with the help of his tutors if possible. He didn't tried buying the textbook.
As I don't have a use, I didn't bought the book too.
After some days he said that he figured it out. :thumb:
@all: Thank you all :wave: