Compiling COBOL locally can save you considerable time during the development/troubleshooting stage.
The steps for compiling COBOL locally are:
- Install Microfocus NetExpress
- Configure the
%COBROOT%system variable to point to the Microfocus NetExpress compiler path
- Copy the batch files for compiling COBOLs from
- Copy all COBOLs to a local directory, for example
- Compile COBOLs using the
When you install Microfocus, put it in a directory with no spaces. I like to use something like
C:\NetExpress rather than the default directory. This is just a preference, I'm not sure if it causes any issues.
You will need create a system environment variable called
COBROOT. This points to the Base directory of your Microfocus NetExpress installation. For example,
Browse to your PeopleSoft File Server and copy the following files from
%PS_HOME%\src\cbl\win32 to your
Copying them to your
WINDOWS directory lets you run them from anywhere as they are automatically in the system path.
Copy all the COBOLs from your PeopleSoft file server to a local directory (
Command prompt to the local directory and attempt to compile a program (e.g. the delivered
PTPDBTST program) by issuing the command (note that you drop the
Hopefully it compiles for you. If not, you may have forgot to set the
COBROOT environment variable. Make sure you set this first.
To build all cobols, run the following command (in Windows) from
cblbld.bat C: \temp
This will copy source COBOLs from
C:\Temp (or whatever drive and directory you specify), compile them and put them in a directory named
After the build, the build log will be displayed. You can also view the build log by opening the file
CBLBLD.LOG which will be located in the compile directory (e.g.
If you find the following throughout your log file:
... Creating error listing (COBOL1.LIS) Creating error listing (COBOL2.LIS) Creating error listing (COBOL3.LIS) ...
It may mean your Microfocus NetExpress license has expired. Check by starting Microfocus NetExpress. COBOLs will not compile on Windows systems when the license has expired.
If compiling gives the following error:
Application Program Failed Action Type : SQL CONNEC In Pgm Section : SQLRT:GG100 SQL-CONNECT With Return Code: 9989 Error Message : SQLRT: Operator ID not allowed to submit COBOL from client
This can be caused by having
%PS_HOME%\bin\client\winx86\ in your system path. Remove this location from your system path and try again.