|
-
May 16th, 2012, 12:30 PM
#1
[RESOLVED] DOS based COBOL compiler
Hi guys 
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...
If my post was helpful to you, then express your gratitude using Rate this Post. 
And if your problem is SOLVED, then please Mark the Thread as RESOLVED (see it in action - video)
My system: AMD FX 6100, Gigabyte Motherboard, 8 GB Crossair Vengance, Cooler Master 450W Thunder PSU, 1.4 TB HDD, 18.5" TFT(Wide), Antec V1 Cabinet
Social Group: VBForums - Developers from India
Skills: PHP, MySQL, jQuery, VB.Net, Photoshop, CodeIgniter, Bootstrap,...
-
May 16th, 2012, 12:34 PM
#2
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.
-
May 16th, 2012, 12:42 PM
#3
Re: DOS based COBOL compiler
 Originally Posted by kfcSmitty
Thanks 
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 ?
If my post was helpful to you, then express your gratitude using Rate this Post. 
And if your problem is SOLVED, then please Mark the Thread as RESOLVED (see it in action - video)
My system: AMD FX 6100, Gigabyte Motherboard, 8 GB Crossair Vengance, Cooler Master 450W Thunder PSU, 1.4 TB HDD, 18.5" TFT(Wide), Antec V1 Cabinet
Social Group: VBForums - Developers from India
Skills: PHP, MySQL, jQuery, VB.Net, Photoshop, CodeIgniter, Bootstrap,...
-
May 16th, 2012, 02:59 PM
#4
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
-
May 16th, 2012, 03:11 PM
#5
Re: DOS based COBOL compiler
 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...
-
May 17th, 2012, 12:09 AM
#6
Re: DOS based COBOL compiler
Thank you guys 
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 ?
If my post was helpful to you, then express your gratitude using Rate this Post. 
And if your problem is SOLVED, then please Mark the Thread as RESOLVED (see it in action - video)
My system: AMD FX 6100, Gigabyte Motherboard, 8 GB Crossair Vengance, Cooler Master 450W Thunder PSU, 1.4 TB HDD, 18.5" TFT(Wide), Antec V1 Cabinet
Social Group: VBForums - Developers from India
Skills: PHP, MySQL, jQuery, VB.Net, Photoshop, CodeIgniter, Bootstrap,...
-
May 17th, 2012, 12:21 AM
#7
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.
If my post was helpful to you, then express your gratitude using Rate this Post. 
And if your problem is SOLVED, then please Mark the Thread as RESOLVED (see it in action - video)
My system: AMD FX 6100, Gigabyte Motherboard, 8 GB Crossair Vengance, Cooler Master 450W Thunder PSU, 1.4 TB HDD, 18.5" TFT(Wide), Antec V1 Cabinet
Social Group: VBForums - Developers from India
Skills: PHP, MySQL, jQuery, VB.Net, Photoshop, CodeIgniter, Bootstrap,...
-
May 17th, 2012, 12:32 AM
#8
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.
If my post was helpful to you, then express your gratitude using Rate this Post. 
And if your problem is SOLVED, then please Mark the Thread as RESOLVED (see it in action - video)
My system: AMD FX 6100, Gigabyte Motherboard, 8 GB Crossair Vengance, Cooler Master 450W Thunder PSU, 1.4 TB HDD, 18.5" TFT(Wide), Antec V1 Cabinet
Social Group: VBForums - Developers from India
Skills: PHP, MySQL, jQuery, VB.Net, Photoshop, CodeIgniter, Bootstrap,...
-
May 17th, 2012, 08:08 AM
#9
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...
-
May 17th, 2012, 09:20 AM
#10
Re: DOS based COBOL compiler
 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..
If my post was helpful to you, then express your gratitude using Rate this Post. 
And if your problem is SOLVED, then please Mark the Thread as RESOLVED (see it in action - video)
My system: AMD FX 6100, Gigabyte Motherboard, 8 GB Crossair Vengance, Cooler Master 450W Thunder PSU, 1.4 TB HDD, 18.5" TFT(Wide), Antec V1 Cabinet
Social Group: VBForums - Developers from India
Skills: PHP, MySQL, jQuery, VB.Net, Photoshop, CodeIgniter, Bootstrap,...
-
May 17th, 2012, 09:53 AM
#11
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.
-
May 17th, 2012, 11:44 AM
#12
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.
-
May 17th, 2012, 12:10 PM
#13
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 !! 
I'm gonna kill them.
If my post was helpful to you, then express your gratitude using Rate this Post. 
And if your problem is SOLVED, then please Mark the Thread as RESOLVED (see it in action - video)
My system: AMD FX 6100, Gigabyte Motherboard, 8 GB Crossair Vengance, Cooler Master 450W Thunder PSU, 1.4 TB HDD, 18.5" TFT(Wide), Antec V1 Cabinet
Social Group: VBForums - Developers from India
Skills: PHP, MySQL, jQuery, VB.Net, Photoshop, CodeIgniter, Bootstrap,...
-
May 17th, 2012, 03:50 PM
#14
Re: DOS based COBOL compiler
What in God's name is Cobol ? What is that language used for ?
-
May 17th, 2012, 04:58 PM
#15
Re: DOS based COBOL compiler
 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.
-
May 17th, 2012, 05:11 PM
#16
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.
-
May 17th, 2012, 11:09 PM
#17
Re: DOS based COBOL compiler
 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..
If my post was helpful to you, then express your gratitude using Rate this Post. 
And if your problem is SOLVED, then please Mark the Thread as RESOLVED (see it in action - video)
My system: AMD FX 6100, Gigabyte Motherboard, 8 GB Crossair Vengance, Cooler Master 450W Thunder PSU, 1.4 TB HDD, 18.5" TFT(Wide), Antec V1 Cabinet
Social Group: VBForums - Developers from India
Skills: PHP, MySQL, jQuery, VB.Net, Photoshop, CodeIgniter, Bootstrap,...
-
May 17th, 2012, 11:31 PM
#18
Re: DOS based COBOL compiler
Such a good idea I just bought one myself through an Amazon partner for $5.25 USD shipped. 
Be sure to look for explicit confirmation that the CD is still with the book and part of the deal.
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.
-
May 17th, 2012, 11:36 PM
#19
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
If my post was helpful to you, then express your gratitude using Rate this Post. 
And if your problem is SOLVED, then please Mark the Thread as RESOLVED (see it in action - video)
My system: AMD FX 6100, Gigabyte Motherboard, 8 GB Crossair Vengance, Cooler Master 450W Thunder PSU, 1.4 TB HDD, 18.5" TFT(Wide), Antec V1 Cabinet
Social Group: VBForums - Developers from India
Skills: PHP, MySQL, jQuery, VB.Net, Photoshop, CodeIgniter, Bootstrap,...
-
May 18th, 2012, 12:02 AM
#20
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.
-
May 18th, 2012, 01:42 AM
#21
Re: DOS based COBOL compiler
 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. 
If my post was helpful to you, then express your gratitude using Rate this Post. 
And if your problem is SOLVED, then please Mark the Thread as RESOLVED (see it in action - video)
My system: AMD FX 6100, Gigabyte Motherboard, 8 GB Crossair Vengance, Cooler Master 450W Thunder PSU, 1.4 TB HDD, 18.5" TFT(Wide), Antec V1 Cabinet
Social Group: VBForums - Developers from India
Skills: PHP, MySQL, jQuery, VB.Net, Photoshop, CodeIgniter, Bootstrap,...
-
May 20th, 2012, 02:46 PM
#22
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.
-
May 20th, 2012, 11:34 PM
#23
Re: DOS based COBOL compiler
 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 
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.
If my post was helpful to you, then express your gratitude using Rate this Post. 
And if your problem is SOLVED, then please Mark the Thread as RESOLVED (see it in action - video)
My system: AMD FX 6100, Gigabyte Motherboard, 8 GB Crossair Vengance, Cooler Master 450W Thunder PSU, 1.4 TB HDD, 18.5" TFT(Wide), Antec V1 Cabinet
Social Group: VBForums - Developers from India
Skills: PHP, MySQL, jQuery, VB.Net, Photoshop, CodeIgniter, Bootstrap,...
-
Jun 12th, 2012, 11:09 PM
#24
Hyperactive Member
Re: DOS based COBOL compiler
 Originally Posted by akhileshbc
Thank you guys
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 ? 
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.
-
Jun 14th, 2012, 06:19 AM
#25
Re: DOS based COBOL compiler
If my post was helpful to you, then express your gratitude using Rate this Post. 
And if your problem is SOLVED, then please Mark the Thread as RESOLVED (see it in action - video)
My system: AMD FX 6100, Gigabyte Motherboard, 8 GB Crossair Vengance, Cooler Master 450W Thunder PSU, 1.4 TB HDD, 18.5" TFT(Wide), Antec V1 Cabinet
Social Group: VBForums - Developers from India
Skills: PHP, MySQL, jQuery, VB.Net, Photoshop, CodeIgniter, Bootstrap,...
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|