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 > DB2 stored procedure in PL/I

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 03-16-11, 18:43
zaxscd zaxscd is offline
Registered User
 
Join Date: Mar 2011
Posts: 9
DB2 stored procedure in PL/I

hi,

I compiled DB2 stored procedure in PL/I 3.7 but I'ts abended on sql code which says that the SP is not proper.
The DB2 version is 8.

Do you know which parameters I need to add specially to PL/I compile job like NCAL?

Thanks in advance,
Jhon
Reply With Quote
  #2 (permalink)  
Old 03-17-11, 15:00
schintala schintala is offline
Registered User
 
Join Date: Apr 2005
Location: USA
Posts: 119
Could you please share the error info here to see what went wrong?
Reply With Quote
  #3 (permalink)  
Old 03-21-11, 03:39
zaxscd zaxscd is offline
Registered User
 
Join Date: Mar 2011
Posts: 9
error message

Hi,

the error message that shown on log:
"DB2MSTR DSNX906I @ DSNX9CAC PROCEDURE OR FUNCTION
DB2MSTR X.Y TERMINATED ABNORMALLY. THE PROCEDURE OR FUNCTION HAS BEEN STOPPED, ASID = 014A WLM_ENV=Z"

I have the feeling that the compile's parameters is not good..
Reply With Quote
  #4 (permalink)  
Old 03-21-11, 15:40
schintala schintala is offline
Registered User
 
Join Date: Apr 2005
Location: USA
Posts: 119
Ya. That's is right. Did you compile and link edit the program using DSNRLI?
Reply With Quote
  #5 (permalink)  
Old 03-21-11, 16:40
zaxscd zaxscd is offline
Registered User
 
Join Date: Mar 2011
Posts: 9
No but with DSNHLI...
Reply With Quote
  #6 (permalink)  
Old 03-21-11, 18:18
schintala schintala is offline
Registered User
 
Join Date: Apr 2005
Location: USA
Posts: 119
If you execute the procedure in WLM environment you need to link edit to DSNRLI. BTW, how your procedure is defined?
Reply With Quote
  #7 (permalink)  
Old 03-22-11, 08:50
zaxscd zaxscd is offline
Registered User
 
Join Date: Mar 2011
Posts: 9
Hi,

Whats the meaning of how is the procedure defined?
Reply With Quote
  #8 (permalink)  
Old 03-22-11, 13:32
schintala schintala is offline
Registered User
 
Join Date: Apr 2005
Location: USA
Posts: 119
Procedue definition can be viewed from catalog tables like SYSIBM.SYSROUTINES. Check this table and see how the procedure is defined.
Reply With Quote
  #9 (permalink)  
Old 03-23-11, 12:25
zaxscd zaxscd is offline
Registered User
 
Join Date: Mar 2011
Posts: 9
It help.. Thanks a lot!

but now there is a different abend :

SQLCODE: -805
SQLERRM:
X.Y.Z.SP.18F069F3023DF4423.OTHER_PROGRAM_WHICH_RIS E_THE_SP.02
SQLERRD(3): 0.

maybe it's the sp's bind package of sp's package? ot the OTHER_PROGRAM_WHICH_RISE_THE_SP plan?
I understand that I don't need plan for sp.
Reply With Quote
  #10 (permalink)  
Old 03-23-11, 15:39
schintala schintala is offline
Registered User
 
Join Date: Apr 2005
Location: USA
Posts: 119
If the stored procedure contains SQL statements, you must process them like they are in any other SQL application program through the DB2 pre-compiler or the SQL statement co-processor, and you must bind the resulting DBRM into a package. It does not require a plan since it runs under the thread for the calling application.
Reply With Quote
  #11 (permalink)  
Old 03-24-11, 05:57
zaxscd zaxscd is offline
Registered User
 
Join Date: Mar 2011
Posts: 9
I did bind package to the SP dbrm but the Call program don't have the SP's package in the plan and it still abend on -805
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