How can I take a workfile generate under Natural RPC Server

Hi everyone,
I just transform a legacy Natural application to a modern application using EntireX Communicator. The legacy application download to PC a workfile using Entire Connection emulation so what can I do to keep this functionality under EntireX Communicator.
The Natural subprograms runs on a UNIX machine and the Web Server runs on a Windows machine.
Thanks in advanced I really appreciate your help.

Regards

Hi Osman
For small and simple filetransfers from unix/win you can do it simple as in the subprog below.
I strongly recommend adding errorhandling.
And of course there might be some buffersized that need adjusting in the RPC-server and in the broker.

The subprog below reads a file in the unixfilesystem into a dynamic alpha, so all you need to do is take the “content” and do someting usefull on the client side.

  • and please do ask me for help with this - I’m no HTML/webclient guru :wink:

Finn

DEFINE DATA PARAMETER
1 FILENAME (A64)
1 CONTENT (A) DYNAMIC
END-DEFINE
DEFINE WORK FILE 1 FILENAME TYPE ‘UNFORMATTED’
READ WORK FILE 1 CONTENT
END

Hi Finn,
I am very sorry about it. In regards of your answer I would like to know how can I get each record from the web applications for example a .NET or Java or something like that. I am very rookie in a .NET or Java tools

Regards

Are you asking how to receive multiple records from the RPC server or are you asking how to open the result in a browser as a certain type (xls, txt, etc)?

That is, is the question how to get the browser to recognize your data as xml, xls, txt, etc (look for setting response content-type) or are you trying to understand how to transfer a variable amount of data via RPC (stateful conversations or stateless restart logic)?

Hi Douglas,
The second one options you mentioned could help me to solve the requirement. The only problem I could see is the long conversation stablished between the web application and the RPC Server. So, What I am trying to do is, get a workfile from the UNIX box once the Natural subprogram generate it. Do you have another idea? I really appreciate your help.

Best regards

The approach Finn describes should do what you are asking for then. If your files are too large to be transfered via a dynamic variable (up to 2gb, depending on your memory constraints), your conversation is going to be just as long as the Entire Connection transfers were - make sure you have lots of servers and lots of memory.
You should get some assistance from an experienced Java or .Net programmer to understand how to handle the data once you have received it in the client application.