TZN0-171B-H0
TimeZoNe/400(TZN/400)
TZN/400 (c) Version 7.1.B
Copyright (c) 2001, 2018 INPRO International, Inc.
All Rights Reserved
CONTENTS
PRODUCT OVERVIEW
TimeZoNe/400 (TimeZoNe Simulation Utility)
Runs on OS/400 Version 6.1.0 and higher, and all preceding Versions
Going International? Users in 12 Countries!!!
Consolidating LPARs!!!
iSeries can tell time in your TimeZoNe
What is TZN/400 (TimeZoNe/400)?
SOLVE TIMEZONE ISSUES:
INPRO International announces TimeZoNe/400 (TZN/400) Version 7.1.B
TZN/400 (TimeZoNe/400 Simulation Utility) is a Timezone tool that
allows you to override the time based on the differential between
the users timezone and the systems timezone thru the year 3000, including support for
automatic rules driven Daylight Savings Time(DST) all around the world.
All this without costly LPAR support. The DDS/RPG/COBOL/ILE/Query/SQL(via APIs)
called routines for TIME will now look to your users timezone offset.
Takes the effort out of rewriting 9,000 modules or expensive LPAR
support.
FEATURES
- Runs on OS/400 Version 6.1.0 or higher, and all preceding Versions
- User VIEW of system in their own TimeZoNes, spooled output, submitted jobs, messages etc. shows users view in Hong Kong, New York or New Zealand not yesterday.
- Start Downloading FREE Trial ASAP
ADVANTAGES
- Works at the Object Level so no recompiling etc. involved.
- One place to override timezone/DST functions at the User level, huge advantage over UNIX where every program must know.
- No additional costs iSeries LPARs free user ASP (2-32)
- Will run on Security Level 40 systems
NOTE:This is an overview of
the main concepts of
TimeZoNe/400.
REQUIREMENTS
OS/400 6.1.0 or higher
timeCALendar/2000 CAL/2000 Version 5.1.2 or greater from INPRO,
for rolling time and date calculations support.
If you are upgrading from TZN213 or earlier you must run ADDTZNRTGE command to add a routing entry to where jobs submitted from interactive users were running, ie QBATCH subsystem.
BATCH CONTROL OPTIONS
START HERE
- All TZN/400 installation activities should be done as QSECOFR profile(NOT just a QSECOFR Group profile), on a quiet system (no tzn users running)(use WRKOBJLCK command checking locks).
- After installation is completed, see
FTP STYLE INSTALLATION
options.
- You must immediately UNLOCK, see
UNLOCK PRODUCT.
NOTE:Product MUST be unlocked prior
to doing anything, email or call now to obtain
your Trial Codes.
- STOP HERE. Install and
UNLOCK CAL/2000 Version 5.1.2 or higher.
- Daylight Savings Time (DST) RULES MUST be created (minimum of 2) by using the, see TZNEXE/CFGTZN qualified command. Contact
Product Support with questions, but basically if your USER is in Austin, TX,
USA that is (S)ierra 01 (GMT-06:00) from the GMT reference point. If your SYSTEM is in New York, NY, USA that
would be (R)omeo 01 (GMT-05:00) from GMT. Setup the rules in (S)ierra 01 and (R)omeo 01 for START DST month 03, day of week 7, week position 2, at 02:00
and END DST month 11, day of week 7, week position 1 at 02:00, Offset to GMT (when you are in DST usually an offset to GMT is one hour
less than STANDARD Time Offsets on this side of GMT, on the other side of GMT one hour greater(springing forward in time, expressed in absolute terms))
Link to World Wide TimeZoNe Map.
NOTE:Sub-zone of 00=*none (no DST followed in that location)
ie. users in Tokyo who do not use DST would simply be in timezone (I)ndia (I00)
- For a system in New York scenario, using the CRTTZNUSR command create a User of *SYSTEM (as User) to locate the iSeries main system.
CRTTZNUSR USRPRF(*SYSTEM) TIMEZONE(*ROMEO) SUBZONE(1)
NOTE:If any user anywhere in the world has a special rule, then the *SYSTEM must be in a sub-zone with it's rules known to TZN/400, and you
must use the TZN/400 command CHGSYSTIM when changing the time or date for the *SYSTEM.
- Using the CRTTZNUSR command set up each USER (not in the *SYSTEM timezone) for the timezone they are
in.
CRTTZNUSR USRPRF(TESTUSER) TIMEZONE(*SIERRA) SUBZONE(1)
- Make TZNEXE/SETTZN the first executable line in the users initial startup program called.
- Set up your Batch Environments ROBOT BATCH CONTROL OPTIONS
- Use the TZNEXE/CHGSYSTIM command CHGSYSTIM TIMETYPE(*SYSVAL_QTIMZON) DATE(*SAME) TIME(*SAME) with the new time Type: *SYSVAL_QTIMZON. Only use if the system value QTIMZON
is correctly set for system's Time Zone.. (Automatic DST if required in any zone)
- CALL TZN910 (to verify your setup)
TIMEZONES WORLDWIDE
GMT Offset | Location | TZN/400 Zone |
(GMT-10:00) | Hawaii | (W)hiskey |
(GMT-09:00) | Alaska | (V)ictor |
(GMT-08:00) | Pacific Time(US & Canada), Tijuana | (U)niform |
(GMT-07:00) | Arizona | (T)ango |
(GMT-06:00) | Central Time(US & Canada) | (S)ierra |
(GMT-05:00) | Eastern Time(US & Canada) | (R)omeo |
(GMT-03:00) | Brasilia | (P)apa |
(GMT) | Doublin, Edinburgh, Lisbon, London | (Z)ulu |
(GMT+01:00) | Brussels, Copenhagen, Madrid, Paris, Vilnius | (A)lpha |
(GMT+09:00) | Osaka, Sapporo, Tokyo | (I)ndia |
(GMT+09:30) | Darwin | Custom (I)ndia subzone |
(GMT+etc..) | Etc. | Etc. |
SAMPLE CODE
- TZNEXE/SETTZN (while logged on as one of your users that were setup)
- CALL TZN910 (to verify your setup)
TZN/400 puts commands like WRKSPLF, WRKSBMJOB and others in the TimeZoNe of the user using them
if they have issued the SETTZN command and are enrolled in TZN/400 itself.
Link TimeZoNe/400 the Movie
REFERENCE MATERIAL
SCREEN CAPTURES
CRTTZNUSR
NOTE:If you place the user definition in your own
library, the SETTZN command will look first in
library TZNEXE then follow the *libl looking for
one for this user. If none are found then TZN/400
will not load for the job.
SETTZN
NOTE:Put this command in startup procedure for
any user in a different timezone, or all users
allowing a no user found in TZN/400 to default
to Standard System Time. For Stored Procedures
being run remotely use the special program
SETTZNA to determine the true remote user id.
(call settzna)
CFGTZN
NOTE:This command is a must if any users are
going to have a RULE in which case the *SYSTEM must
have a RULE. This is a standard world timezone letter code. You can have up to 24 subzones within a timezone for daylight
savings.
CHGSYSTIM
NOTE:This command should be used to change the system date and time
when the *SYSTEM rule is not the base rule "00" for that zone. TIMETYPE Standard/Daylight
savings time tells TZN/400 that the system date or time was changed to Standard Time or
Daylight Savings Time (*STD/*DST). In the DATE parameter place a valid date or *SAME
if it is not changing. In the TIME parameter place a valid time or *SAME if it is
not changing. You can use CHGSYSTIM TIMETYPE(*SYSVAL_QTIMZON) DATE(*SAME) TIME(*SAME)
with the new time Type: *SYSVAL_QTIMZON . Only use if *SYSVAL_QTIMZON is correctly set for system's
Time Zone.. (Automatic DST if required in any zone)
TimeZone A01 Sample Rule
TimeZone Validate Program Screen
Field Definitions
Field | Definition |
Standard Time Offset From GMT/UTC | Standard time offset from GMT/UTC for selected time zone |
Day Light Savings Starting Month | Month within which the day light savings time starts/begins |
Day Light Savings Starting Day | Day within which the day light savings time starts/begins. Place zeros here if the location does not have fixed day |
Day Light Savings Starting Day Of The Week Number | Day of the week which the day light savings time takes affect |
Day Light Savings Starting Week Of The Month | Day of the week position within the month which the day light savings time takes affect
ie..First Sunday of the month: day of the week would be 7 and week of the month would be 1.
Last Sunday of the month: day of the week would be 7 and week of the month would be 9.
|
Day Light Savings Starting Time | Time Day Light Savings time starts/begins |
Day Light Savings Ending Month | Month within which the day light savings time ends |
Day Light Savings Ending Day | Day within which the day light savings time ends. Place zeros here if the location does not have fixed day |
Day Light Savings Ending Day Of The Week Number | Day of the week which the day light savings time takes affect |
Day Light Savings Ending Week Of The Month | Day of the week position within the month which the day light savings time takes affect |
Day Light Savings Ending Time | Time Day Light Savings time ends |
Day Light Savings Offset Hours | Day light savings offset hours from GMT/UTC |
Day Light Savings Offset Minutes | Day light savings offset minutes from GMT/UTC |
NOTE:
Offsets to GMT are in numeric value offset
during RULE period, usually 1 hour less than
Standard. Recommend using a RULE base on other than
day of month, ie. Day of Week etc. Special DST
rule (always in rule) set DST Start Month=99
AUTHORITY ADOPTION LIST
This should have happened during the install procedure, but if not...
Change Program (CHGPGM)
Type choices, press Enter.
Program . . . . . . . . . . . . PGM > xxxTZN
Library . . . . . . . . . . . > TZNEXE
Optimize program . . . . . . . . OPTIMIZE *YES
User profile . . . . . . . . . . USRPRF *owner
Use adopted authority . . . . . USEADPAUT *yes
Remove observable info . . . . . RMVOBS *NONE
Enable performance collection: ENBPFRCOL
Collection level . . . . . . . *SAME
Procedures . . . . . . . . . .
Force program recreation . . . . FRCCRT *NO
NOTE:This command CHGPGM
will allow the programs for
each of the commands listed
in the table below to have
an owner that has the
authority to CHGSYSLIBL and
*ADOPT that owner's authority
when running this command.
This eliminates any private
authority concerns you might
have otherwise.
COMMAND PROCESSING PROGRAMS
Command | CPP |
ADDTZN | ADDTZN |
RMVTZN | RMVTZN |
SETTZN | SETTZN |
*NONE | SETTZNA |
*NONE | TZNAPI04 |
*NONE | TZNAPI04A |
PRINTING RULES
PRTTZNRUL
NOTE:This command will print all the rules you have
defined and the starting base rules(00).
UNLOCK PRODUCT
UNLOCK
NOTE:Qualify this command, TZNEXE/UNLOCK to avoid
confusion with other UtilityZone Products on your
system, these are the long Trial Codes you obtained
from us.
BATCH CONTROL OPTIONS
ADDTZNRTGE
NOTE: There is a SBMJOB command in library TZNEXE pointing to a routing entry of
CMPVAL(TZNINPRO), this may be a problem if your doing any other routing entry of your own.
If you are upgrading from TZN213 or earlier you must run ADDTZNRTGE command to add a
routing entry to where jobs submitted from interactive where running, ie QBATCH subsystem.
ROBOT BATCH CONTROL OPTIONS
Scenario 1
Add the call to SETTZN prior to the actual program being called. As long
as the user defined on the robot job is known to TZN/400 all should work.
RBT292 ROBOT Command Entry 09:09:50 SxxxxxD
Commands for jobs named: GCXCLKSUM
Options
1=Select 4=Delete 7=Insert
Opt Seq Command Error
10 CALL PGM(TZNEXE/SETTZN) C
20 CALL PGM(GCPRD/GCXCLKSUM) C
Scenario 2
Running jobs in ROBOT for three different time zones. You handle it
by wrapping a CL program around the programs being scheduled in Robot. The
CL calls SETTZN prior to executing the first RPG program, so subsequent
activity in the job is executed in the local TimeZone time, and calls
RMVTZN at the end. The job itself is scheduled in Robot based on the
A/S400 system time, not the local TimeZone time, and is run under a Robot
user profile specifically set up for the time zone in question.
For example, we schedule a job for Japan at 17:30 our time in Robot. The
program being called by Robot executes SETTZN first so the transactions
created are timestamped 6:30 am the next day, since Japan is currently 13
hours ahead of us.
Scenario 3
The most inovative solution for ROBOT involves these steps:
- Change the RBTSLEEPER subsystem in RBTSYSLIB
- Under Job Submission Options, Subsystem in question, Profile in question (defined in
TZN/400), Jobq in question (important)
- Add TZNEXE to Subsystem System library list entry
- Add Routing entry 9999 SETTZN/QGPL with a Compare Value of *ANY
- Coding follows:
PGM
CHGSYSLIBL LIB(TZNEXE)
MONMSG MSGID(CPF0000)
SETTZN
CALL PGM(QCMD)
ENDPGM
Scenario 4
Our standard method of doing BATCH jobs.
ADDTZNRTGE SBSD(QGPL/DALE) SEQNBR(8888)
Runs the following command: ADDRTGE SBSD(x/y) SEQNBR(z) CMPVAL(TZNINPRO) PGM(TZNEXE/TZNAPI09) CLS(QSYS/QBATCH)
x is the subsystem description library name
y is the subsystem description name
z is the routing entry sequence number
Note: TZNAPI09 is used here. (Code Below)
PGM
TZNEXE/SETTZN
CALL PGM(QCMD)
ENDPGM
Note: TZNAPI09A is used here. (Code Below to Drill Down to Current User)
PGM
TZNEXE/SETTZNA
CALL PGM(QCMD)
ENDPGM
Application Programming Interfaces(APIs)
All TZN APIs assume that TZNEXE and CALEXE are in the library list somewhere.
Also all parameters are required and the system matches its time
zone / sub zone in all rules.
Program: TZNAPI01 - Convert Date & Time From 1 Time Zone To Another Time
Zone.
Param 1: From Time Zone / Sub Zone (3 Char, Format Zone Letter / Sub Zone Number Ex: A01) - Input
Param 2: From Date (8 Char, Format yyyymmdd ex: 20070118) - Input
Param 3: From Time (8 Char, Format hhmmssxx ex: 22301001) - Input
Param 4: To Time Zone / Sub Zone (3 Char, Format Zone Letter / Sub Zone Number Ex: R01) - Input
Param 5: To Date (8 Char, Format yyyymmdd ex: 20070118) - Output
Param 6: To Time (8 Char, Format hhmmssxx ex: 22301001) - Output
Param 7: Error Message ID (7 Char, ex: TZN1002) If blank no errors found - Output
Program: TZNAPI02 - Get Current Date & Time For A Time Zone.
Param 1: To Time Zone / Sub Zone (3 Char, Format Zone Letter / Sub Zone Number Ex: R01) - Input
Param 2: To Date (8 Char, Format yyyymmdd ex: 20070118) - Output
Param 3: To Time (8 Char, Format hhmmssxx ex: 22301001) - Output
Param 4: Error Message ID (7 Char, ex: TZN1002) If blank no errors found - Output
Program: TZNAPI07 - Gets System Current Date/Time Used by TZN910
Param 1: TimeStamp Character length 26 ex: 2008-11-13-07.13.09.811899 - Output
Program: TZNAPI09 - Routing Step Program
Param 1: None
Program: TZNAPI10 - Gets Current Timezone offset including support of Daylight Savings Time for a User Profile.
Param 1: User Profile Character length 10 this is the user profile that is set up in TimeZone/400 – Input
Param 2: Time Zone Offset Character length 6 this is the current time zone offset including support of Daylight Savings Time
for the user profile value: [+/-]HH:MM Example: -05:00) – Output
Param 3: Error Message ID Character length 7 (ex: TZN0002) a specified error if user is not set up in TimeZone/400.
If blank no errors found – Output
Rules For TZNAPI10
1) User does not need SETTZN* to have been called, just TZNEXE in library list.
Program: TZNAPI30 - Gets Current User Zone Time Date/Time For User in SETTZN.
Param 1: TimeStamp Character length 26 ex:> 2008-11-13-08.13.09.811899 - Output
Program: TZNAPI30A - Gets Current User Zone Time Date/Time For User in SETTZNA.
Param 1: TimeStamp Character length 26 ex:> 2008-11-13-08.13.09.811899 - Output
Program: TZNAPI30B - Gets Current User Zone Time Date/Time For User in SETTZN with
user definition in any library other than TZNEXE.
Param 1: TimeStamp Character length 26 ex:> 2008-11-13-08.13.09.811899 - Output
Rules For TZNAPI30*
1) User does not need SETTZN* to have been called, just TZNEXE and CALEXE in library list.
2) User needs Definition Data Area in TZNEXE or in the list library for TZNAPI30B.
3) User Definition Data Area Requires Valid Time Zone.
4) User uses TZNAPI30 when Definition Data Area is in library TZNEXE and is STATIC
5) User uses TZNAPI30A when Definition Data Area is in library TZNEXE and is DYNAMICLY changing
6) User uses TZNAPI30B when Definition Data Area is in libary list but not in TZNEXE and is STATIC.
If the TZNAPI30* program returns blanks/spaces one of the above rules not followed..
High Availability Objects
The exclude replacation objects are ( tznexe/tznctl *dtaara and calexe/inprocal *usrspc )
ERROR MESSAGES
See TZNEXE/TZNMSGF for error messages.
STATEMENT OF DIRECTION
Support for WRKSPLF in Users timezone (in prior version for OS 6.1.0)
Support for IBM License Internal Keys Code API (in prior version for OS 6.1.0)
Support for SNDNETF/WRKNETF (in prior version for OS 6.1.0)
Support for DSPBNDDIR (in prior version for OS 6.1.0)
Support for rolling date formats (in prior version for OS 6.1.0)
Support for API for current offset for a User (in prior version for OS 6.1.0)
Support for SNDTCPSPLF command (in prior version for OS 6.1.0)
Support for skip STRSQL qsys2 user info command (in prior version for OS 7.1.0)
Support for skip DSPJRNRCVA user info command (in this version for OS 7.1.0)
tzn71b - https://inpro.box.com/s/5qxe8k4cgqp5g7d8nt4igl3ozmg2ryx5
cal512 - https://inpro.box.com/s/jg8pia3d1jmbvtsv2fc20t65yeeebk9m
INPRO International, Inc., 108 Wild Basin Rd. S, Suite 250, Austin, TX 78746
(800) 63-INPRO, (512) 320-9107, sales@inprointernational.com, www.inprointernational.com