开发者

How to solve or start solving DB2 problem?

When I try to pre-compile my DB2 Cobol application that contains embedded SQL statements, I get this error in my SYSTERM file:

********************************* TOP OF DATA **********************************
DSNH527开发者_JAVA百科I W     DSNHOPTS  THE PRECOMPILER OR DB2 COPROCESSOR ATTEMPTED TO USE THE
DSNH004I S     DSNHLEXC  PROCEDURE DIVISION COULD NOT BE FOUND

DSNH053I W     DSNHMAIN  NO SQL STATEMENTS WERE FOUND
SOURCE STATISTICS
SOURCE LINES READ: 205
NUMBER OF SYMBOLS: 10
SYMBOL TABLE BYTES EXCLUDING ATTRIBUTES: 1640
THERE WERE 3 MESSAGES FOR THIS PROGRAM.
THERE WERE 0 MESSAGES SUPPRESSED BY THE FLAG OPTION.
188712 BYTES OF STORAGE WERE USED BY THE PRECOMPILER.
RETURN CODE IS 12
******************************** BOTTOM OF DATA ********************************

I think the error is that it can't find the Procedure Division section, but it is in the code here:

*---------------------------------------------------------------*
*          P R O C E D U R E     D I V I S I O N                *
*---------------------------------------------------------------*
PROCEDURE DIVISION USING LK-TRANS-INPUT.
000-MAIN.


Looking at the sample code it looks like you start coding in column 1.

Trad mainframe compilers expect code in particular columns:

----+----1----+-----
      *  comment star goes in column 7
       PROCEDURE DIVISION.
       PARAGRAPH_NAME.
      * All start between cols 8 and 11
      *
           ADD +1 TO COBVER.
      * Other operations start in col 12 or after.
      * Anything after column 71 will be ignored. 


I fixed it by recreating the Datasets on the DB2 mainframe with the same data in them. There was something wrong with their setup parameters.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜