473,473 Members | 1,954 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

DB2 database shutdowns after excecution of sqlj procedure

1 New Member
In my SQLJ procedure , there is call to another stored procedure using a callable statement. But during excecution when .excute() happens . . the DB2 V7 database shuts down.

Plz help.

Follwing is the code . .
************ CAL02RSCAL.sqlj which call another PL/SQL Strored procedure TESTRSFILEPL written in DB2 *******************


package PAKCAL02RSCAL ;
import java.sql.*;
import sqlj.runtime.*;
import sqlj.runtime.ref.*;
import java.math.*;
import java.io.*;
import java.text.*;
import java.util.Date;

#sql iterator Defined_iter2 (String CLIENTID, String GRANTNUMBER, String PPTUNIQUEID);

public class CAL02RSCAL
{

public static void cAL02RS (
String instrPPTUNIQUEID,
String instrCLIENTID,
ResultSet[] out_rs
) throws SQLException, Exception
{

try
{
Defined_iter2 iter2;
String strPPTUNIQUEID = "";
String strCLIENTID = "";
PrintWriter pwx = null;
strPPTUNIQUEID = instrPPTUNIQUEID;
strCLIENTID = instrCLIENTID;
pwx = new PrintWriter( new FileWriter("/sapphire/users/devuser/ajitk/UPLOAD_RS/PAKCAL02RSCAL.log"),true );
//Start
pwx.println("CAL02RS: SQLJ versionn");
pwx.flush();
Connection conn = null;
String url;
String procName = "";
CallableStatement callStmt;

conn=DriverManager.getConnection("jdbc:db2:DEV3DB; create=true","spsdev","sps2diff");
conn.setAutoCommit(false);
pwx.println("CAL02RS: Before call of TESTRSFILEPLllll");
pwx.flush();
String sql = "CALL SPSSTADM.TESTRSFILEPL (?,?)";
callStmt = conn.prepareCall(sql);
callStmt.setString (1, instrPPTUNIQUEID);
callStmt.setString (2, instrCLIENTID);
callStmt.execute();
out_rs[0] = callStmt.getResultSet();

pwx.println("CAL02RS: SQLJ version End");
pwx.flush();
} // try
catch (Exception e)
{
System.out.println("IN the Exception Block");
}
}
}
*********** Create Statement *******
CREATE PROCEDURE SPSDEV.CAL02RSCAL ( IN instrPPTUNIQUEID varchar(4000), IN instrCLIENTID varchar(4000) ) EXTERNAL NAME 'SPSDEV.PAKCAL02RSCAL:PAKCAL02RSCAL.CAL02RSCAL.cAL 02RS' RESULT SETS 1 LANGUAGE JAVA PARAMETER STYLE JAVA NOT DETERMINISTIC FENCED NO DBINFO NULL CALL MODIFIES SQL DATA;
call sqlj.refresh_classes(void);

******* code for TESTRSFILE ************
CREATE PROCEDURE TESTRSFILEPL ( IN instrPPTUNIQUEID varchar(4000), IN instrCLIENTID varchar(4000))
RESULT SETS 1
LANGUAGE SQL
------------------------------------------------------------------------
-- SQL Stored Procedure
------------------------------------------------------------------------
P1: BEGIN

DECLARE c3 CURSOR WITH RETURN FOR
select CLIENTID, GRANTNUMBER, PPTUNIQUEID
from grantmaster where
clientid = instrCLIENTID
and PPTUNIQUEID = instrPPTUNIQUEID;

OPEN c3;

END P1

@
***************************

Plzzz Help
Jul 17 '07 #1
0 1242

Sign in to post your reply or Sign up for a free account.

Similar topics

4
by: Paul Reddin | last post by:
Hi, (V8.1 FP2) Trying to run SQLJ.INSTALL_JAR, we get the following error SQL1131N DARI (Stored Procedure) process has been terminated abnormally. SQLSTATE=38503 Not sure why this has...
0
by: Bernard Dhooghe | last post by:
DB2 UDB V8.1 Fixpak 4 AIX 5.1 CLASSPATH: /usr/opt/db2_08_01/java/db2jcc.jar:/usr/opt/db2_08_01/java/db2jcc_license_cu.jar:/usr/opt/db2_08_01/java/sqlj.zip:/usr/java131/jre/lib/rt.jar: Program:...
9
by: Janick | last post by:
With DB2 7.2 we used to call methods from other SQLJ Stored Procedures, as it was not possible to call SPs via the SQL Call-statement from within SPs. So we always had a method like this: ...
10
by: Raquel | last post by:
UDB PE 8.1 on Win XP. ok, this function caused a lot of grief today. My stored procedures are java stored procedures, all FENCED and directly placed in \sqllib\function directory (not built into...
2
by: Raquel | last post by:
UDB V8.1.3 on XP. While trying out SQLj procedures, I just 'compile' my stored procedure code (by command sqlj program-name.sqlj) and run it. That's it. So, how and when is db2profc and all the...
12
by: Rhino | last post by:
I am having an odd problem: the sqlj command on my system doesn't work. I am running DB2 (LUW) V8 (FP8) on WinXP. I haven't done an sqlj program since Version 6 of DB2 (LUW) so I checked the...
7
by: Jean-Marc Blaise | last post by:
Hi, The dev center calls sqlj.DB2_UPDATEJARINFO ('JMARC.JMB','JMB','file:JMB.sqlj') to update the sqlj routine source. I tried in CLP from the directory containing jar and sqlj files (Windows...
3
by: tol7481 | last post by:
Hi, I'm trying to deploy a Java stored procedure on DB2 V8 on a Linux box, but I have some problems. I've added to the classpath the following JARs sqllib/java/db2java.zip...
1
by: vasilip | last post by:
I'm trying to insert large polygon data via sql statement. since the data was over 32k I had to use sqlj to insert my data. I made a class that inserts the data. ran sqlj, generated the .java...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
1
muto222
php
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.