# NATTMP environment variable

**URL:** <https://techcommunity.softwareag.com/t/nattmp-environment-variable/78891>\
**Category:** Forum\
**Tags:** Adabas-Natural, Natural, Natural-on-Linux, Natural-Installation-and-Setup-on-Open-Systems\
**Created:** [August 30, 2008, 1:45am UTC](https://techcommunity.softwareag.com/t/nattmp-environment-variable/78891 "2008-08-30T01:45:43Z")\
**Posts on this page:** 10\
**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:** [August 30, 2008, 1:45am UTC](https://techcommunity.softwareag.com/t/nattmp-environment-variable/78891/1 "2008-08-30T01:45:43Z")

</div>

Hi everyone  
Have you ever heard about the $NATTMP environment variable?. The things is that I’ve been receiving a NAT1583 when I try ti print a report online from Natural. I found into the ServLine24 a report which mentions that environment variable.  
So when I use the ‘sag’ user to login I can generate the online report but when I use another kind of user to login I receive the NAT1583.  
The NATPARM definitions is at the device/report assignments:  
LPT1 AUTO 80 132 32767 $SAG/Procesos/imprime D. Where imprime is the following shell script:  
cat \> $HOME/Reportes/filexxx.txt  
exit 0The Natural program is:  
define printer (ors=1) output ‘LPT1’  
write (ors) ‘Esta es una prueba’  
end  
I really appreciate your help. Thanks in advanced.

Regards

---

<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:** [August 31, 2008, 3:57am UTC](https://techcommunity.softwareag.com/t/nattmp-environment-variable/78891/2 "2008-08-31T03:57:46Z")

</div>

Sounds like a permission problem to me, try to run that script from outside natural, using a non-sag user that doesn’t work when you run it from inside natural.

---

<div class="post-metadata">

**Author:** ![Matthias1](https://avatars.discourse-cdn.com/v4/letter/m/9fc348/32.png) [@Matthias1](https://techcommunity.softwareag.com/u/Matthias1)\
**Post date:** [September 1, 2008, 11:55am UTC](https://techcommunity.softwareag.com/t/nattmp-environment-variable/78891/3 "2008-09-01T11:55:51Z")

</div>

> [@Osman Sanchez](#):
>
> Have you ever heard about the $NATTMP environment variable?.

The description of NAT1583 says something about “TMP\_PATH in the Natural.INI file” …

> [@](#):
>
> cat \> $HOME/Reportes/filexxx.txt  
> exit 0

So every home-directory (for sag and for all other users) has to containa a subdirectory “Reportes”, right?

---

<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:** [September 2, 2008, 6:37am UTC](https://techcommunity.softwareag.com/t/nattmp-environment-variable/78891/4 "2008-09-02T06:37:01Z")

</div>

Hi Wolfgan,  
I just did what you recommended me and the non-sag user can run the shell script outside of Natural but inside of Natural it could not.

---

<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:** [September 2, 2008, 6:37am UTC](https://techcommunity.softwareag.com/t/nattmp-environment-variable/78891/5 "2008-09-02T06:37:47Z")

</div>

Hi Wolfgan,  
I just did what you recommended me and the non-sag user can run the shell script outside of Natural but inside of Natural it could not.

---

<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:** [September 2, 2008, 6:52am UTC](https://techcommunity.softwareag.com/t/nattmp-environment-variable/78891/6 "2008-09-02T06:52:45Z")

</div>

Matthias,  
Yes the NAT1583 descriptions mentions the TMP\_PATH in the NATURAL.INI, so I already checked it and found out a tmp.  
Yes every user has the Reportes directory defined.

---

<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:** [September 2, 2008, 7:10am UTC](https://techcommunity.softwareag.com/t/nattmp-environment-variable/78891/7 "2008-09-02T07:10:00Z")

</div>

Wolfgan/Matthias,  
I already compare the sag user and the non-sag user and both are looking well. So I can notice the following:

1. The home directory for the sag user is /opt/softwareag and the home directory for the non-sag user is /home/non-sag
2. Both users belongs to the sag group

In regards of the shell script it has full permisology follow you can see the permisology: -rwxrwxrwx 1 sag sag 262 2008-08-29 imprime.

I am afraid when the non-sag user try to run the shell script and it execute the cat command it can not create the filexxx.txt file. But why does the non-sag user cannot execute the cat command?. The filexxx.txt does not exist so Why does the sag user can create it?

Best Regards

---

<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:** [September 2, 2008, 7:14am UTC](https://techcommunity.softwareag.com/t/nattmp-environment-variable/78891/8 "2008-09-02T07:14:19Z")

</div>

The CU told me that He thinks that is a Natural problem and he also think that some Natural parameter definitions is missing. I don

---

<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:** [September 2, 2008, 9:20am UTC](https://techcommunity.softwareag.com/t/nattmp-environment-variable/78891/9 "2008-09-02T09:20:22Z")

</div>

Wolfgan/Matthias,  
The reason for the NAT1583 happened is because the tmp directory belongs to nat directory does not allow the non-sag user write on it. I changed the definitions using chmod command and now the non-sag user be able to write or create file on the tmp directory.

I read that the tmp directory is a Natural transient directory used as a kind of spool file. Does it?

Thanks a lot for your help.

Cheers

---

<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:50pm UTC](https://techcommunity.softwareag.com/t/nattmp-environment-variable/78891/10 "2021-04-02T14:50:50Z")

</div>

Closed on April 2, 2021, 2:50pm UTC


