How to Resolve Cobol error – cob: command not found
While compiling Cobol programs in any PeopleSoft application, you may face an error similar to one shown below. If you are compiling a single Cobol program, you will see that Cobol program name show up in the error message but most likely you will be compiling for PS_HOME, PS_APP_HOME or PS_CUST_HOME, so this error will show up for all the Cobol programs belonging to that HOME.
You will see something similar to below:
/opt/oracle/psft/pt/ps_home8.59.08/setup/pscbl_mf.mak : All COBOL files were converted for Unicode successfully
/opt/oracle/psft/pt/ps_home8.59.08/setup/pscbl_mf.mak : Compiling EGPCSRVC.cbl ...
/opt/oracle/psft/pt/ps_home8.59.08/setup/pscbl_mf.mak: line 249: cob: command not found
cp: cannot stat 'EGPCSRVC.gnt': No such file or directory
cp: cannot stat 'EGPCSRVC.int': No such file or directory
cp: cannot stat 'EGPCSRVC.lst': No such file or directory
/opt/oracle/psft/pt/ps_home8.59.08/setup/pscbl_mf.mak : Compiling PSPTCSRC.cbl ...
/opt/oracle/psft/pt/ps_home8.59.08/setup/pscbl_mf.mak: line 249: cob: command not found
cp: cannot stat 'PSPTCSRC.gnt': No such file or directory
cp: cannot stat 'PSPTCSRC.int': No such file or directory
cp: cannot stat 'PSPTCSRC.lst': No such file or directory
/opt/oracle/psft/pt/ps_home8.59.08/setup/pscbl_mf.mak : Compiling PSPTCTBL.cbl ...
/opt/oracle/psft/pt/ps_home8.59.08/setup/pscbl_mf.mak: line 249: cob: command not found
cp: cannot stat 'PSPTCTBL.gnt': No such file or directory
cp: cannot stat 'PSPTCTBL.int': No such file or directory
cp: cannot stat 'PSPTCTBL.lst': No such file or directory
How to Resolve Cobol error – cob: command not found
The keyword here is mentioned in bold text:
/opt/oracle/psft/pt/ps_home8.59.08/setup/pscbl_mf.mak: line 249: cob: command not found
You can make out from the above statement that the error is "cob: command not found" and it was received when running the pscbl.mak program. The obvious root cause of the issue is that the Cobol compiler executible "cob" was not found when running pscbl.mak. There could be a few reasons for why cob was not found:
1. Cobol compiler was not installed. If it is a new server or a new PUM install, it is likely that Cobol compiler was never installed and hence, you are getting this error. Please follow the installation steps to install Cobol compiler.