If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > DB2 > Includes in Procedures written in Developer Center

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 11-15-04, 10:44
c638bjo c638bjo is offline
Registered User
 
Join Date: Oct 2004
Posts: 1
Includes in Procedures written in Developer Center

Does anyone know if it's possible to Include files (code) in a SP written in Developer Center.

What i want is something like this

<This is the working way>
CREATE PROCEDURE AAAA (IN EMPNUMBR CHAR(6), OUT SQLCPARM INTEGER)
LANGUAGE SQL

BEGIN:
DECLARE SQLCODE INTEGER;
DECLARE CONTINUE HANDLER FOR SQLEXCEPTION
SET SQLCPARM = SQLCODE;
>

But i want to have the same errorfile to all my sp's.
<Can i do this>
CREATE PROCEDURE AAAA (IN EMPNUMBR CHAR(6), OUT SQLCPARM INTEGER)
LANGUAGE SQL

BEGIN:
#INCLUDE errorDeclares
SET SQLCPARM = SQLCODE;

>

Regards

Bjórn Jonsson
Reply With Quote
  #2 (permalink)  
Old 11-15-04, 10:54
ARWinner ARWinner is offline
Registered User
 
Join Date: Jan 2003
Posts: 3,575
No, Only SQL is allowed in a SP. You will need to explicitly declare the stuff each time.

Andy
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On