# UPLOAD PC FILE inside Natural 6.1.1 (Windows)

**URL:** <https://techcommunity.softwareag.com/t/upload-pc-file-inside-natural-6-1-1-windows/58840>\
**Category:** Forum\
**Tags:** Mainframe-Integration, EntireX\
**Created:** [January 15, 2005, 11:15pm UTC](https://techcommunity.softwareag.com/t/upload-pc-file-inside-natural-6-1-1-windows/58840 "2005-01-15T23:15:47Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![brad](https://avatars.discourse-cdn.com/v4/letter/b/59ef9b/32.png) [@brad](https://techcommunity.softwareag.com/u/brad)\
**Post date:** [January 15, 2005, 11:15pm UTC](https://techcommunity.softwareag.com/t/upload-pc-file-inside-natural-6-1-1-windows/58840/1 "2005-01-15T23:15:47Z")

</div>

I am posting my problem here since I wasn’t sure if there is another place I could post this. My problem is directly related to Natural 6.1.1. I would certainly appreciate any ideas you might have. A description of my problem is detailed below.  
  
In the relation to my problem, I am using Natural 6.1.1 (Windows) and I am receiving the error below when I try to execute the UPLOAD PC FILE statement to upload data from a text file outside of Natural.  
  
Error:  
  
NAT1599 Attempt to execute READ/WRITE WORK to non-existent file.  
-------------------------------------------------------------------------------  
TEXT:  
 Attempt to READ/WRITE WORK to non-existent file.  
EXPL:  
 The work file specified in the job control does not exist.  
ACTN:  
 Check allocation of work files.  
  
===============================  
  
Below is the code from my program that I am using to do the upload. I receive the NAT1599 at the UPLOAD PC FILE statement.  
  
DEFINE DATA  
LOCAL  
01 EMPLOYEE VIEW OF EMPL-FILE  
 02 SSN  
 02 LAST-NAME  
 02 FIRST-NAME  
 02 MIDDLE-INITIAL  
01 #SSN (A9)  
01 #WORK-FILE  
 02 #WF-SSN (N9)  
 02 #WF-LAST-NAME (A25)  
 02 #WF-FIRST-NAME (A25)  
 02 #WF-MIDDLE-INITIAL (A1)  
END-DEFINE  
UPLOAD PC FILE 7 #WORK-FILE(\*)  
 .  
 .  
 .  
END-WORK  
END  
  
I think the problem may be with how my work file is setup but I’m not sure. Could this be true? Do you have any ideas on how I can go about correcting this problem?  
  
Thanks.

---

<div class="post-metadata">

**Author:** ![Guest](https://sea1.discourse-cdn.com/techcommunity/user_avatar/techcommunity.softwareag.com/guest/32/75_2.png) [@Guest](https://techcommunity.softwareag.com/u/Guest)\
**Post date:** [January 17, 2005, 2:43am UTC](https://techcommunity.softwareag.com/t/upload-pc-file-inside-natural-6-1-1-windows/58840/2 "2005-01-17T02:43:31Z")

</div>

Hi Brad,  
  
you should define the work file to the Natural Profile you are using for your Natural session. You’ll most likely be using the default profile, which is _NATPARM_.  
  
To fix the problem start the _Natural Configuration_ Utility and then follow these steps:  
  
Step 1: Select the **_“NATPARM”_** profile  
Step 2: Select the **_“Natural Execution Configuration”_** parameter  
Step 3: Select **_“Workfiles”_**  
Step 4: Select **_“Work Files”_** this time  
Step 5: Select the work file you want to open, in this instance it will be work file 7.  
Step 6: Select the work file type, if it is a normal ASCII file then select **_“ASCII”_** or **_“Default”_**  
Step 7: Select the **_“Close Mode”_**. You can leave it on **_“Auto”_** , if you select **_“User”_** you will have to issue an explicit **_“Close Work”_** statement in your program.  
Step 8: Select the work file you want to open and upload from your program.  
Step 9: Save the **_“NATPARM”_** profile and open a new Natural session. When you execute your program now it should read the content of the work file.  
  
Hope this helps.  
  
Regards  
Theo

---

<div class="post-metadata">

**Author:** ![brad](https://avatars.discourse-cdn.com/v4/letter/b/59ef9b/32.png) [@brad](https://techcommunity.softwareag.com/u/brad)\
**Post date:** [January 27, 2005, 11:01pm UTC](https://techcommunity.softwareag.com/t/upload-pc-file-inside-natural-6-1-1-windows/58840/3 "2005-01-27T23:01:19Z")

</div>

Hi Theo,  
I wanted to offer a delayed thanks. I completed the steps you posted previously and it worked like a charm.  
  
Thanks again.  
Brad

---

<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:39pm UTC](https://techcommunity.softwareag.com/t/upload-pc-file-inside-natural-6-1-1-windows/58840/4 "2021-04-02T14:39:30Z")

</div>


