![]() |
zCOBOL
Portable Mainframe COBOL |
![]() |
|
So you want to try compiling and executing some COBOL programs on Windows using zcobol. First go to www.z390.org and download and install z390 version v1.5.00 or later. Also install J2SE java runtime version 6 update 12 which is the latest version which zcobol release 1 was regression tested on. Both installs use InstallShield for Windows. There are also file image install options available for Linux users. Be sure you uninstall any old versions of J2SE such as 1.4.2 or 5.0 as they may conflict with the later 6.0+ required version. Now you should have a z390 desktop icon which you can double click to start the z390 GUI Interface. And now you can compile, link, and execute your first zcobol program by entering the following zcobol command: zc390clg zcobol\demo\HELLO The above command uses the zcobol to HLASM compile, link, and execute command to compile the COBOL hello world program zcobol\demo\HELLO.CBL into an executable HLASM compatible assembler program zcobol\demo\HELLO.MLC which is assembled using zcobol macro libraries zcobol+zcobol\z390 and linked into z390 executable load module HELLO.390 which is then executed to generate WTO display of "Hello World" on the GUI display log and on the console log file HELLO.LOG. To run all the zcobol demo programs, you can enter the command zcrt390 which will compile and execute them. You can then view the log file for each demo program to see the output produced. For more examples, you can also run all the zcobol regression tests using the command ZCRTTEST and look at the source code and generated output. |
||
|
You can compile, link, and execute a COBOL program in any directory by specifying the path and name of the program in the ZC390CLG command. The source COBOL program must be in ASCII format and have the suffix CBL. You can use the compiler command ZC390C to compile to relocatible object form, and the compiler command ZC390CL to compile and link to 390 load module form with statically linked z390 and/or zcobol programs included. Once the programs have been successfully linked, then you can use the z390 EXEC command to execute a load module. For more about all the options available for z390 executable programs visit www.z390.org and read the z390 user guide.
|
||
|
The first release of zcobol distributed as part of z390 v1.5.00 will be presented at SHARE session 8194 Tuesday, March 3, 2009. zcobol is an open source project and is expected to continue to evolve for many years to come. There are still a number of missing functions in zcobol, and until such time as zcobol successfully passes the NIST ANSI COBOL 1985 Test Suite, zcobol should be considered to still be in a beta test state. Once zcobol gets beyond the NIST tests, zcobol will continue to add extensions and enhancements based on user requests including COBOL 2002 standard features along with other requests to support different dialect options provided by IBM, Micro Focus, Open COBOL, Veryant, and other COBOL compiler providers. The current list of pending fixes and enhancements for upcoming z390 and zcobol are here. You can use this online form to submit new fix and enhancement requests. All users of zcobol are encouraged to join the zcobol user group where users can ask questions and get answers and suggestions from developers and other users. COBOL, Java, C, and assembler developers interested in joining the zcobol open source project and helping with the development are welcome. |
||
|
Once you have successfully compiled a COBOL program into a z390 load module, you can run it with the command EXEC filename. If the program aborts or fails to produce the expected results, the next step is to debug the problem. The zcobol option TRACE can be specified to generate a WTO display of the name of each COBOL paragraph when it is entered. Sometimes that along with listing of the program is enough to figure out why the program did not work. If it is necessary to examine the generated HLASM compatible assembler code, there are several steps that can be taken:
|
||
IBM, CICS, HLASM, MVS, OS/390, VSAM, z9, z10, and z/OS
are registered trademarks
of International Business Machines Corporation
This page last updated
Tuesday June 02, 2009.
Webmaster
Copyright 2009 Automated Software Tools Corporation