IBM_TXSeries_CICS Connect to Oracle troubleshooting Notes

下午在配置cics 连接oracle时,在编译oracle1pc.mk遇到报错。下面为排障过程:

1、执行make -f oracle1pc.mk oracle 遇到报错:如下所示:

PCC-S-02201, Encountered the symbol “size_t” when expecting one of the following
:

… auto, char, const, double, enum, float, int, long,
ulong_varchar, OCIBFileLocator OCIBlobLocator,
OCIClobLocator, OCIDateTime, OCIExtProcContext, OCIInterval,
OCIRowid, OCIDate, OCINumber, OCIRaw, OCIString, register,
short, signed, sql_context, sql_cursor, static, struct,
union, unsigned, utext, uvarchar, varchar, void, volatile,
a typedef name, exec oracle, exec oracle begin, exec,
exec sql, exec sql begin, exec sql type, exec sql var,
The symbol “exec,” was substituted for “size_t” to continue.

5/usr/include/stdio.h:
715, /usr/include/stdio.h
extern size_t fwrite (const void *__restrict __ptr, size_t __size,
1
PCC-S-02201, Encountered the symbol “extern” when expecting one of the following
:

, )

0, oracle1pc.pc
PCC-F-02102, C Ԥʱ,

make: *** [oracle1pc.c] Error 1

2、确认profile 文件,oracle的环境变量设置正确:

root@zymh Oracle]# vi /etc/profile

################oracle setup#########################
export PATH
export ORACLE_HOME=/usr/zymh/oracledb/oracle/product/11.2.0/client_1
export ORACLE_SID=cicsdb
export TNS_ADMIN=$ORACLE_HOME/network/admin
export NLS_LANG=”simplified chinese_china’.ZHS16GBK”
#export LD_LIBRARY_PATH=”${ORACLE_HOME}:${LD_LIBRARY_PATH}”
#export PATH=”${PATH}:${ORACLE_HOME}”
export LD_LIBRARY_PATH=$ORACLE_HOME/lib
export PATH=$ORACLE_HOME/bin:$PATH
export LIB_PATH=$ORACLE_HOME/lib

3、编辑pcscfg.cfg,要注意,是pcscfg.cfg 不是pcbcfg.cfg。一开始,俺就是编辑pcbcfg.cfg,总是编译不通过:

[root@zymh admin]# vi pcscfg.cfg
sys_include=(/usr/zymh/oracledb/oracle/product/11.2.0/client_1/xdk/include,/usr/zymh/oracledb/oracle/product/11.2.0/client_1/precomp/public,/opt/ibm/cics/include,/
usr/lib/gcc/x86_64-redhat-linux/4.8.2/include,/usr/include)
ltype=short
define=__x86_64__

4、再编译,就编译成功:

[root@zymh Oracle]# make -f oracle1pc.mk oracle
/usr/zymh/oracledb/oracle/product/11.2.0/client_1/bin/proc release_cursor=no sqlcheck=syntax \
include=/opt/ibm/cics/include ireclen=512 \
iname=oracle1pc.pc

Pro*C/C++: Release 11.2.0.1.0 – Production on 9 10:59:51 2018

Copyright (c) 1982, 2009, Oracle and/or its affiliates. All rights reserved.

ϵͳĬȡ: /usr/zymh/oracledb/oracle/product/11.2.0/client_1/precomp/admin/pcscfg.cfg

cc -c -m32 -I/opt/ibm/cics/include oracle1pc.c
oracle1pc.c: In function ‘do_sql_error’:
oracle1pc.c:364:5: warning: incompatible implicit declaration of built-in function ‘memset’ [enabled by default]
memset(errmsg,’\0′,400);
^
oracle1pc.c:373:5: warning: incompatible implicit declaration of built-in function ‘strncpy’ [enabled by default]
strncpy(errmsg, sqlca.sqlerrm.sqlerrmc, sizeof(errmsg));
^
oracle1pc.c:375:5: warning: incompatible implicit declaration of built-in function ‘strcpy’ [enabled by default]
strcpy(cics_sqlca_message, errmsg); /* Copy message text */
^
oracle1pc.c: In function ‘no_xa_open’:
oracle1pc.c:469:5: warning: incompatible implicit declaration of built-in function ‘strcpy’ [enabled by default]
strcpy(openstring.arr, str1);
^
oracle1pc.c:480:48: warning: incompatible implicit declaration of built-in function ‘strlen’ [enabled by default]
for ( i=0 ; state == ACC_NOT_FOUND && i < strlen(str1) ; i++ )
^
oracle1pc.c:521:15: warning: incompatible implicit declaration of built-in function ‘strncpy’ [enabled by default]
strncpy((char *)username.arr, &(str1[i+1]), (j-i)-1);
^
oracle1pc.c:550:17: warning: incompatible implicit declaration of built-in function ‘strncpy’ [enabled by default]
strncpy((char *)password.arr, &(str1[i+1]), (j-i)-1);
^
oracle1pc.c:600:33: warning: incompatible implicit declaration of built-in function ‘strncpy’ [enabled by default]
strncpy((char *)db_string.arr, &(str1[i+1]), (j-i)-1);
^
ld -shared -eCICS_XA_Init -m elf_i386 -L/usr/zymh/oracledb/oracle/product/11.2.0/client_1/lib -lclntsh -R/usr/zymh/oracledb/oracle/product/11.2.0/client_1/lib -o oracle1pc oracle1pc.o \
/opt/ibm/cics/lib/regxa_swxa.o
rm -f oracle1pc.c oracle1pc.o
[root@zymh Oracle]#

以下文章点击率最高

Loading…

发表评论