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]How to capture MS SQL Server Stored Procedure output

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[CLOSED]How to capture MS SQL Server Stored Procedure output
 Login/Join
 
Member
posted
I have a stored procedure that returns a '1' using "SELECT '1'" to signify that it completed successfully. I use this stored proc to update a table in WebFOCUS as follows:

ENGINE SQLMSS SET DEFAULT_CONNECTION BI
SQL SQLMSS EX dbo.usp_FSG_ScoreCard_Exception_Group '&METRIC', &SOURCE ,&METRIC_GK, '&REQUESTOR' , &REASON, '&TYPE' , NULL ;
END

In addition, I have another stored proc that I call after the "usp_FSG_ScoreCard_Exception_Group" stored proc as follows:

ENGINE SQLMSS SET DEFAULT_CONNECTION BI
SQL SQLMSS EXEC dbo.usp_LoadFSG_ScoreCardMissingTimeCard
END

My issue is that the second stored proc "usp_LoadFSG_ScoreCardMissingTimeCard" takes around a minute to run since it's updating a huge table. So, since WebFOCUS waits for the second stored proc to complete, a simple update using the first stored proc seems like it takes a minute to run.

How do I make WebFOCUS aware that the first stored proc is complete, start the second stored proc and exit out of my fex without having to wait for the response from the second stored proc?

This message has been edited. Last edited by: <Emily McAllister>,


WebFOCUS 8.x, Windows, HTML/PDF
 
Posts: 23 | Registered: April 29, 2016Report This Post
Guru
posted Hide Post
Can you use 2 fex, each one to each SP.


WebFOCUS 8.1.05 / APP Studio
 
Posts: 272 | Location: Brazil | Registered: October 31, 2006Report This Post
Virtuoso
posted Hide Post
Can you run your fex's in deferred mode?

Alternatively, you could schedule them to run using CMRUN from the OS command line or in a batch executable.


WebFOCUS 8206, Unix, Windows
 
Posts: 1853 | Location: New York City | Registered: December 30, 2015Report This Post
Member
posted Hide Post
quote:
Originally posted by Ricardo Augusto:
Can you use 2 fex, each one to each SP.


I will try to create a second fex for the second stored proc? I am new to WebFOCUS, so how would I call the second fex from the first one? Do I just include it using "-INCLUDE"?


WebFOCUS 8.x, Windows, HTML/PDF
 
Posts: 23 | Registered: April 29, 2016Report This Post
Member
posted Hide Post
quote:
Originally posted by BabakNYC:
Can you run your fex's in deferred mode?

Alternatively, you could schedule them to run using CMRUN from the OS command line or in a batch executable.


The fex is in a html file. So I am not sure how I would run it in a deferred mode? I need to execute the second procedure only after the first one is done executing.


WebFOCUS 8.x, Windows, HTML/PDF
 
Posts: 23 | Registered: April 29, 2016Report This Post
Guru
posted Hide Post
quote:
I will try to create a second fex for the second stored proc? I am new to WebFOCUS, so how would I call the second fex from the first one? Do I just include it using "-INCLUDE"?



Yes. Use like this -INCLUDE IBFS:/WFC/Repository/app_name/full_path/fex2.fex


WebFOCUS 8.1.05 / APP Studio
 
Posts: 272 | Location: Brazil | Registered: October 31, 2006Report This Post
Expert
posted Hide Post
Have you considered the SQL Trace commands?
 
Posts: 3132 | Location: Tennessee, Nashville area | Registered: February 23, 2005Report This Post
Member
posted Hide Post
quote:
Originally posted by Doug:
Have you considered the SQL Trace commands?


I haven't. Could you give me some pointers on how to get started and what I should look for in the trace?


WebFOCUS 8.x, Windows, HTML/PDF
 
Posts: 23 | Registered: April 29, 2016Report This Post
Expert
posted Hide Post
Sure, I feel generous today. Add the following to / before your TABLE FILE request
SET XRETRIEVAL = OFF
SET TRACEUSER  = CLIENT
SET TRACEON    = STMTRACE//CLIENT
SET TRACEON    = SQLAGGR//CLIENT
SET TRACESTAMP = OFF
SET TRACEWRAP  = 132
SET EMGSRV     = ON

The results of this can be pasted directly into TOAD, or you SQL tool, for analysis (explain plan).
 
Posts: 3132 | Location: Tennessee, Nashville area | Registered: February 23, 2005Report This Post
Expert
posted Hide Post
You can create a fex with that code and -INCLUDE it where ever you want it...
 
Posts: 3132 | Location: Tennessee, Nashville area | Registered: February 23, 2005Report This Post
Expert
posted Hide Post
OK, So I forgot those lines and searched "sql trace commands and found this...

It's true what they say: What goes around ... Comes Around Smiler




   In FOCUS Since 1983 ~ from FOCUS to WebFOCUS.
   Current: WebFOCUS Administrator at FIS Worldpay | 8204, 8206
 
Posts: 3132 | Location: Tennessee, Nashville area | Registered: February 23, 2005Report 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]How to capture MS SQL Server Stored Procedure output

Copyright © 1996-2020 Information Builders