# How can I take a workfile generate under Natural RPC Server

**URL:** <https://techcommunity.softwareag.com/t/how-can-i-take-a-workfile-generate-under-natural-rpc-server/76839>\
**Category:** Forum\
**Tags:** Mainframe-Integration, EntireX\
**Created:** [May 30, 2008, 12:49am UTC](https://techcommunity.softwareag.com/t/how-can-i-take-a-workfile-generate-under-natural-rpc-server/76839 "2008-05-30T00:49:36Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![Osman\_Sanchez](https://avatars.discourse-cdn.com/v4/letter/o/ac8455/32.png) [@Osman\_Sanchez](https://techcommunity.softwareag.com/u/Osman_Sanchez)\
**Post date:** [May 30, 2008, 12:49am UTC](https://techcommunity.softwareag.com/t/how-can-i-take-a-workfile-generate-under-natural-rpc-server/76839/1 "2008-05-30T00:49:36Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Finn\_the\_Dane1](https://sea1.discourse-cdn.com/techcommunity/user_avatar/techcommunity.softwareag.com/finn_the_dane1/32/132_2.png) [@Finn\_the\_Dane1](https://techcommunity.softwareag.com/u/Finn_the_Dane1)\
**Post date:** [May 30, 2008, 5:26pm UTC](https://techcommunity.softwareag.com/t/how-can-i-take-a-workfile-generate-under-natural-rpc-server/76839/2 "2008-05-30T17:26:34Z")

</div>

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 😉

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

---

<div class="post-metadata">

**Author:** ![Osman\_Sanchez](https://avatars.discourse-cdn.com/v4/letter/o/ac8455/32.png) [@Osman\_Sanchez](https://techcommunity.softwareag.com/u/Osman_Sanchez)\
**Post date:** [May 30, 2008, 7:45pm UTC](https://techcommunity.softwareag.com/t/how-can-i-take-a-workfile-generate-under-natural-rpc-server/76839/3 "2008-05-30T19:45:13Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Douglas\_Kelly](https://sea1.discourse-cdn.com/techcommunity/user_avatar/techcommunity.softwareag.com/douglas_kelly/32/102_2.png) [@Douglas\_Kelly](https://techcommunity.softwareag.com/u/Douglas_Kelly)\
**Post date:** [May 31, 2008, 1:35pm UTC](https://techcommunity.softwareag.com/t/how-can-i-take-a-workfile-generate-under-natural-rpc-server/76839/4 "2008-05-31T13:35:14Z")

</div>

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)?

---

<div class="post-metadata">

**Author:** ![Osman\_Sanchez](https://avatars.discourse-cdn.com/v4/letter/o/ac8455/32.png) [@Osman\_Sanchez](https://techcommunity.softwareag.com/u/Osman_Sanchez)\
**Post date:** [June 4, 2008, 12:44am UTC](https://techcommunity.softwareag.com/t/how-can-i-take-a-workfile-generate-under-natural-rpc-server/76839/5 "2008-06-04T00:44:04Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Douglas\_Kelly](https://sea1.discourse-cdn.com/techcommunity/user_avatar/techcommunity.softwareag.com/douglas_kelly/32/102_2.png) [@Douglas\_Kelly](https://techcommunity.softwareag.com/u/Douglas_Kelly)\
**Post date:** [June 4, 2008, 8:57am UTC](https://techcommunity.softwareag.com/t/how-can-i-take-a-workfile-generate-under-natural-rpc-server/76839/6 "2008-06-04T08:57:58Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/techcommunity/original/3X/c/d/cd19967bb605d28a72d77eb83a1cae22f3df2eb8.svg) [@system](https://techcommunity.softwareag.com/u/system)\
**Post date:** [April 2, 2021, 2:49pm UTC](https://techcommunity.softwareag.com/t/how-can-i-take-a-workfile-generate-under-natural-rpc-server/76839/7 "2021-04-02T14:49:31Z")

</div>


