On 12/07/2018 3:22 AM, John McKown wrote:
​I've seen a lot of UNIX programs which implement the same concept using
shell environment variables. Simple, universal almost, examples are
${HOME}, ${TMPDIR} (and variants), ${CLASSPATH} for Javca, ${PATH}​ for an
//STEPLIB equivalent.

I have a PERL script which implements this. When run, you can specify the
"database name" (PostgreSQL) using --dbname= on the command. If not
specified, it will look for the DBNAME environment variable. If neither,
then it takes a default.
This works OK except when it doesn't. I recently encountered a problem where the command implicitly sourced /etc/profile. Which meant that things broke when /etc/profile changed the value of the environment variable.

--
Andrew Rowley
Black Hill Software

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN

Reply via email to