read workfile (getting NAT1599)

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

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

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