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] Calling Oracle Stored proc from fex.

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[CLOSED] Calling Oracle Stored proc from fex.
 Login/Join
 
Guru
posted
Hi,
I am trying to call Oracle stored proc from a fex file. The signature of SP is as :

 
 CREATE OR REPLACE PROCEDURE          SOLV_UPD_RPT_DT   (
 pi_account_no                   VARCHAR2 DEFAULT 'ALL',
 pi_run_date                     DATE DEFAULT SYSDATE,
 po_error_code             out   NUMBER     )
 

Here, we have two input variable and one output variable. I am calling this SP
in my fex as below:

 
 -* File callsp.fex
 -SET &ECHO = ON;
 -SET &ECHO = ALL;
 
 -DEFAULT &ACCT = 'ABC123';
 -DEFAULT &REQDATE = '03/04/2012';
 -DEFAULT &V_OUT= NULL;
 
 ENGINE SQLORA SET VARCHAR OFF
 ENGINE SQLORA SET DEFAULT_CONNECTION dev1
 ENGINE SQLORA
 
 EX FRD_MAIN.SOLV_UPD_RPT_DT '&ACCT','&REQDATE','&V_OUT';
 
 TABLE FILE SQLOUT
 PRINT
 *
 ON TABLE HOLD AS SOLV
 
 END
 -RUN
 

When I run the above code, it throws below error:

 (FOC1400) SQLCODE IS 6550 (HEX: 00001996)
 : ORA-06550: line 1, column 54:
 : PLS-00363: expression 'NULL' cannot be used as an assignment target
 : ORA-06550: line 1, column 7:
 : PL/SQL: Statement ignored L (FOC1405) SQL PREPARE ERROR.
  

I think there is problem with the output variable here. It is being treated as
input varible.
If I remove the output variable and call the SP as :
EX FRD_MAIN.SOLV_UPD_RPT_DT '&ACCT','&REQDATE';
It throws error ' PLS-00306: wrong number or types of arguments in call to'
If I use'?' at OUT variable as:
EX FRD_MAIN.SOLV_UPD_RPT_DT '&ACCT','&REQDATE', ? ;
It gives me below error:
 
FOC1400) SQLCODE IS 6550 (HEX: 00001996)
 : ORA-06550: line 1, column 54:
 : PLS-00103: Encountered the symbol ")" when expecting one of the
 : following:
 :    ( - + case mod new not null <an identifier>
 :    <a double-quoted delimited-identifier> <a bind variable>
 :    continue avg count current exists max min prior sql stddev
 :    sum variance execute forall merge time timestamp interval
 :    date <a string literal with character set specification>
 :    <a number> <a single-quoted SQL string> pipe
 :    <an alternatively-quoted string literal with character set
 L    (FOC1405) SQL PREPARE ERROR.
 



Can you please suggest the way to handle this output variable of stored proc in
fex.


Thanks in advance.

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


WF 8.1.04,Windows 7,
DataBase: Oracle 11g,Output :Excel,PDF,HTML
 
Posts: 281 | Location: India | Registered: April 21, 2007Report This Post
Guru
posted Hide Post
Not sure if you can capture output variable using SQL pass thru stored procedure.
I believe that SQLOUT expects to receive a result set not a variable.
Try creating a master file for the stored procedure. Then call it using a regular table request.

-DEFAULT &ACCT = 'ABC123';
-DEFAULT &REQDATE = '03/04/2012';
  
TABLE FILE SOLV_UPD_RPT_DT
PRINT
   PI_ACCOUNT_NO
   PI_RUN_DATE
   PO_ERROR_CODE
   
WHERE PI_ACCOUNT_NO EQ '&ACCT';
WHERE PI_RUN_DATE EQ DT(&REQDATE);
END
-RUN


WebFOCUS 8.1.05M Unix Self-Service/MRE/Report Caster - Outputs Excel, PDF, HTML, Flat Files
 
Posts: 320 | Location: Memphis, TN | Registered: February 12, 2008Report 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] Calling Oracle Stored proc from fex.

Copyright © 1996-2020 Information Builders