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]Executing MSSQL stored procedure from WebFocus

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[Solved]Executing MSSQL stored procedure from WebFocus
 Login/Join
 
Platinum Member
posted
I need to run a MSSQL stored procedure to update the view I report against.

I do not need to pass any params, or get any data from the table with this stored procedure. I just need it to run.

I tried this:

 
ENGINE SQLMSS SET DataAdapterName;
SQL SQLMSS
EX StoredProcedureName;
TABLE FILE SQLOUT
PRINT *
ON TABLE HOLD AS SQLOUT
END 


But I am getting an error when I try to run:

Error parsing report request
>ENGINE<
ENGINE SQLMSS SET DataAdapterName  

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


prod: WF 7.7.03 platform IIS on Windows 2007, databases: Oracle, , MSSQL

 
Posts: 133 | Location: Orlando, FL | Registered: August 04, 2005Report This Post
<JG>
posted
quote:
;

Definately not needed on the engine command
 
Report This Post
Platinum Member
posted Hide Post
Still get the same error after removing the ;


prod: WF 7.7.03 platform IIS on Windows 2007, databases: Oracle, , MSSQL

 
Posts: 133 | Location: Orlando, FL | Registered: August 04, 2005Report This Post
Expert
posted Hide Post
This works for us:

 
-SET &CONNECTION = IF &SERVER_NAME EQ '11.0.1.111' OR 'qa_env' THEN  'XXXPROD1' ELSE 'XXXPROD2'; 
SQL SQLMSS SET SERVER &CONNECTION
SQL SQLMSS EX DATABASE_NAME.DBO.PROD_WF_StoredProcedure;
-RUN
TABLE FILE SQLOUT
SUM  
    COLUMN_NAMES ...
WHERE   ...;
ON TABLE HOLD AS WHATEVER FORMAT ALPHA
END
-RUN


hth

Tom


Tom Flynn
WebFOCUS 8.1.05 - PROD/QA
DB2 - AS400 - Mainframe
 
Posts: 1972 | Location: Centennial, CO | Registered: January 31, 2006Report This Post
Platinum Member
posted Hide Post
Still getting parsing error on the first line. No matter what I put on the first line I am getting parsing error.

Can I paste the SQL code from the stored procedure
in to a SQL report and not use the stored procedure on the SQL server at all?


prod: WF 7.7.03 platform IIS on Windows 2007, databases: Oracle, , MSSQL

 
Posts: 133 | Location: Orlando, FL | Registered: August 04, 2005Report This Post
Expert
posted Hide Post
inline SQL procedure:

  
-* File Variance_Load.fex
ENGINE SQLMSS SET DEFAULT_CONNECTION CLE1DV005
SQL SQLMSS PREPARE SQLOUT FOR
SELECT
     a.name   AS 'TABLE_NAME'
    ,b.name   AS 'Column_Name'
    ,b.length AS 'Length'
    ,c.name   AS 'Format'
FROM
  DW_ProjAcct.dbo.sysobjects a
 ,DW_ProjAcct.dbo.syscolumns b
 ,DW_ProjAcct.dbo.systypes   c
WHERE a.id = b.id
AND   b.xtype = c.xtype
AND  (a.xtype IN ('u','v'))
;
END
SET ASNAMES = ON
DEFINE FILE SQLOUT
   MEASURES/A128 = IF Format     IN ('int','decimal','float') THEN Column_Name ELSE ' ';
   SORT01/A128   = IF NOT Format IN ('int','decimal','float') THEN Column_Name ELSE ' ';
   DRILL01/A128  = IF SORT01 EQ ' ' THEN '- - - None - - -' ELSE SORT01;
   DRILL02/A128  = IF SORT01 EQ ' ' THEN '- - - None - - -' ELSE SORT01;
END
TABLE FILE SQLOUT
SUM
 MEASURES
  BY TABLE_NAME
  BY MEASURES NOPRINT
WHERE MEASURES NE ' ';
 ON TABLE HOLD AS HOLD1
END
-RUN


hth, going golfing...

Tom


Tom Flynn
WebFOCUS 8.1.05 - PROD/QA
DB2 - AS400 - Mainframe
 
Posts: 1972 | Location: Centennial, CO | Registered: January 31, 2006Report This Post
Platinum Member
posted Hide Post
Although you are only trying to execute the sotred procedure, webfocus wants the user account to have write permissions also.


prod: WF 7.7.03 platform IIS on Windows 2007, databases: Oracle, , MSSQL

 
Posts: 133 | Location: Orlando, FL | Registered: August 04, 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     [Solved]Executing MSSQL stored procedure from WebFocus

Copyright © 1996-2020 Information Builders