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!
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
SQL SQLMSS EX Cusip_report '&FromDate','&ToDate','&Cusip';
TABLE FILE SQLOUT
ON TABLE SET ONLINE-FMT PDF
-*ON TABLE HOLD FORMAT ALPHA
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:  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.
It appears you need security, (execute permission to run the stored procedure).
|Powered by Social Strata|