Calling DSNTIAR to display SQLCA fields
来源:互联网 发布:danee的发展前景知乎 编辑:程序博客网 时间:2024/05/22 05:26
If you're using DB2-COBOL, you're bound to have obtained something similar to the following in the spool:
DSNT408I SQLCODE = -501, ERROR: THE CURSOR IDENTIFIED IN A FETCH OR CLOSE STATEMENT IS NOT OPEN
followed by more details about why the DB2 operation failed. It could be anything: like timeout, deadlock message etc.
CALL 'DSNTIAR' USING SQLCA
WT-DSNTIAR-ERROR-TABLE
WT-DSNTIAR-ERROR-TEXT-LENGTH.
Hmm....you may wonder, "i never code such a line in my COBOL code!" Well we usually just copy paste the error routine. You might use a common ABEND-para. And this abend-para might be coded in another copylib. If you locate this copylib you'll find the above statement.
So, whenever we have a SQL problem, we call this abend para, which in turn calls the DSNTIAR routine which inturn uses the SQLCA structure to decode the sqlcode+other error numbers to produce a text message in our spool. The message might be something like below:
DSNT408I SQLCODE = -501, ERROR: THE CURSOR IDENTIFIED IN A FETCH OR
CLOSE STATEMENT IS NOT OPEN
DSNT418I SQLSTATE = 24501 SQLSTATE RETURN CODE
DSNT415I SQLERRP = DSNXERT SQL PROCEDURE DETECTING ERROR
DSNT416I SQLERRD = -315 0 0 -1 0 0 SQL DIAGNOSTIC INFORMATION
DSNT416I SQLERRD = X'FFFFFEC5' X'00000000' X'00000000'
X'FFFFFFFF' X'00000000' X'00000000' SQL DIAGNOSTIC INFORMATION
Notice all the messages begin with a "DSNT"!
- Calling DSNTIAR to display SQLCA fields
- How to display fields in the frontend item view
- SQLCA
- ILBOABN0 or CEE3ABD / DSNTIAR
- Display of CDPOS fields VALUE_OLD, VALUE_NEW in SE16
- Display Custom Fields in a Content By Query Web Part
- Display fields as checkbox, pushbutton, dropdownbox in ALV
- Display custom fields data in an HTML table
- Introduction to Display Drivers
- “calling”
- 什么是SQLCA
- sqlca.h
- SQLCA 内涵
- Pay attention to the calling convention!
- Calling Functions in LINQ to Entities Queries
- Calling CRDA to update world regulatory domain
- No SecurityManager accessible to the calling code
- Using awk to print all fields left
- 网站开发语言
- 杭电 hdu 1312 Red and Black
- 业务运营支撑系统 BOSS(Business & Operation Support System)。
- zoj 2136 Longest Ordered Subsequence
- linux更改code::blocks的运行终端
- Calling DSNTIAR to display SQLCA fields
- 简易枚举进程模块信息演示
- zoj 1037 Gridland
- C语言中的fread和fwrite
- hdu 3586 Information Disturbing 二分+树状DP
- oracle分区表
- TextView实现滚动效果
- android数据库存储方法(一)---------------SharedPreferences(详解)
- android数据库存储方法(一)---------------SharedPreferences(代码)