# Trouble in opening a database in a deamon

**URL:** <https://techcommunity.softwareag.com/t/trouble-in-opening-a-database-in-a-deamon/57749>\
**Category:** Forum\
**Tags:** Adabas-Natural, Adabas, Adabas-Basics-on-Linux-Unix-Windows, Adabas-on-Windows-UNIX, Adabas-on-Linux\
**Created:** [June 21, 2005, 1:24pm UTC](https://techcommunity.softwareag.com/t/trouble-in-opening-a-database-in-a-deamon/57749 "2005-06-21T13:24:18Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![jpb](https://avatars.discourse-cdn.com/v4/letter/j/f475e1/32.png) [@jpb](https://techcommunity.softwareag.com/u/jpb)\
**Post date:** [June 21, 2005, 1:24pm UTC](https://techcommunity.softwareag.com/t/trouble-in-opening-a-database-in-a-deamon/57749/1 "2005-06-21T13:24:18Z")

</div>

Hi,

I used to develop a deamon (process started by InetD) on Adabas version 3.1.1.29 over hpux 11.00. The main objective of this process was to insert some data in a database and it was running well.

Now we migrate on Adabas version 3.3.2 over hpux 11.11, I rebuild my program ans it’s no longuer working. The error code is 148 and there is nothing in “add2” of the reply structure.

The think I do :  
I take a part of the sample given by SAG, and I put some modification to make an insert in my database.  
From the shell running as root with “sagenv” imported it works well.  
The same program started by “inetd” does’nt work, I try to put exacltly the same environnement vars but I’ve still got error 148.

Does somebody know the exact list of environment var needed by such a program ?

Anybody can help ?

Thanks in advance.

Jean-Paul BLANC

---

<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:** [June 22, 2005, 3:33pm UTC](https://techcommunity.softwareag.com/t/trouble-in-opening-a-database-in-a-deamon/57749/2 "2005-06-22T15:33:23Z")

</div>

Hello Jean-Paul,  
it seems that the variable ADALNK is not set properly. Can you check that ?  
regards  
Kurt Vasconi

---

<div class="post-metadata">

**Author:** ![anon98178625](https://avatars.discourse-cdn.com/v4/letter/a/858c86/32.png) [@anon98178625](https://techcommunity.softwareag.com/u/anon98178625)\
**Post date:** [November 2, 2005, 12:00am UTC](https://techcommunity.softwareag.com/t/trouble-in-opening-a-database-in-a-deamon/57749/3 "2005-11-02T00:00:47Z")

</div>

Hi,

perhaps your daemon is linked without -lpthread and -lcl. These  
two flags are documented in ADABAS v3.3.3 in C example makefile.

I think these two options are necessary to use ADALNK in this  
ADABAS version \>v3.3.2 .

My 2 cents,

Thorsten

---

<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:** [November 2, 2005, 5:19pm UTC](https://techcommunity.softwareag.com/t/trouble-in-opening-a-database-in-a-deamon/57749/4 "2005-11-02T17:19:40Z")

</div>

Hi Jean-Paul,

The problem could be that LD\_LIBRARY\_PATH by security reasons is unset by the operating system for your daemon.

Either run sagenv explicitely within your daemon (this will set LD\_LIBRARY\_PATH) or just set $ADALNK to $ADADIR/$ADAVERS/libadalnknc.so before you start.

---

<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:38pm UTC](https://techcommunity.softwareag.com/t/trouble-in-opening-a-database-in-a-deamon/57749/5 "2021-04-02T14:38:51Z")

</div>


