Focal Point Banner
Community Center Education Summit Technical Support User Groups
Let's Get Social!

Facebook Twitter LinkedIn YouTube
Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     DB2 Stored Procedures
Go
New
Search
Notify
Tools
Reply
  
DB2 Stored Procedures
 Login/Join
 
<FOCUS Freak>
posted
Hello All,

My team is currently investigating the use of DB2 Stored Procedures called from WebFOCUS. We are attempting to get our data adapter set up to use CLI instead of CAF. We have created a DB2 Stored Procedure on the Main Frame and can call it using COBOL on the Main Frame, passing it parameters and receiving a cursor.

My question is, does anyone have a sample stored procedure and a sample foc exec that I can look at to give me an idea of how to code it? I have looked in the Online InfoResponse and have seen some generic items that are not much help. A real and usable stored procedure and foc exec would do me more good! Thanks for any help!

-FOCUS Freak
 
Reply With QuoteReport This Post
Guru
posted Hide Post
This is how we code it against SQL - it may help you a bit?

-DEFAULT &FromDate = '05/1/2003';
-DEFAULT &ToDate = '08/19/2003';
-DEFAULT &Cusip = '319963ah7';
-*
ENGINE SQLMSS SET CONVERSION LONGCHAR ALPHA
ENGINE SQLMSS SET SERVER connectionname
-RUN
SQL SQLMSS EX Cusip_report '&FromDate','&ToDate','&Cusip';
-TYPE &RETCODE
-TYPE &FOCERRNUM
-*
TABLE FILE SQLOUT
PRINT
OriginalCusip
NewCusip
DateMessageSent
LastModifiedUser
FromDate
ToDate
Comments
ON TABLE SET ONLINE-FMT PDF
-*ON TABLE HOLD FORMAT ALPHA
END
-RUN
 
Posts: 428 | Location: Springfield, MA | Registered: May 07, 2003Reply With QuoteReport This Post
Gold member
posted Hide Post
Hi!!!
I have an stored procedure in Sql Server and used the above sample code and placed the stored proc name and connection name in place.
But i am getting following error message...

(FOC1400) SQLCODE IS 229 (HEX: 000000E5) XOPEN: 42000 : Microsoft OLE DB Provider for SQL Server: [42000] EXECUTE permission den
: ied on object 'KASITEST', database 'KasiTest', owner 'dbo'.
L (FOC1405) SQL PREPARE ERROR.

Please advise any other way i can explicitly pass the user id and password.
This would be of great help.
 
Posts: 71 | Registered: November 20, 2003Reply With QuoteReport This Post
Guru
posted Hide Post
It appears you need security, (execute permission to run the stored procedure).
 
Posts: 428 | Location: Springfield, MA | Registered: May 07, 2003Reply With QuoteReport This Post
  Powered by Social Strata  
 

Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     DB2 Stored Procedures

Copyright © 1996-2018 Information Builders, leaders in enterprise business intelligence.