On 12/07/2018 3:22 AM, John McKown wrote:
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.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.
-- Andrew Rowley Black Hill Software ---------------------------------------------------------------------- For IBM-MAIN subscribe / signoff / archive access instructions, send email to [email protected] with the message: INFO IBM-MAIN
