HOWTO : DB21018E with AIX 4.1

Have a customer getting DB21018E?  If so, read on.

There is a problem using db2/6000 with AIX 4.1.
clp uses popen and fgets to check if the back end process exists.

On 4.1, the sh is the standard (XPG4 or POSIX) shell and it is
linked to the ksh.  The popen() is calling execl sh to comply with the

This means that whatever the ENV environment variable is set to will
get expanded and executed.  Many customers set this to .kshrc in
their .profile.  This makes our results unpredicable especially if
an echo is done in the .kshrc.  The error I have seen reported is
DB21018E when executing clp commands such as db2 connect.  If there
is a problem, it will occur for every second clp command.

The 3.2.x popen() does not have this problem because it calls execl 38

Nick Lecic is looking into creating a fix which would temporarily set the
ENV variable to NULL before the popen and reset it after the fgets.

In the meantime,
one way to work around this is to code the .profile with -
This will insure that ENV expands to NULL in non-interactice mode
and to .kshrc in interactive mode -

Another work around is to include the following at the top of .kshrc
\# If this is not an interactive shell then exit .kshrc and do not
\# execute the rest of this script.
if      [ "${-\#\#*i*}" ]
    then return

Support Line: HOWTO : DB21018E with AIX 4.1 ITEM: BF1062L
Dated: March 1996 Category: N/A
This HTML file was generated 99/06/24~13:30:22
Comments or suggestions? Contact us