I got a Runtime-Error, when I use a Natural-SORT under Linux. “Open for work file 33 failed”. The Error occurs on the line with the “END-ALL” Statement.
I guess it has to do with the ADABAS-Sort-Arrea. But the SORT1 was correctly built by ADAFRM. The regarding DB???.INI is correct.
Thanks for answering that quick. Next (maybe stupid) question: Where can I find NATURAL-temp-directory?
The directory “/sag/nat/v61110/tmp” is obviously not the right one.
I did a search in the natparm-utility for “sort” and found SORTSZE, but no parameter for a tmp-path… :?:
This may be a long shot but try making sure that workfile 33 does NOT exist before you run the program. I have seen cases where Natural cannot open an existing file or overwrite it.
If this doesn’t work, try writing a little natural program to write one record to the same workfile. This will eliminate problems with SORT if it also fails,
ls -ld tmp
drwxrwxrwx 2 sag sag 12288 Mai 3 03:38 tmp
I tried out /tmp (a tmp-directory for every user) and a new directory /sag/tmp.
But another thing: In my desperation, I tried to produce the same error with natural for Windows. In that environment TMP_PATH is definitely NOT the directory for temporarly Natural-Files. It is %TMP%. You can set TMP_PATH to a directory where you got no writing/reading right. That doesn’t bother natural…
But natural for Linux has another behaviour. $TMP doesn’t seem to have any effects…
Natural for Linux tries to create a file in TMP_PATH with the following name:
[Username]_[etid]_33.SAG
I don’t know the meaning of “33”…
But the PROBLEM is: My user-assigned ETID contains a slash. And then, NAT1500 occurs while sorting.
I tried out all other LINUX-metacaracters (star, brackets, semicolon, …) - no problem at all. Even NEWLINE works. Only the simple slash causes a problem.
This makes sense, because the “simple slash” is the “direcory delimiter”, everything from /sag/nat/v61110/tmp/ to the slash within the ETID will be interpreted as a directory name …