1. Suppose two programmers coded Cobol-DB2 Pgms for the same request. How to identify which programs is more efficient than other?
2. An Embedded SQL Statement is erroneous in a Cobol-DB2 pgm and execution is unsuccessful. How to identify the corresponding SQL statment and the Field which caused this error and where to locate the value of this field.
Joined: 06 Dec 2004 Posts: 211 Location: Keane Inc., Minneapolis USA.
1 Ans: COBOL+DB2 program effisiency depends on the number of DB2 calls and Query complexity. The best program should process every thing in COBOL and access DB2 very less number of times even using optimized SQL statements.
2 Ans: I think you know SQLCODE. Display SQLCODE after executing each SQL statement so that you will know where program will fail. Go to spool and find out the SQLCODE and proper message. I think it will work for you.