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. Kirk Wolf Dovetailed Technologies http://dovetail.com On Fri, Sep 6, 2013 at 10:25 AM, Scott Ford <[email protected]> wrote: > Charles, > > The problem is a lot of customers don't understand LE CEEOPTS. It can be a > beast > > Scott ford > www.identityforge.com > from my IPAD > > 'Infinite wisdom through infinite means' > > > On Sep 6, 2013, at 10:26 AM, Charles Mills <[email protected]> wrote: > > > Perfect! Much grass. > > > > Charles > > > > -----Original Message----- > > From: IBM Mainframe Discussion List [mailto:[email protected]] On > > Behalf Of John McKown > > Sent: Friday, September 06, 2013 7:10 AM > > To: [email protected] > > Subject: Re: Where environment variables set for batch POSIX programs? > > > > I have the following in member CEEPRM00 in PARMLIB: > > > > /* NONCICS LE PARMS */ > > CEEDOPT( > > ALL31(OFF), > > STACK(,,BELOW) > > CBLQDA(OFF), > > COUNTRY(US), > > DEBUG, > > DYNDUMP(*USERID,DYNAMIC,NOTDUMP), > > ENVAR('TZ=CST6CDT'), > > LIBSTACK(8K,4K,FREE), > > STORAGE(NONE,NONE,NONE,8K) > > ) > > /* CICS LE PARMS */ > > CEECOPT( > > ALL31(OFF), > > STACK(,,BELOW), > > STORAGE(00,NONE,NONE,0K) > > ) > > /* 64 BIT GROUP */ > > CELQDOPT( > > ) > > > > ---------------------------------------------------------------------- > > For IBM-MAIN subscribe / signoff / archive access instructions, > > send email to [email protected] with the message: INFO IBM-MAIN > > ---------------------------------------------------------------------- > For IBM-MAIN subscribe / signoff / archive access instructions, > send email to [email protected] with the message: INFO IBM-MAIN > ---------------------------------------------------------------------- For IBM-MAIN subscribe / signoff / archive access instructions, send email to [email protected] with the message: INFO IBM-MAIN
