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     [SOLVED] calling a SQL stored procedure from an MR Domain

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[SOLVED] calling a SQL stored procedure from an MR Domain
 Login/Join
 
Gold member
posted
I'm a newbie and pretty lost on how to call a stored procedure. The procedure below was written in one of the EDASERVE application folders and ran successfully. However, when I copy the same code to a procedure in an MR Domain, I get an error: "ERROR_MR_FEX_NOT_FOUND Can't create item object based on provided item key sp_lghrpt_PathServiceDemo.fex".
I don't quite understand why it would work from the application but not from MR but there is a lot that I don't understand about WebFocus. Any help would be much appreciated!

-* set the SQL database connection
-SET &START_DT = '10/01/2009';
-SET &END_DT = '11/01/2009';
-* set the SQL database connection
SQL SQLMSS SET SERVER PARAGON
SQL SQLMSS
-* execute the stored procedure
EX sp_lghrpt_PathServiceDemo '&START_DT.EVAL','&END_DT.EVAL';
-RUN
-* save the results into a hold file
TABLE FILE SQLOUT
PRINT *
ON TABLE HOLD AS TMPOUT
END
-RUN
-* table the hold file and format for viewing
TABLE FILE TMPOUT
PRINT *
END

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


WebFOCUS 7.7.2
Win2003
Excel, HTML, PDF
 
Posts: 61 | Registered: April 16, 2009Report This Post
Expert
posted Hide Post
Hi jj,

Try this:

  
-MRNOEDIT -INCLUDE foldername/focexecname.fex


This will call your program from the APP folder the focexec is in.

OR

  
-MRNOEDIT BEGIN
-* set the SQL database connection
-SET &START_DT = '10/01/2009';
-SET &END_DT = '11/01/2009';
-* set the SQL database connection
SQL SQLMSS SET SERVER PARAGON
SQL SQLMSS
-* execute the stored procedure
EX sp_lghrpt_PathServiceDemo '&START_DT.EVAL','&END_DT.EVAL';
-RUN
-* save the results into a hold file
TABLE FILE SQLOUT
PRINT *
ON TABLE HOLD AS TMPOUT
END
-RUN
-* table the hold file and format for viewing
TABLE FILE TMPOUT
PRINT *
END
-MRNOEDIT END


This stops the Managed Reporting engine from parsing the code and just executing the procedure...

Another possibility is to add the database the stored proc is in, i.e.

EX database.dbo.sp_lghrpt_PathServiceDemo '&START_DT.EVAL','&END_DT.EVAL';

or something like that...


hth


Tom Flynn
WebFOCUS 8.1.05 - PROD/QA
DB2 - AS400 - Mainframe
 
Posts: 1972 | Location: Centennial, CO | Registered: January 31, 2006Report This Post
Gold member
posted Hide Post
Aha! I tried the middle solution and that is working but I will play with the others as well.

Thanks!


WebFOCUS 7.7.2
Win2003
Excel, HTML, PDF
 
Posts: 61 | Registered: April 16, 2009Report 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     [SOLVED] calling a SQL stored procedure from an MR Domain

Copyright © 1996-2020 Information Builders