Interesting approach. Thanks, Charles
-----Original Message----- From: IBM Mainframe Discussion List [mailto:[email protected]] On Behalf Of Kirk Wolf Sent: Friday, September 06, 2013 10:16 AM To: [email protected] Subject: Re: Where environment variables set for batch POSIX programs? This is one area where z/OS UNIX is completely brain-dead (but not the only one!) In a rational UNIX environment, all Unix processes are descendants of the "init" process. z/OS Unix has an init process, and like other environments it is configured using /etc/init.options. The z/OS UNIX Init and Tuning walks you through setting up this file with the important environment variables, like TZ. But batch jobs that are dubbed as UNIX processes *don't from the init process in z/OS UNIX*. So, the environment variables set in /etc/init.options don't apply. How stupid is this? IBM is for sure aware of this - they document in MANY places how to set TZ for a batch job or started task. How nice is it to define your timezone in a thousand different places? We have batch C++ utilities as part of our product, and what we do is to (from the code) read /etc/init.options, parsing the -e lines and loading up the environment variables. Note that even though Init and Tuning says that /etc/init.options should be world-readable, a couple of our customers didn't so we print out a warning message if we can't read it. Its ugly, but at least you get the environment variables defined in /etc/init.options, which for most shops includes TZ. ---------------------------------------------------------------------- For IBM-MAIN subscribe / signoff / archive access instructions, send email to [email protected] with the message: INFO IBM-MAIN
