I am using the same user profile that has the same library list. I even
tried to declare my input parms as 'varying' in my program.  I still get
the errors in both interactive sql and java servlet.  

Sql gets - Select * from table(fn(parm1,parm2,parm3)) x
                fn in *LIBL type *N not found.


Java - SQLCall = "{select * from table(" +  funcname + "(?,?,?))}";
         CallableStatement stmt = con.prepareCall(SQLcall);
        
        I know I get my error here since I have println all over the
place.

        java.sql.SQLException: A character, token, or clause is not
valid or        is missing.

Thanks for your help,
Sudha

Sudha Ramanujan
SunGard Futures Systems
sramanujan@xxxxxxxxxxxxxxxxxx
(312) 577 6179
(312) 577 6101 - Fax


-----Original Message-----
From: Elvis Budimlic [mailto:ebudimlic@xxxxxxxxxxxxxxxxxxxxxxxxx] 
Sent: Monday, March 22, 2004 11:04 AM
To: 'Midrange Systems Technical Discussion'
Subject: RE: UDTF with SQL and JDBC call

Frequent pitfall is the assumption of same library list in different
environments, so that's the first place to check.  
Compare location of your external program library as well as UDFT
service
program library (auto-created) versus the library list of your
interactive
SQL job and the servlet job library list.
If that's all fine, post back and we'll take it further.

Elvis

-----Original Message-----
 Subject: UDTF with SQL and JDBC call

Hi all,

I have a working sqlrpgle UDTF that returns a table and works very well
from another SQLRPGLE within a declare cursor-fetch logic.  

I have couple of problems though.  I cannot get this to work
interactively with "select * from table(a())x" command.  I think, for
the same reason, I cannot get this to work from servlet as well.  I get
java.sql.SQLexception error at 
        CallableStatement stmt = con.prepareCall(SQLcall);
I am using      "com.ibm.as400.access.AS400JDBCDriver" with
"jdbc:as400://" connection.

My udtf declaration looks something like:

Create Function fn
       ( Iparm  char(1),..)      
  Returns Table               
       ( rfield  char(10),..)     

  Language RPGLE              
  No SQL                      
  scratchpad                  
  final call                  
  not deterministic           
  Parameter Style DB2SQL      
  External Name fn 

Can you please tell me where I am going wrong?

Thanks for all the help,
Sudha


_______________________________________________
This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing
list
To post a message email: MIDRANGE-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/midrange-l
or email: MIDRANGE-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/midrange-l.



As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2022 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.