I need a program I wrote in a .cobc file to be compiled to a windows executable file.The file is called main.cobc
Compiling it with: cobc -x -free *.cobc -o main
makes it a linux executable which is ok, but can't be run directly on windows.
I have gnucobol (OpenCOBOL installed on my linux ubuntu VM.
Please help. Is there a way I could compile it in a way that it's windows compatible?
That's not the question that is in the title, so answering that first.
Can you do it from Ubuntu?
Yes, ... as cobc uses an underlying C compiler and you can do cross-compiling with C compilers (you'll likely use gcc-mingw-w64-i686 or gcc-mingw-w64-x86-64).
That's the "long question". Yes, and very easy.
When you do have a Windows environment and want to generate an executable for that - no need for doing this in a separate VM (or WSL) in the first place, just get the official ready-to-use MinGW packages for GnuCOBOL (available for both 32 and 64bit) and compile directly on the Windows machine.
Trying out the Personal Edition looking to find the right COBOL to do a project with, but for the life of me, I cannot get the Linux version with eclipse to license. Anyone else succeeded with this and willing to share a tip or two to a very frustrated person?
Also, the project involves a lot of CGI programs running on a single Linux box. I am open to the best and lowest cost options to do this. There are a half dozen maintenance programs that run either in a batch mode or as a green screen app. It doesn't matter if they run green screen or GUI to me, we can easily do either. It is mostly the extended ACCEPT we are looking for. (I said CGI, but these are mostly Ajax powered web programs, and actually they transmit XML with each transaction.)
Note: Having activated Visual COBOL Personal Edition, your use of it is limited to 365 days. After this period you will need to enter an authorization code in order to continue using it, either for a 30 day trial or full license of Visual COBOL.
If you have not installed a license for Visual COBOL, starting the IDE for the first time after you install the product opens the Micro Focus Visual COBOL Product Licensing dialog box. If you cancel this dialog box, you can invoke it again from Help > Micro Focus > Product Licensing.
3. Ensure that the email address used to register the product is in the Email address text entry field. If you haven't registered your email address yet, click registration page and follow the instructions on that page.
2. If there is no mail client installed on your machine, copy the email address, the subject and the exact contents from the Email details fields and paste them into an email to sent to Micro Focus using a mail client of your choice. Do not modify or add to the text.
Unfortunately, when I start Eclipse, it comes straight up without asking for license information. It does not present or see a Cobol perspective either. I tried uninstalling Visual Cobol and the imstalled liscense manager several times, as well as several versions of the JDK. Same behavior.
I did write to MF support, and a nice lady named Melissa replied as below. I think everything is setup correctly, at least the setup script does not report any errors. Cob and ccbl will both run, but report no license available. And as noted above, Eclipse isn't asking for a license.
If you wish for Visual COBOL to be installed into a preexisting version of Eclipse then there are some additional setup requirements that are covered in the same readme document that I mentioned previously.
P.S. I did try running it with the IBM Java 1.6 version that is available on the SuSE install iso, but the eclipse system would not initalize or come up. So I reinstalled SuSE and installed the Java RPM from Oracle. That seems to work fine... jdk-7u40-linux-i586.rpm . Obvioulsy, I had to install the 32bit version as specified in the documentation.
That was such a logical suggestion, and I had such high hopes. But alas, the licensing server is running. If I stop it, eclipse is aware the license server is not running and puts up a lot of errors about it. It just seems crazy...
Is there some way I can send them to you? I just tarred up the "workspace" folder it created, so you can have an exact version of it. I am also willing to send you a VM with the full install if it would help at all.
Though its popularity has waned, COBOL is still powering business critical operations within many major organizations. As the need to update, upgrade and troubleshoot these applications grows, so may the demand for anyone with COBOL development knowledge.
Fedora ships with a minimal version of Vim, but it would be nice to have some of the extra features that the full version can offer (such as COBOL syntax highlighting). Run the command below to install Vim-enhanced, which will overwrite Vim-minimal:
At this point, you are ready to write a COBOL program. For this example, I am set up with username fedorauser and I will create a folder under my home directory to store my COBOL programs. I called mine cobolcode.
There are numerous resources available on the internet to consult, however vast amounts of knowledge reside only in legacy print. Keep an eye out for vintage COBOL guides when visiting used book stores and public libraries; you may find copies of endangered manuals at a rock-bottom prices!
It is also worth noting that helpful documentation was installed on your system when you installed GnuCOBOL. You can access them with these terminal commands:
Hi donnie,
the last time I heard of COBOL was in the year before the millennium. There in Europe even seemingly dead COBOL programmers were resurrected, because the financial services industry was trembling before the turn of the millennium. What is your motive to deal with this extinct species again today. IBM, Siemens, Mainframes Computer, Government Agencies, Banks?
All of the above. Those are all examples where COBOL is still in use. I hope there will be readers interested in learning enough to keep the final critical applications online (while prioritizing a migration to replacement solutions written in a more modern technology stack!)
If you are interested in having a significant post-retirement payday, I hope you will keep an ear out for the news! I suspect it will not be long before another major organization finds itself with a major COBOL problem; giving you a unique position to set the price.
I am 46 and I was a COBOL programmer for four years. I was quite good in CICS tp monitor too. Right after my high school diploma, I took a one-week course and the week after I was in Florence working for a big italian bank. Of course, I could only get a grasp of it, but you have to start somewhere. I appreciated this article, it made me think about the old days, and I will try to catch up! Can you get paied $100 for hour? Well, good for you, genius! But do not lecture anyone here, try to be supportive!
This article (to personal opinion) would be better if presented as either virualizing the COBOL code to put it in a specimen tube before having it converted into something for a more civilized age, like C or Rust or a discussion of how to convince others to leave COBOL behind after showing how much more functional and easy it would be to simply reprogram in another language.
ole ole memories are coming up. It must be 2005 when i was involved in a Host/IMS Project and my jobs was to design and implement a piece of code, that should allow a bank-application to access a UNIX based services.
Incredibly, an old host application running in a IMS transaction should access a UNIX service. I still had some knowledge in COBOL and was an expert in server programming using UNIX socket. The question was, is a IBM Host able to call the socket api?
So i developed a COBOL application on Linux, that performed some asynchronous socket operation. Since the previous gnu-COBOL project was a neverending story i tried cob2c from Keisuke Nishida. It was a success at all, i was able to code proper COBOL code. The colleague compiled it on his host and finally we were able to access the UNIX-services on a Solaris ES.
ole ole memories are coming up. It must be 2005 when i was involved in a Host/IMS Project and my job was to design and implement a piece of code, that should allow a bank-application to access a UNIX based services.
Incredibly, an old host application running in a IMS transaction should access a UNIX service. I still had some knowledge in COBOL and was an expert in server programming using UNIX sockets and TLI. The question was, is an IBM Host able to call the socket api? (Yes it was! ?
So i started to develop a COBOL application on Linux, that used some asynchronous socket operations. Since the previous gnu-COBOL project was a never ending story i tried cob2c from Keisuke Nishida. It was a success at all, i was able to code proper COBOL code. The colleague compiled it on his host and finally we were able to access the UNIX-services on a Solaris ES.
After I graduated from college in 1983, the first job required me to write a data management program on a CDC Cyber 170 in any standardized programming language. I picked COBOL due to two needed features: (1) indexed sequential access file, and (2) arbitrary precision numbers. I finished the assignment way ahead of the deadline. Prior to that, I wrote FORTRAN, Pascal, and Basic in college. None of these languages had the two features built-in. Thanks COBOL.
c80f0f1006