# read  workfile (getting NAT1599)

**URL:** <https://techcommunity.softwareag.com/t/read-workfile-getting-nat1599/79334>\
**Category:** Forum\
**Tags:** Adabas-Natural, Natural, Natural-on-Linux\
**Created:** [October 22, 2008, 1:21pm UTC](https://techcommunity.softwareag.com/t/read-workfile-getting-nat1599/79334 "2008-10-22T13:21:54Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Justo](https://avatars.discourse-cdn.com/v4/letter/j/e36b37/32.png) [@Justo](https://techcommunity.softwareag.com/u/Justo)\
**Post date:** [October 22, 2008, 1:21pm UTC](https://techcommunity.softwareag.com/t/read-workfile-getting-nat1599/79334/1 "2008-10-22T13:21:54Z")

</div>

Hi,

I’m trying to read a workfile to create a new workfile on Natural Studio ver: 6.2.3 rev 7689, but I’m getting this error message

## NAT1599 Attempt to execute READ/WRITE WORK to non-existent file.

TEXT:  
Attempt to execute 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.

define data  
local  
1 #reg-in  
2 #cod-in (a03)  
2 #cod-in1 (a04)  
2 #desc-in1 (a79)  
2 #cod-in2 (a07)  
2 #desc-in2(a79)  
\*  
1 #reg-out  
2 #cod-out (a03)  
2 #cod-out1t (a04)  
2 #desc-out1(a79)  
2 #cod-out2 (a07)  
2 #desc-out2(a79)  
/\*  
1 #WORKFILE (A) DYNAMIC  
1 #WORKFILE2 (A) DYNAMIC  
1 #options  
2 workfile-folder (A) DYNAMIC const \<‘C:\Programm Files\Software AG\Natural\Natapps\Fuser\TEST\RES'\> /\* with backslash at end!  
2 user-logfile (A) DYNAMIC const \<’\tmp\user.log’\>  
1 #read (n08)  
1 #created (n08)  
end-define  
/\*

- create an name for workfile  
compress #options.workfile-folder ‘reg.txt’  
into #workfile leaving no

compress #options.workfile-folder ‘reg-1.txt’  
into #workfile2 leaving no

DEFINE WORK FILE 01 #workfile  
DEFINE WORK FILE 02 #workfile2

read work file 01 #reg-in  
\*  
add 1 to #read  
/\*  
at break of #reg-in.#cod-in  
move old(#reg-in.#cod-in) to #reg-out.#cod-out  
move old(#reg-in.#cod-in1) to #reg-out.#cod-in1  
move old(#reg-in.#desc-in1) to #reg-out.#desc-in1  
move old(#reg-in.#cod-in2) to #reg-out.#cod-in2  
move old(#reg-in.#desc-in2) to #reg-out.#desc-in2  
write work file 2 #reg-out  
add 1 to #created  
end-break  
end-work

display “=” #read “=”#created  
end

I don’t know why is not working :?: :?: any :idea:

thanks in advance for any suggestion

---

<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:** [October 22, 2008, 1:52pm UTC](https://techcommunity.softwareag.com/t/read-workfile-getting-nat1599/79334/2 "2008-10-22T13:52:38Z")

</div>

Do you really have a folder called “…\programm files..”  
with two mm’s ?  
Finn

---

<div class="post-metadata">

**Author:** ![Justo](https://avatars.discourse-cdn.com/v4/letter/j/e36b37/32.png) [@Justo](https://techcommunity.softwareag.com/u/Justo)\
**Post date:** [October 22, 2008, 7:13pm UTC](https://techcommunity.softwareag.com/t/read-workfile-getting-nat1599/79334/3 "2008-10-22T19:13:40Z")

</div>

Finn

Thank you. When I was doing this was very late and I was very tired and I did not realize the file’s path

I just removed one m and it worked as wonder

Thanks once again Finn

---

<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:51pm UTC](https://techcommunity.softwareag.com/t/read-workfile-getting-nat1599/79334/4 "2021-04-02T14:51:04Z")

</div>


