Sunday, February 07, 2010

COBOL on Peoplesoft OVM

Ever need to test some Peoplesoft cobol ? Peoplesoft OVM is coming around for few months, and never tried it on my side.
There was a question on how compile/link Cobol on Peoplesoft OVM App/Batch server two days ago on Peoplesoft OVM forum.
Well, of course, Microfocus is not installed on Peoplesoft OVM App.Batch server, you should do it on your own.
Then compile by running $PS_HOME/setup/pscbl.mak.
And finally link the Cobol by running $PS_HOME/setup/psrun.mak.
Shouldn't it be easy ?
Whether the compilation ran fine, there was an error on the link, and that was the question of that thread : Compiling COBOLs in PSOVM - psrun.mak error - “cob64: can not execute Id”. To keep reference, I'll resume here the issue.
Especially the command line :
[psadm1@psovmab setup]$ ./psrun.mak
./psrun.mak - linking PSRUN for oel-5-x86_64, Version 2.6.18-92.0.0.0.1.el5xen ...
./psrun.mak - Error(s) encountered creating PSRUN!
./psrun.mak - See /opt/oracle/psft/appbatch/tools/setup/psrun.err for messages
[psadm1@psovmab setup]$ more /opt/oracle/psft/appbatch/tools/setup/psrun.err
cob64: can not execute ld
[psadm1@psovmab setup]$

To make it work, as I explained in the thread linked above, I had to install a lot of RPM, some required for ld, but many of them because of the dependencies :
**************************************************************************************
From OEL5.2 Disk 1
==================
-rw-r--r-- 1 root root 899210 Feb 7 10:10 kernel-headers-2.6.18-92.el5.x86_64.rpm
-rw-r--r-- 1 root root 3073639 Feb 7 10:25 binutils-2.17.50.0.6-6.el5.x86_64.rpm
-rw-r--r-- 1 root root 3114462 Feb 7 10:29 cpp-4.1.2-42.el5.x86_64.rpm

[root@psovmab rpm]# rpm -Uvh kernel-headers-2.6.18-92.el5.x86_64.rpm
Preparing... ########################################### [100%]
1:kernel-headers ########################################### [100%]
[root@psovmab rpm]# rpm -Uvh binutils-2.17.50.0.6-6.el5.x86_64.rpm
Preparing... ########################################### [100%]
1:binutils ########################################### [100%]
[root@psovmab rpm]# rpm -Uvh cpp-4.1.2-42.el5.x86_64.rpm
Preparing... ########################################### [100%]
1:cpp ########################################### [100%]
[root@psovmab rpm]#

**************************************************************************************
From OEL5.2 Disk 2
==================
-rw-r--r-- 1 root root 614718 Feb 7 10:05 glibc-headers-2.5-24.x86_64.rpm
-rw-r--r-- 1 root root 2535024 Feb 7 10:05 glibc-devel-2.5-24.x86_64.rpm
-rw-r--r-- 1 root root 2105297 Feb 7 10:05 glibc-devel-2.5-24.i386.rpm
-rw-r--r-- 1 root root 5544086 Feb 7 10:20 gcc-4.1.2-42.el5.x86_64.rpm
-rw-r--r-- 1 root root 3987493 Feb 7 10:20 gcc-c++-4.1.2-42.el5.x86_64.rpm
-rw-r--r-- 1 root root 83518 Feb 7 10:31 libgomp-4.1.2-42.el5.i386.rpm
-rw-r--r-- 1 root root 84654 Feb 7 10:41 libgomp-4.1.2-42.el5.x86_64.rpm
-rw-r--r-- 1 root root 2980440 Feb 7 10:43 libstdc++-devel-4.1.2-42.el5.x86_64.rpm
-rw-r--r-- 1 root root 20483 Feb 7 11:46 elfutils-libelf-devel-0.125-3.el5.x86_64.rpm
-rw-r--r-- 1 root root 58852 Feb 7 11:46 elfutils-libelf-devel-static-0.125-3.el5.x86_64.rpm
-rw-r--r-- 1 root root 102193 Feb 7 11:49 elfutils-libs-0.125-3.el5.x86_64.rpm

[root@psovmab rpm]# rpm -Uvh glibc-headers-2.5-24.x86_64.rpm
Preparing... ########################################### [100%]
1:glibc-headers ########################################### [100%]
[root@psovmab rpm]#
[root@psovmab rpm]# rpm -Uvh glibc-devel-2.5-24.x86_64.rpm
Preparing... ########################################### [100%]
1:glibc-devel ########################################### [100%]
[root@psovmab rpm]#
[root@psovmab rpm]# rpm -Uvh glibc-devel-2.5-24.i386.rpm
Preparing... ########################################### [100%]
1:glibc-devel ########################################### [100%]
[root@psovmab rpm]# rpm -Uvh libgomp-4.1.2-42.el5.i386.rpm
Preparing... ########################################### [100%]
1:libgomp ########################################### [100%]
[root@psovmab rpm]# rpm -Uvh libgomp-4.1.2-42.el5.x86_64.rpm
Preparing... ########################################### [100%]
1:libgomp ########################################### [100%]
[root@psovmab rpm]# rpm -Uvh gcc-4.1.2-42.el5.x86_64.rpm
Preparing... ########################################### [100%]
1:gcc ########################################### [100%]
[root@psovmab rpm]# rpm -Uvh libstdc++-devel-4.1.2-42.el5.x86_64.rpm
Preparing... ########################################### [100%]
1:libstdc++-devel ########################################### [100%]
[root@psovmab rpm]#
[root@psovmab rpm]# rpm -Uvh gcc-c++-4.1.2-42.el5.x86_64.rpm
Preparing... ########################################### [100%]
1:gcc-c++ ########################################### [100%]
[root@psovmab rpm]# rpm -Uvh elfutils-libs-0.125-3.el5.x86_64.rpm
Preparing... ########################################### [100%]
1:elfutils-libs ########################################### [100%]
[root@psovmab rpm]# rpm -Uvh elfutils-libelf-devel-0.125-3.el5.x86_64.rpm elfutils-libelf-devel-static-0.125-3.el5.x86_64.rpm
Preparing... ########################################### [100%]
1:elfutils-libelf-devel-s########################################### [ 50%]
2:elfutils-libelf-devel ########################################### [100%]
[root@psovmab rpm]#


**************************************************************************************
From OEL5.2 Disk 3
==================
-rw-r--r-- 1 root root 4588773 Feb 7 10:22 compat-gcc-34-3.4.6-4.x86_64.rpm
-rw-r--r-- 1 root root 13542100 Feb 7 10:23 compat-gcc-34-c++-3.4.6-4.x86_64.rpm
-rw-r--r-- 1 root root 232846 Feb 7 12:21 compat-libstdc++-33-3.2.3-61.x86_64.rpm


[root@psovmab rpm]# rpm -Uvh compat-gcc-34-3.4.6-4.x86_64.rpm
Preparing... ########################################### [100%]
1:compat-gcc-34 ########################################### [100%]
[root@psovmab rpm]# rpm -Uvh compat-gcc-34-c++-3.4.6-4.x86_64.rpm
Preparing... ########################################### [100%]
1:compat-gcc-34-c++ ########################################### [100%]
[root@psovmab rpm]#

Surprinsingly, all these packages are installed on Peoplesoft OVM database server (I bet because of the Oracle database is running there), but not on Peoplesoft OVM App/Batch server.
Anyway, that was not enough to solve the issue, a new one came around :
[psadm1@psovmab setup]$ ./psrun.mak
./psrun.mak - linking PSRUN for oel-5-x86_64, Version 2.6.18-92.0.0.0.1.el5xen ...
./psrun.mak - Error(s) encountered creating PSRUN!
./psrun.mak - See /opt/oracle/psft/appbatch/tools/setup/psrun.err for messages
[psadm1@psovmab setup]$ more /opt/oracle/psft/appbatch/tools/setup/psrun.err
ld: cannot find -lgcc
[psadm1@psovmab setup]$

And to avoid this one, we should have a look into the two following files in $COBDIR/etc directory :
[psadm1@psovmab etc]$ more cobopt
-C nolist
set GCC_LIB=/usr/lib/gcc/x86_64-redhat-linux/3.4.6
[psadm1@psovmab etc]$ more cobopt64
-C nolist
set GCC_LIB=/usr/lib/gcc/x86_64-redhat-linux/3.4.3

Somehow they have wrong value of GCC_LIB, they should be like this :
[psadm1@psovmab etc]$ more cobopt
-C nolist
set GCC_LIB=/usr/lib/gcc/x86_64-redhat-linux/3.4.6/32
[psadm1@psovmab etc]$ vi cobopt64
[psadm1@psovmab etc]$ more cobopt64
-C nolist
set GCC_LIB=/usr/lib/gcc/x86_64-redhat-linux/3.4.6

And now we are able to link the Cobol :
[psadm1@psovmab etc]$ cd $PS_HOME/setup
[psadm1@psovmab setup]$ ./psrun.mak
./psrun.mak - linking PSRUN for oel-5-x86_64, Version 2.6.18-92.0.0.0.1.el5xen ...
./psrun.mak - Successfully created PSRUN in directory: /opt/oracle/psft/appbatch/tools/bin
./psrun.mak - linking PSRUNRMT for oel-5-x86_64, Version 2.6.18-92.0.0.0.1.el5xen ...
./psrun.mak - Successfully created PSRUNRMT in directory: /opt/oracle/psft/appbatch/tools/bin
[psadm1@psovmab setup]$


Nicolas.

1 comment:

Gasparotto Nicolas said...

Note, I'm talking about OEL5.2 x86_64 downloaded from http://edelivery.oracle.com/linux

Nicolas.