Focal Point Banner
Community Center Education Summit Technical Support User Groups
Let's Get Social!

Facebook Twitter LinkedIn YouTube
Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     Executing procedure on remote server
Go
New
Search
Notify
Tools
Reply
  
Executing procedure on remote server
 Login/Join
 
Platinum Member
posted
I'm trying to use the EXEC command to run a procedure on a remote server. The [AT server] part of the syntax is being ignored, and the version of the focexec that resides on the local server is run, rather than the one on the remote server.

How might I get this to work?


WebFOCUS 7.6.11, Linux, HTML, PDF, AHTML, EXCEL
 
Posts: 100 | Registered: September 15, 2010Reply With QuoteReport This Post
Expert
posted Hide Post
What code are you using ?
Can you post it ?


Waz...

Prod:WebFOCUS 7.6.10/8.1.04Upgrade:WebFOCUS 8.2.06OS:LinuxOutputs:HTML, PDF, Excel, PPT
In Focus since 1984
Know The Code

 
Posts: 6132 | Location: 33.8688° S, 151.2093° E | Registered: October 31, 2006Reply With QuoteReport This Post
Platinum Member
posted Hide Post
For testing, I'm using this in the main focexec:

  
EXEC EMPDATA AT server_name


I've tried both the IP address and the server name for server_name.


The EMPDATA procedure is:

  
TABLE FILE EMPDATA
    SUM
        SALARY
    BY DIV
    BY DEPT
END


WebFOCUS 7.6.11, Linux, HTML, PDF, AHTML, EXCEL
 
Posts: 100 | Registered: September 15, 2010Reply With QuoteReport This Post
Virtuoso
posted Hide Post
From the help-file:
quote:
You can call a procedure from another procedure with the EXEC command. The called procedure must be fully executable. It behaves as a completely separate procedure, with its own content. It cannot use any local variables (&variables) defined by the calling procedure (unless they are explicitly passed to the called procedure on the command line). However, the executed (called) procedure can use any global variables (&&variables) that have been defined in the calling procedure.
There is nothing that indicates that you can use it like you did to cause it to runon a different server. The way to do that is to use the -REMOTE command set.
The syntax you used is valid for MAINTAIN only...


GamP

- Using AS 8.2.01 on Windows 7 - IE11.
in Focus since 1988
 
Posts: 1960 | Location: Netherlands | Registered: September 25, 2007Reply With QuoteReport This Post
Member
posted Hide Post
GamP is right stating EXEC AT is MAINTAIN syntax whereas in a WebFOCUS procedure you would do :
REMOTE DEST=
-REMOTE BEGIN
EX
-REMOTE END

In both case you need to have in the server communication configuration file (odin.cfg) [where your code is executing) the definition of the remote server. This is something that looks like (from memory)
NODE=
BEGIN
CLASS=CLIENT
HOST=ip_address_of_your_remote_machine
PORT=your_remote_server_port
END
You can configure this REMOTE Server from the adapter tab on your local server console.
 
Posts: 11 | Location: Information Builders France | Registered: May 22, 2003Reply With QuoteReport This Post
Virtuoso
posted Hide Post
JBK --

You did not indicate the nature of the interaction you are trying to accomplish.
Do you need to pass local data to the remote server?
Do you need the remote server to pass back an answer-set to the local server?
 
Posts: 1925 | Location: NYC | In FOCUS since 1983 | Registered: January 11, 2005Reply With QuoteReport This Post
Platinum Member
posted Hide Post
j.gross,

I will need the focexecs on the remote servers to create hold files to be passed back to the local server for reporting.


WebFOCUS 7.6.11, Linux, HTML, PDF, AHTML, EXCEL
 
Posts: 100 | Registered: September 15, 2010Reply With QuoteReport This Post
Expert
posted Hide Post
Is the call being done from MAINTAIN ?

Please check the previous posts.

Use REMOTE for FOCUS, and EXEC AT with MAINTAIN.


Waz...

Prod:WebFOCUS 7.6.10/8.1.04Upgrade:WebFOCUS 8.2.06OS:LinuxOutputs:HTML, PDF, Excel, PPT
In Focus since 1984
Know The Code

 
Posts: 6132 | Location: 33.8688° S, 151.2093° E | Registered: October 31, 2006Reply With QuoteReport This Post
Platinum Member
posted Hide Post
The call is not being done in Maintain.


WebFOCUS 7.6.11, Linux, HTML, PDF, AHTML, EXCEL
 
Posts: 100 | Registered: September 15, 2010Reply With QuoteReport This Post
  Powered by Social Strata  
 

Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     Executing procedure on remote server

Copyright © 1996-2018 Information Builders, leaders in enterprise business intelligence.