Focal Point Banner


As of December 1, 2020, Focal Point is retired and repurposed as a reference repository. We value the wealth of knowledge that's been shared here over the years. You'll continue to have access to this treasure trove of knowledge, for search purposes only.

Join the TIBCO Community
TIBCO Community is a collaborative space for users to share knowledge and support one another in making the best use of TIBCO products and services. There are several TIBCO WebFOCUS resources in the community.

  • From the Home page, select Predict: WebFOCUS to view articles, questions, and trending articles.
  • Select Products from the top navigation bar, scroll, and then select the TIBCO WebFOCUS product page to view product overview, articles, and discussions.
  • Request access to the private WebFOCUS User Group (login required) to network with fellow members.

Former myibi community members should have received an email on 8/3/22 to activate their user accounts to join the community. Check your Spam folder for the email. Please get in touch with us at community@tibco.com for further assistance. Reference the community FAQ to learn more about the community.


Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     [CLOSED] MULTIPLE RETURN VALUE IN A ORACLE stored procedures

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[CLOSED] MULTIPLE RETURN VALUE IN A ORACLE stored procedures
 Login/Join
 
Platinum Member
posted
Hi All,

I have a ORACLE stored procedures which is returning one output and running fine.My WF8 code is...
--------------------------------------------

-DEFAULT &ID=10;
ENGINE SQLORA SET DEFAULT_CONNECTION conname
ENGINE SQLORA
EX conname.AVINASHCURSOR &ID;
TABLE FILE SQLOUT
PRINT *
ON TABLE HOLD AS MPHOLD
END
TABLE FILE MPHOLD
PRINT *
END
-------------------------------------------
-------------------------------------------

But the procedure has been change. Now It has two out parameter. 1 is 'SYS_REFCURSOR' and 2nd is 'VAARCHAR'.......


Please give me the correct WF8 code which can accept two out parameter.

This message has been edited. Last edited by: <Kathryn Henning>,


Thanks!
@vi

WebFOCUS 8105, Dev Studio 8105, Windows 7, ALL Outputs
 
Posts: 103 | Registered: July 08, 2013Report This Post
Virtuoso
posted Hide Post
Just provide all parameters in your EX line right after the procedure name:

ENGINE SQLORA
EX conname.AVINASHCURSOR param1 param2 param3 param4 etc;
...


Please note that parameters are separated by spaces instead of commas.



Prod/Dev: WF Server 8008/Win 2008 - WF Client 8008/Win 2008 - Dev. Studio: 8008/Windows 7 - DBMS: Oracle 11g Rel 2
Test: Dev. Studio 8008 /Windows 7 (Local) Output:HTML, EXL2K.
 
Posts: 1533 | Registered: August 12, 2005Report This Post
Platinum Member
posted Hide Post
These params are input variable or both -njsden.
and applying this, it is not working.

my procedure is-
--------------------------------------------------
--------------------------------------------------
create or replace
PROCEDURE AvinashCursor(
v_num IN NUMBER,
v_name IN VARCHAR,
VAR1 IN OUT NUMBER,
c_dbuser IN OUT SYS_REFCURSOR
)
AS

BEGIN
VAR1 := 1;
OPEN c_dbuser FOR
SELECT * FROM Avinash_table where user_id=v_num AND CREATED_BY=v_name;
END AvinashCursor;
--------------------------------------------------
--------------------------------------------------

and am trying to call by this code-
-------------------------------------------------
-DEFAULT &ID=1;
-DEFAULT &NAME='avinash';
-DEFAULT &C_NAME=123;
ENGINE SQLORA SET DEFAULT_CONNECTION conname
ENGINE SQLORA
EX conname.AVINASHCURSOR &ID,'&NAME',&C_NAME;
------------------------------------------------

error comming-
------------------------------------------------
------------------------------------------------

(FOC1671) SET SERVER TPHRAT_TST COMMAND FOR ORACLE INTERFACE OUT OF SEQUENCE
(FOC1671) SET SERVER TPHRAT_TST COMMAND FOR ORACLE INTERFACE OUT OF SEQUENCE
(FOC1400) SQLCODE IS 6550 (HEX: 00001996)
: ORA-06550: line 1, column 44:
: PLS-00363: expression '123' cannot be used as an assignment target
: ORA-06550: line 1, column 7:
: PL/SQL: Statement ignored
L (FOC1405) SQL PREPARE ERROR.

------------------------------------------------
------------------------------------------------

This message has been edited. Last edited by: Avinash,


Thanks!
@vi

WebFOCUS 8105, Dev Studio 8105, Windows 7, ALL Outputs
 
Posts: 103 | Registered: July 08, 2013Report This Post
Guru
posted Hide Post
Hi Avinash,

As per IBI, Stored Procedures must adhere to the following rules:

A cursor must be defined with:
1) The TYPE statement in a PACKAGE or PROCEDURE.

2) An associated record layout of the answer set to be returned.

3) The cursor must be opened in the procedure.

4) No fetching is allowed in the stored procedure. The Adapter for Oracle fetches the answer set.

CREATE OR REPLACE PACKAGE pack1 AS
TYPE nfrectype IS RECORD (
pename emp.ename%TYPE,
pjob emp.job%TYPE,
pMgr emp.mgr%TYPE);
TYPE nfcurtype IS REF CURSOR RETURN nfrectype ;
PROCEDURE proc1(v_empno IN NUMBER,c_saltable IN OUT nfcurtype);
END pack1 ;
/
sho error

CREATE OR REPLACE PACKAGE BODY pack1 AS
PROCEDURE proc1 (v_empno IN NUMBER,c_saltable IN OUT nfcurtype)
IS
BEGIN
OPEN c_saltable FOR SELECT ename, job, mgr
FROM scott.emp
WHERE EMPNO = v_empno;
END proc1 ; -- end of procedure
END pack1; -- end of package body
/
sho error
  

Thanks,
Rifaz


-Rifaz

WebFOCUS 7.7.x and 8.x
 
Posts: 406 | Location: India | Registered: June 13, 2013Report This Post
  Powered by Social Strata  

Read-Only Read-Only Topic

Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     [CLOSED] MULTIPLE RETURN VALUE IN A ORACLE stored procedures

Copyright © 1996-2020 Information Builders