APAR status
Closed as Permanent restriction.
Error description
APAR is sysrouted FROM one or more of the following:
APAR is sysrouted TO one or more of the following:
Modules/Macros
Publications Referenced
Closed as Permanent restriction.
Error description
The following errors occur when using the Stored Procedure Builder (SPB) to build an SQL stored procedure ona DB2 UDB for UNIX server. - 1506-296 (S) #include file "sqladef.h" not found. - 1506-007 (S) "struct sqla_runtime_info" is undefined. - 1506-045 (S) Undeclared identifier wchar_t. - It appears the DB2 Stored Procedure Builder is running the following command: cp /usr/lpp/db2inst2/sqllib/function/routine/sqlproc.icc /usr/lpp/db2inst2/sqllib/function/routine/sqlproc/IHSDW/ STAGING/tmp/P483 8710.icc - Then it runs the following: vacbld P4838710.icc and this process gets the errors listed. - The .icc file contains the following at the beginning: - prog_name = $SQLROUTINE_FILENAME infile = prog_name".c" expfile = prog_name".exp" icsfile = prog_name".ics" . if defined( $__TOS_AIX__ ) { { db2path = $HOME"/sqllib" <--- THIS IS THE ERROR outfile = prog_name group lib = "libdb2.a" option opts = link( debug, no ), link( exportList, expfile ), link( libsearchpath, db2path"/lib" ), incl( searchPath, db2path"/include" ) } . else // if defined( $__TOS_OS2__ ) | defined( $__TOS_WIN__ ) { db2path = $DB2PATH outfile = prog_name".dll" expfile = prog_name".def" group lib = "db2api.lib" option opts = link( debug, no ), link( exportList, expfile ), link( libsearchpath, db2path" lib" ), incl( searchPath, db2path" include" ) } . option opts { target type(dll) outfile { source infile source lib } } - The failure occurs in the following line in the source code: - db2path = $HOME"/sqllib" <--- THIS IS THE ERROR - The variable, $HOME, points to the home directory of the user account which started the DB2 instance. There is no problem as long as the instance owner logs in and starts the DB2 instance. The problem happens if a user, who is NOT the instance owner, logs in and starts the DB2 instance. There will be NO .../sqllib/ directory in this users home directory; an /sqllib/ directory is only found in the instance owner's home directory. - Note that DB2 permits any user account to start a DB2 instance, as long as the user account has sysadm, sysctrl or sysmaint authority.Local fix
One workaround is to add a link to the instance /sqllib/ directory in the home directory of the userid used to start the instance. - A second workaround would be to logon as the instance userid and start the instance.Problem summary
See Problem Decription for a description of the problem. This problem is caused because the user is logging in with a userid different from the instance owner's userid when he starts the DB2 instance on the server. Because of this, the HOME environment variable is set to the home directory of the userid used to logon. Since this directory is NOT the DB2 instance directory, it does not contain an /sqllib/ directory. Therefore, when the $HOME variable is replaced with its actual value in the source code generated by the SPB, there is no /sqllib/ directory in the path and the DB2 'include' files cannot be located.Problem conclusion
Module: ENGN_PSM Permanent Restriction: This apar is being closed as a permanent restriction on the use of the SPB in this environment for DB2 UDB Version 7.2. The Local Fix or Workaround sections of this apar provide two possible workarounds for this problem. CMVC defect 218224 has been opened to provide a fix for this defect in DB2 UDB Version 8.Temporary fix Comments
APAR information | |
APAR number | IY28957 |
Reported component name | UDB EE AIX |
Reported component ID | 5648D4800 |
Reported release | 710 |
Status | CLOSED PRS |
PE | NoPE |
HIPER | NoHIPER |
Special Attention | NoSpecatt |
Submitted date | 2002-03-07 |
Closed date | 2002-03-07 |
Last modified date | 2002-03-07 |
APAR is sysrouted FROM one or more of the following:
APAR is sysrouted TO one or more of the following:
Modules/Macros
ENGN_PSM |
Publications Referenced
Fix information |
Applicable component levels |