Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

Undeclared table problem in COBOL DB2 program

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DB2
View previous topic :: :: View next topic  
Author Message
trgk03

New User


Joined: 20 Jan 2006
Posts: 12
Location: kochi

PostPosted: Thu Aug 19, 2010 4:44 pm    Post subject: Undeclared table problem in COBOL DB2 program
Reply with quote

Hi,

I am receving the following message in endevor at bind package time

2849 COL 16 STATEMENT REFERENCES UNDECLARED TABLE "DL@DDA"."TDPMPOR"

However i have included the table

1660 EXEC SQL
1661 INCLUDE TDPMPOR
1662 END-EXEC.

The actual SQL query is as follows:
2848 EXEC SQL
2849 SELECT MPNUMBER
2850 INTO :BRF65DB-MPNUMBER
2851 FROM DL@DDA.TDPMPOR
2852 WHERE WONUMBER = :BRF65DB-WORKS-ORDER
2853 AND WOITEM = :BRF65DB-WORKS-ITEM
2854 FETCH FIRST 1 ROW ONLY
2855 END-EXEC.


I have included SQLCA , any thoughs on this strange problem will be very helpful.
Back to top
View user's profile Send private message

Craq Giegerich

Senior Member


Joined: 19 May 2007
Posts: 1512
Location: Virginia, USA

PostPosted: Thu Aug 19, 2010 5:14 pm    Post subject: Re: Undeclared table problem in COBOL DB2 program
Reply with quote

trgk03 wrote:
Hi,

I am receving the following message in endevor at bind package time

2849 COL 16 STATEMENT REFERENCES UNDECLARED TABLE "DL@DDA"."TDPMPOR"

However i have included the table

1660 EXEC SQL
1661 INCLUDE TDPMPOR
1662 END-EXEC.

The actual SQL query is as follows:
2848 EXEC SQL
2849 SELECT MPNUMBER
2850 INTO :BRF65DB-MPNUMBER
2851 FROM DL@DDA.TDPMPOR
2852 WHERE WONUMBER = :BRF65DB-WORKS-ORDER
2853 AND WOITEM = :BRF65DB-WORKS-ITEM
2854 FETCH FIRST 1 ROW ONLY
2855 END-EXEC.


I have included SQLCA , any thoughs on this strange problem will be very helpful.


What is in "INCLUDE TDPMPOR", perhaps there is an error in it.
Back to top
View user's profile Send private message
trgk03

New User


Joined: 20 Jan 2006
Posts: 12
Location: kochi

PostPosted: Thu Aug 19, 2010 5:23 pm    Post subject:
Reply with quote

Within INCLUDE TDPMPOR

************************************************************
* SQL DECLARATION FOR TABLE TDPMPOR DEFN. FROM
************************************************************
EXEC SQL
DECLARE TDPMPOR TABLE
(WONUMBER CHAR (006) NOT NULL WITH DE
MPNUMBER CHAR (004) NOT NULL WITH DE
MPVERSN CHAR (002) NOT NULL WITH DE
ORDERNO CHAR (006) NOT NULL WITH DE
WOITEM CHAR (003) NOT NULL WITH DE
PLINENO CHAR (007) NOT NULL WITH DE
CANCEL CHAR (001) NOT NULL WITH DE
CUTNO CHAR (003) NOT NULL WITH DE
TIMEST TIMESTAMP NOT NULL WITH DE
LENGTH DECIMAL (05,00) NOT NULL WITH DE
WIDTH DECIMAL (05,00) NOT NULL WITH DE
WEIGHT DECIMAL (05,03) NOT NULL WITH DE
END-EXEC.
************************************************************
************************************************************
* COBOL DECLARATION FOR TABLE TDPMPOR
VERSION 8 REL. 1.0
************************************************************
01 ROW-TDPMPOR.
05 MPOR-WO-NUMBER PIC X(0006).
05 MPOR-MP-NUMBER PIC X(0004).
05 MPOR-MP-VERSION PIC X(0002).
05 MPOR-ORDERNO PIC X(0006).
05 MPOR-ITEMNO PIC X(0003).
05 MPOR-PLINENO PIC X(0007).
05 MPOR-CANCEL PIC X(0001).
05 MPOR-CUTNO PIC X(0003).
05 MPOR-TIME-STAMP PIC X(026).
05 MPOR-LENGTH PIC S9(05) C
05 MPOR-WIDTH PIC S9(05) C
05 MPOR-WEIGHT PIC S9(02)V9(03) C
************************************************************
* NUMBER OF COLUMNS DESCRIBED BY THIS DECLARATION IS 12
Back to top
View user's profile Send private message
dbzTHEdinosauer

Global Moderator


Joined: 20 Oct 2006
Posts: 6966
Location: porcelain throne

PostPosted: Thu Aug 19, 2010 5:36 pm    Post subject:
Reply with quote

maybe remove the table qualification DL@DDA from your FROM statement.

and what are your bind parms?
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DB2 All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
This topic is locked: you cannot edit posts or make replies. Full Time COBOL Software Development ... shally Mainframe Jobs 0 Fri Jan 20, 2017 5:24 am
This topic is locked: you cannot edit posts or make replies. COBOL Software Development Lead at Fi... shally Mainframe Jobs 0 Fri Jan 20, 2017 5:21 am
No new posts Executing OO COBOL program invoking J... Virendra Shambharkar COBOL Programming 2 Tue Jan 10, 2017 6:37 pm
No new posts OO COBOL compile error Virendra Shambharkar COBOL Programming 3 Tue Jan 10, 2017 6:05 pm
No new posts Need Suggestion on COBOL program vickey_dw COBOL Programming 5 Thu Jan 05, 2017 10:55 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us