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     How to Execute a Stored Procedure with Multiple Amper Variables

Read-Only Read-Only Topic
Go
Search
Notify
Tools
How to Execute a Stored Procedure with Multiple Amper Variables
 Login/Join
 
<Heather>
posted
I am currently working in the MRE environment on Webfocus 5.33. My code is as follows:

-MRNOEDIT BEGIN

REMOTE DEST = WFSA2003
-REMOTE BEGIN

SQL SQLMSS SET SERVER STTOPC01
END
SQL SQLMSS

ex gm_Report_DowntimeExcelReport_GetIncidentsByStartDate_TimeandEndDate_Time '&StartDate_Time','&EndDate_Time';

TABLE FILE SQLOUT
PRINT *
ON TABLE HOLD AS LISTOWOS
END
-REMOTE END

TABLE FILE LISTOWOS
PRINT *
END

-MRNOEDIT END

I get the following error message

No HTML Output!

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


(FOC1671) SET SERVER STTOPC01 COMMAND FOR SQLMSS INTERFACE OUT OF SEQUENCE
(FOC1671) SET SERVER STTOPC01 COMMAND FOR SQLMSS INTERFACE OUT OF SEQUENCE
(FOC1400) SQLCODE IS 2812 (HEX: 00000AFC) XOPEN: 42000
: Microsoft OLE DB Provider for SQL Server: [42000] Could not find stored
: procedure 'gm_Report_DowntimeExcelReport_GetIncidentsByStartDate_Timeand
: EndDate_Time'.
L (FOC1405) SQL PREPARE ERROR.
(FOC1400) SQLCODE IS 1671 (HEX: 00000687)
: SET SERVER STTOPC01 COMMAND FOR SQLMSS INTERFACE OUT OF SEQUENCE
L (FOC1405) SQL PREPARE ERROR.
0 ERROR AT OR NEAR LINE 21 IN PROCEDURE sqlstoreFOCEXEC *
(FOC205) THE DESCRIPTION CANNOT BE FOUND FOR FILE NAMED: LISTOWOS
BYPASSING TO END OF COMMAND

I am getting prompted for the StartDate_Time and EndDate_Time so why would I get the message thatit can't find the stored procedure. So how do I point this stored procedure to the right database on the sql server? Also, at the beginning of the stored procedure it defines the date fields as follows:
--DECLARE @StartDate_Time SMALLDATETIME
--DECLARE @EndDate_Time SMALLDATETIME
--DECLARE @OPID TINYINT
--SET @StartDate_Time = '9/20/2004'
--SET @EndDate_Time = '9/23/2004'

Any help or suggestion would be appreciated.
 
Report This Post
Guru
posted Hide Post
Here's the syntax I use....

ENGINE SQLMSS SET CONVERSION LONGCHAR ALPHA
ENGINE SQLMSS SET DATETIME OFF
ENGINE SQLMSS SET SERVER &DataConnection
SQL SQLMSS EX SelAffirmationUK &IssuerID, &RAID, &PMID, &CompanyID , '&Affirmed', '&DebtClass', &TableID ;


Hope this helps!



WebFOCUS 7.6.6/TomCat/Win2k3
 
Posts: 428 | Location: Springfield, MA | Registered: May 07, 2003Report This Post
<Heather>
posted
Carol, thanks for your example but it still doesn't work. If I explain our environment, maybe the proper syntax will surface from that.

The environment is that there is a webserver (5.3.3) that talks to the reporting server (EDA533P) which talks to the sql adaptor which is mapped to the SQL server. The stored procedure resides on the SQL server and we don't have the proper statements to tell Focus where that procedure is so it can't execute it.
 
Report This Post
<Heather>
posted
quote:
Originally posted by Tom Flynn:
Heather,

I did a GOOGLE search on stored procedure variables, found this:

Global Variables and Stored Procedure Parameters

Hope it helps, until, someone with more knowledge comes along...


Thanks Tom, this will come in handy once I get the proper syntax working.

Heather
 
Report This Post
Master
posted Hide Post
Couple of things,

1. Is the connection name STTOPC1 exists? If exists, which database it points?

2. Do you have the stored procedure in the database where it points?

Check those and let me know if you still have a issue.

When you say you are getting prompted to enter STARTDATE and ENDDATE, that is because those are dialogure manager variable and it doesn't mean SP exists when it prompted.


WFConsultant

WF 8105M on Win7/Tomcat
 
Posts: 780 | Location: Florida | Registered: January 09, 2005Report This Post
<Heather>
posted
Kamesh,

1. Yes the connection STTOPC01 exists. It doesn't point to a default database because the user name and password has admin rights to all databases on the server.
2. The stored procedure resides in the database called ShiftLogReporting.

Thnaks
Heather
 
Report This Post
Master
posted Hide Post
Try this,


ex ShiftLogReporting.userid.gm_Report_DowntimeExcelReport_GetIncidentsByStartDate_TimeandEndDate_Time '&StartDate_Time','&EndDate_Time';

userid - It depends on who have the access.

example: dbo or any user.

It should work. If not try run this in query analyzer and see whether it returns you data or not.

Hope this helps,


WFConsultant

WF 8105M on Win7/Tomcat
 
Posts: 780 | Location: Florida | Registered: January 09, 2005Report This Post
<Heather>
posted
It runs in Query analyzer but not on the web.

Is there a character limit in the MRE environment for a stored procedure name by chance?

This message has been edited. Last edited by: <Heather>,
 
Report This Post
Master
posted Hide Post
Instead of calling that Stored Procedure, can you try calling a simple table in that database?

your query will be select top 10 * from tablename;

Somewhat I feel it's not able to connect to that database.


WFConsultant

WF 8105M on Win7/Tomcat
 
Posts: 780 | Location: Florida | Registered: January 09, 2005Report This Post
Platinum Member
posted Hide Post
try putting an an END after your ex line and before the TABLE FILE SQLOUT. Had similar error/problem once upon a time and then the problem went away with that fix.

Let me know.

Ira
WF 5.3.6 AIX


aix-533,websphere 5.1.1,apache-2.0,
wf 538(d), 537 (p),
==============
7.6.11 (t) aix 5312
websphere 6.1.19
apache 2.0
 
Posts: 195 | Registered: October 27, 2006Report This Post
Gold member
posted Hide Post
Hi Heather,

Try to use [dbname].[creator name].[sp_name] format.
(Three-part format)

Link to sqldts.com is indeed useful - but not in your case.

I suppose that default database for WF Login is another than for login you use with SQL Analyzer.
(So you're in different DBs when you're in WF and isqlw)


WF 7.6.2, WinNT/2K, MSSQL 2K, MSOLAP 2K, BID
 
Posts: 79 | Location: Moscow | Registered: April 27, 2007Report This Post
<Heather>
posted
Thanks Ira, but it didn't work.
 
Report This Post
Master
posted Hide Post
could you change your code to a simple select statement? that will rule out a LOT of possibilities.

quote:
-MRNOEDIT BEGIN

REMOTE DEST = WFSA2003
-REMOTE BEGIN

SQL SQLMSS SET SERVER STTOPC01
END
SQL SQLMSS

ex
'remove from here
gm_Report_DowntimeExcelReport_GetIncidentsByStartDate_TimeandEndDate_Time '&StartDate_Time','&EndDate_Time';
'to here and put in
select * from dbo.someschema.sometable;
'change the schema and table name to something you know exists. It's been a while since I've worked with ms sql, not sure if the dbo. goes first or after schema

TABLE FILE SQLOUT
PRINT *
ON TABLE HOLD AS LISTOWOS
END
-REMOTE END

TABLE FILE LISTOWOS
PRINT *
END

-MRNOEDIT END


Prod: Single Windows 2008 Server running Webfocus 7.7.03 Reporting server Web server IIS6/Tomcat, AS400 DB2 database.
 
Posts: 611 | Registered: January 04, 2007Report This Post
Guru
posted Hide Post
I know it seems crazy, but have you tried:
ON TABLE PCHOLD AS LISTOWOS

When you are in a HUB-SUB situation, and using -REMOTE to bypass the HUB server, to get your answer set held on the HUB (not the SUB), you need to use PCHOLD.

This message has been edited. Last edited by: N.Selph,


(Prod: WebFOCUS 7.7.03: Win 2008 & AIX hub/Servlet Mode; sub: AS/400 JDE; mostly Self Serve; DBs: Oracle, JDE, SQLServer; various output formats)
 
Posts: 391 | Location: California | Registered: April 14, 2003Report This Post
Virtuoso
posted Hide Post
Heather,
Have you looked at thisarticle?
It states that the first MSSQL connector mentioned in the edasprof (on your subserver WFSA2003) should have (access to) the stored procedure.
Does this help?


GamP

- Using AS 8.2.01 on Windows 10 - IE11.
in Focus since 1988
 
Posts: 1961 | Location: Netherlands | Registered: September 25, 2007Report This Post
<Heather>
posted
It was a nice try but it didn't work.
 
Report This Post
<Heather>
posted
Using this code, my query runs but returns the column names only. I should have 54 records.

-MRNOEDIT BEGIN

SQL EDA SET SERVER WFSA2003

-REMOTE BEGIN

ENGINE SQLMSS SET DEFAULT_CONNECTION STTOPC01
SQL SQLMSS

SELECT

IssueId,
IssueDesc

FROM ShiftLogReporting.dbo.InspectionIssuesList;

TABLE FILE SQLOUT
PRINT *
ON TABLE PCHOLD AS LISTOWOS
END

-REMOTE END

TABLE FILE LISTOWOS
PRINT *
END

-MRNOEDIT END
 
Report This Post
Master
posted Hide Post
Heather

It sounds like the userid/password combination in the connection string does not have privilege to access the table. For security reasons you do not get a message just 0 records.

Remember that your original stored procedures can run with extra privileges on top of those granted to a user to SELECT.

Try running the SELECT statement (NOT the Stored Procedure) from Enterprise manager with the EXACT connection string you use and you prob will find 0 records retrieved.



Server: WF 7.6.2 ( BID/Rcaster) Platform: W2003Server/IIS6/Tomcat/SQL Server repository Adapters: SQL Server 2000/Oracle 9.2
Desktop: Dev Studio 765/XP/Office 2003 Applications: IFS/Jobscope/Maximo
 
Posts: 888 | Location: Airstrip One | Registered: October 06, 2006Report 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     How to Execute a Stored Procedure with Multiple Amper Variables

Copyright © 1996-2020 Information Builders