Hi, tks for your quick reply.
Unfortunately I need to check on various operating systems (including W2000, Linux, AIX, Solaris, HP-UX).
The "db2 list db directory" commands works even if db2 is stopped, and moreover if no database is present, it returns an empty list.
I need a command (or a script) that returns a different errorlevel/exitcode if the instance is running or not.
I need this as a "precheck" in order to determine if ahould try to create my own database or not.
Hope this clarify.
Tks