Tuesday, December 18, 2012

Compiling COBOL on Windows

1. Open up command prompt
2. Set up following environment variables for the session
    • set PS_HOME=d:\psoft\HRSBX
    • set COBROOT="C:\Program Files (x86)\Micro Focus\Net Express 5.1\Base" 
3. Make sure to use quotes for COBROOT
4. Make a temporary directory somewhere
   mkdir d:\temp
4. Go to setup directory under PS_HOME
    cd %PS_HOME%\setup
6. cblbld D: \temp   (there is a space between D: and \temp)
7. It will compile cobol and move the binaries to cblbina directory

If you are getting compilation error for just about every cobol, make sure that the license has not expired. Unfortunately, the compiler does not indicate that the license has expired. You can verify that in Micro Focus License Management System