Ensuring that the PAM package is installed
You are required to have the PAM package installed to access Db2® with COBOL for Linux® on x86. To check
whether it was installed during your Db2 installation, run
this command:
sudo yum list 'pam'
, where the sudo
command or
becoming the root user ensures that you have the privilege to run this command.If the PAM library is not installed when you run the compiler with the
-qsql
option to translate your EXEC SQL statements, you will get the following
IGYDS0220 message that the compiler cannot load the Db2
co-processor:The "SQL" compiler option was in effect, but the compiler was unable to load the IBM Db2 SQL co-processor services module. All "EXEC SQL" statements were discarded.
While
missing the PAM package is one of the reasons you get the IGYDS0220 message, other reasons could be
as follows:- The LD_LIBRARY_PATH environment variable has not been exported or it does not contain the path where the co-processor library is installed.
- The co-processor library is corrupted.
- You do not have sufficient file system permissions to use the co-processor library.
- One or more libraries that the co-processor requires are not present, such as the PAM package.
If the PAM package is installed as checked with the
yum list
command mentioned previously, and you still get the error, you can check for other missing libraries with the following command:- For 64-bit
applications:
ldd /opt/ibm/db2/<Db2_version>/lib64/libdb2.so
- For 32-bit
applications:
ldd /opt/ibm/db2/<Db2_version>/lib32/libdb2.so
- For 64-bit
applications:
To install the PAM package:
- On RHEL or SUSE, use the following command:
- For 64-bit applications:
sudo dnf install pam
- For 32-bit applications:
sudo dnf install parm.i686
dnf
is the default package installer on RHEL and SUSE. - For 64-bit applications:
- On Ubuntu, use the following command:
- For 64-bit applications:
sudo apt-get install libpam0g
- For 32-bit applications:
sudo apt-get install libpam0g:i386
apt-get
is the default package installer on Ubuntu. - For 64-bit applications: