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. Moving forward, myibi is our community platform to learn, share, and collaborate. We have the same Focal Point forum categories in myibi, so you can continue to have all new conversations there. If you need access to myibi, contact us at myibi@ibi.com and provide your corporate email address, company, and name.


Connect to myibi
Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     Remote server connection not working in MRE

Read-Only Read-Only Topic
Go
Search
Notify
Tools
Remote server connection not working in MRE
 Login/Join
 
Gold member
posted
Hi,
I am new to writing SQL in webfocus and executing it against DB.I wrote a SQL against SQL server, where i connected the DB using the remote connection.It is working fine in EDA server, but not in MRE.I feel that the connection string that i am using will work for EDA only, not for MRE.But i am not sure.Is there any specific settings to be done to run the SQL in MRE.Did anybody come across same issue or any forum discussion about this.Here is my code.
-SET &ECHO='ALL';
-SET XRETRIEVAL = ON
 SQL EDA SET SERVER EMPD
-REMOTE BEGIN
 ENGINE SQLMSS SET DEFAULT_CONNECTION EMP_DEV
 SQL SQLMSS PREPARE SQLOUT FOR
 SELECT name FROM Emp.dbs.Empl;
 END
 TABLE FILE SQLOUT
 PRINT *
 ON TABLE PCHOLD AS FAQLUDIA
 END
 -REMOTE END
 TABLE FILE FAQLUDIA
 PRINT *
 ON TABLE HOLD AS SHORT FORMAT HTMTABLE
 END
-HTMLFORM BEGIN
<HTML><HEAD><STYLE>TD {FONT-FAMILY: ARIAL; COLOR: BLUE; }
</STYLE></HEAD><BODY><DIV ALIGN="CENTER">
!IBI.FIL.SHORT;</DIV></BODY></HTML>
-HTMLFORM END  


Dev:
Dev Studio 7.1.6,Report Caster 7.1.1,Servlet
Local:
Dev Studio 7.1.6,Report Caster 7.1.1,Apache 5.0.2,
Win XP


 
Posts: 80 | Registered: March 21, 2007Report This Post
Expert
posted Hide Post
I don't know if this will help at all and I can't test it, but try adding -MRNOEDIT tags around the remote call.
quote:
Managed Reporting will not process the lines when evaluating the Managed Reporting procedure prior to sending it to the WebFOCUS Reporting Server. The lines of code will be passed without the -MRNOEDIT tags to the WebFOCUS Reporting Server.

Syntax:
 
-mrnoedit begin
focexec_code 
-mrnoedit end

Example:
-mrnoedit begin
SQL EDA SET SERVER EMPD
-REMOTE BEGIN
 ENGINE SQLMSS SET DEFAULT_CONNECTION EMP_DEV
 SQL SQLMSS PREPARE SQLOUT FOR
 SELECT name FROM Emp.dbs.Empl;
 END
 TABLE FILE SQLOUT
 PRINT *
 ON TABLE PCHOLD AS FAQLUDIA
 END
 -REMOTE END
 TABLE FILE FAQLUDIA
 PRINT *
 ON TABLE HOLD AS SHORT FORMAT HTMTABLE
 END
-HTMLFORM BEGIN
<HTML><HEAD><STYLE>TD {FONT-FAMILY: ARIAL; COLOR: BLUE; }
</STYLE></HEAD><BODY><DIV ALIGN="CENTER">
!IBI.FIL.SHORT;</DIV></BODY></HTML>
-HTMLFORM END   
-mrnoedit end


The -mrnoedit lines may not be in the correct location, so some experimentation may be required. Of course, this may not work at all, but it's worth a try.


Francis


Give me code, or give me retirement. In FOCUS since 1991

Production: WF 7.7.05M, Dev Studio, BID, MRE, WebSphere, DB2 / Test: WF 8.1.05M, App Studio, BI Portal, Report Caster, jQuery, HighCharts, Apache Tomcat, MS SQL Server
 
Posts: 10577 | Location: Toronto, Ontario, Canada | Registered: April 27, 2005Report This Post
Master
posted Hide Post
What Error Message are you getting




Scott

 
Posts: 865 | Registered: May 24, 2004Report This Post
Virtuoso
posted Hide Post
I do know that there needs to be a 'log on' to the database by the MRE application. Do you have that 'built in'? Your administrator should know.


Leah
 
Posts: 1317 | Location: Council Bluffs, IA | Registered: May 24, 2004Report This Post
Master
posted Hide Post
This runs code on EMPD which is not the default server attached to MRE

quote:

SQL EDA SET SERVER EMPD
-REMOTE BEGIN
ENGINE SQLMSS SET DEFAULT_CONNECTION EMP_DEV
SQL SQLMSS PREPARE SQLOUT FOR
SELECT name FROM Emp.dbs.Empl;
END
TABLE FILE SQLOUT
PRINT *
ON TABLE PCHOLD AS FAQLUDIA
END
-REMOTE END


On the remote server this chooses but does not define the connection.

quote:

ENGINE SQLMSS SET DEFAULT_CONNECTION EMP_DEV


Look in EDASPROF of the remote serve to find an entry like

ENGINE SQLMSS SET CONNECTION_ATTRIBUTES EMP_DEV/[id],[password][;database]

If no id and password are provided it will be attempting to connect through password passthrough. With a default server I know this can be achieved but with a remote server whether password passthru works or not I don't know.

If it does not you will have to code the connection with a guest id and password hard coded in EDASPROF (use server console to MD5 the password) that has enough rights to achieve what you're after.



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
Gold member
posted Hide Post
Francis,
Your approach works. i am able to see the output.Initially there was a blank white screen.
Thanks


Dev:
Dev Studio 7.1.6,Report Caster 7.1.1,Servlet
Local:
Dev Studio 7.1.6,Report Caster 7.1.1,Apache 5.0.2,
Win XP


 
Posts: 80 | Registered: March 21, 2007Report 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     Remote server connection not working in MRE

Copyright © 1996-2020 Information Builders