Results 1 to 25 of 25

Thread: [RESOLVED] DOS based COBOL compiler

  1. #1

    Thread Starter
    Freelancer akhileshbc's Avatar
    Join Date
    Jun 2008
    Location
    Trivandrum, Kerala, India
    Posts
    7,652

    Resolved [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,...

  2. #2
    PowerPoster kfcSmitty's Avatar
    Join Date
    May 2005
    Posts
    2,248

    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.

  3. #3

    Thread Starter
    Freelancer akhileshbc's Avatar
    Join Date
    Jun 2008
    Location
    Trivandrum, Kerala, India
    Posts
    7,652

    Re: DOS based COBOL compiler

    Quote Originally Posted by kfcSmitty View Post
    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.
    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,...

  4. #4
    PowerPoster kfcSmitty's Avatar
    Join Date
    May 2005
    Posts
    2,248

    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

  5. #5
    MS SQL Powerposter szlamany's Avatar
    Join Date
    Mar 2004
    Location
    Connecticut
    Posts
    18,263

    Re: DOS based COBOL compiler

    Quote Originally Posted by akhileshbc View Post
    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...

    *** Read the sticky in the DB forum about how to get your question answered quickly!! ***

    Please remember to rate posts! Rate any post you find helpful - even in old threads! Use the link to the left - "Rate this Post".

    Some Informative Links:
    [ SQL Rules to Live By ] [ Reserved SQL keywords ] [ When to use INDEX HINTS! ] [ Passing Multi-item Parameters to STORED PROCEDURES ]
    [ Solution to non-domain Windows Authentication ] [ Crazy things we do to shrink log files ] [ SQL 2005 Features ] [ Loading Pictures from DB ]

    MS MVP 2006, 2007, 2008

  6. #6

    Thread Starter
    Freelancer akhileshbc's Avatar
    Join Date
    Jun 2008
    Location
    Trivandrum, Kerala, India
    Posts
    7,652

    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,...

  7. #7

    Thread Starter
    Freelancer akhileshbc's Avatar
    Join Date
    Jun 2008
    Location
    Trivandrum, Kerala, India
    Posts
    7,652

    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,...

  8. #8

    Thread Starter
    Freelancer akhileshbc's Avatar
    Join Date
    Jun 2008
    Location
    Trivandrum, Kerala, India
    Posts
    7,652

    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,...

  9. #9
    MS SQL Powerposter szlamany's Avatar
    Join Date
    Mar 2004
    Location
    Connecticut
    Posts
    18,263

    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...

    *** Read the sticky in the DB forum about how to get your question answered quickly!! ***

    Please remember to rate posts! Rate any post you find helpful - even in old threads! Use the link to the left - "Rate this Post".

    Some Informative Links:
    [ SQL Rules to Live By ] [ Reserved SQL keywords ] [ When to use INDEX HINTS! ] [ Passing Multi-item Parameters to STORED PROCEDURES ]
    [ Solution to non-domain Windows Authentication ] [ Crazy things we do to shrink log files ] [ SQL 2005 Features ] [ Loading Pictures from DB ]

    MS MVP 2006, 2007, 2008

  10. #10

    Thread Starter
    Freelancer akhileshbc's Avatar
    Join Date
    Jun 2008
    Location
    Trivandrum, Kerala, India
    Posts
    7,652

    Re: DOS based COBOL compiler

    Quote Originally Posted by szlamany View Post
    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,...

  11. #11
    MS SQL Powerposter szlamany's Avatar
    Join Date
    Mar 2004
    Location
    Connecticut
    Posts
    18,263

    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.

    *** Read the sticky in the DB forum about how to get your question answered quickly!! ***

    Please remember to rate posts! Rate any post you find helpful - even in old threads! Use the link to the left - "Rate this Post".

    Some Informative Links:
    [ SQL Rules to Live By ] [ Reserved SQL keywords ] [ When to use INDEX HINTS! ] [ Passing Multi-item Parameters to STORED PROCEDURES ]
    [ Solution to non-domain Windows Authentication ] [ Crazy things we do to shrink log files ] [ SQL 2005 Features ] [ Loading Pictures from DB ]

    MS MVP 2006, 2007, 2008

  12. #12
    PowerPoster dilettante's Avatar
    Join Date
    Feb 2006
    Posts
    24,487

    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.

  13. #13

    Thread Starter
    Freelancer akhileshbc's Avatar
    Join Date
    Jun 2008
    Location
    Trivandrum, Kerala, India
    Posts
    7,652

    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,...

  14. #14
    Angel of Code Niya's Avatar
    Join Date
    Nov 2011
    Posts
    9,017

    Re: DOS based COBOL compiler

    What in God's name is Cobol ? What is that language used for ?
    Treeview with NodeAdded/NodesRemoved events | BlinkLabel control | Calculate Permutations | Object Enums | ComboBox with centered items | .Net Internals article(not mine) | Wizard Control | Understanding Multi-Threading | Simple file compression | Demon Arena

    Copy/move files using Windows Shell | I'm not wanted

    C++ programmers will dismiss you as a cretinous simpleton for your inability to keep track of pointers chained 6 levels deep and Java programmers will pillory you for buying into the evils of Microsoft. Meanwhile C# programmers will get paid just a little bit more than you for writing exactly the same code and VB6 programmers will continue to whitter on about "footprints". - FunkyDexter

    There's just no reason to use garbage like InputBox. - jmcilhinney

    The threads I start are Niya and Olaf free zones. No arguing about the benefits of VB6 over .NET here please. Happiness must reign. - yereverluvinuncleber

  15. #15
    PowerPoster dilettante's Avatar
    Join Date
    Feb 2006
    Posts
    24,487

    Re: DOS based COBOL compiler

    Quote Originally Posted by Niya View Post
    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.

  16. #16
    PowerPoster dilettante's Avatar
    Join Date
    Feb 2006
    Posts
    24,487

    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.

  17. #17

    Thread Starter
    Freelancer akhileshbc's Avatar
    Join Date
    Jun 2008
    Location
    Trivandrum, Kerala, India
    Posts
    7,652

    Re: DOS based COBOL compiler

    Quote Originally Posted by dilettante View Post
    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,...

  18. #18
    PowerPoster dilettante's Avatar
    Join Date
    Feb 2006
    Posts
    24,487

    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.

  19. #19

    Thread Starter
    Freelancer akhileshbc's Avatar
    Join Date
    Jun 2008
    Location
    Trivandrum, Kerala, India
    Posts
    7,652

    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,...

  20. #20
    PowerPoster dilettante's Avatar
    Join Date
    Feb 2006
    Posts
    24,487

    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.

  21. #21

    Thread Starter
    Freelancer akhileshbc's Avatar
    Join Date
    Jun 2008
    Location
    Trivandrum, Kerala, India
    Posts
    7,652

    Re: DOS based COBOL compiler

    Quote Originally Posted by dilettante View Post
    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,...

  22. #22
    PowerPoster dilettante's Avatar
    Join Date
    Feb 2006
    Posts
    24,487

    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.

  23. #23

    Thread Starter
    Freelancer akhileshbc's Avatar
    Join Date
    Jun 2008
    Location
    Trivandrum, Kerala, India
    Posts
    7,652

    Re: DOS based COBOL compiler

    Quote Originally Posted by dilettante View Post
    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,...

  24. #24
    Hyperactive Member
    Join Date
    Oct 2007
    Location
    Godzone, oops Oz
    Posts
    355

    Re: DOS based COBOL compiler

    Quote Originally Posted by akhileshbc View Post
    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.

  25. #25

    Thread Starter
    Freelancer akhileshbc's Avatar
    Join Date
    Jun 2008
    Location
    Trivandrum, Kerala, India
    Posts
    7,652

    Re: DOS based COBOL compiler

    Quote Originally Posted by KiwiDexter View Post
    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.

    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.


    @all: Thank you all

    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
  •  



Click Here to Expand Forum to Full Width