CA Date Simulator is a tool that alters the results an application or job receives in response to time and date requests. It alters the time and date for specified jobs only. Without CA Date Simulator, time and date sensitive testing would require resetting the system clock.
The system clock is traditionally set to Universal Time (formerly Greenwich Mean Time). However business applications generally operate using LOCAL TIME. The difference between UTC and LOCAL time is referred to as the TIMEZONE. The z/os MVS system stores the local TIMEZONE in a system field named CVTLDTO (local date time offset). CA Date Simulator results are dependent on both the system clock and the CVTLDTO values.
The local TIMEZONE is traditionally changed twice per year. In the US, this is referred to as the beginning and end of Daylight Savings Time. In the UK, this is referred to as British Summer Time. Other locations refer to it as summer/winter time.
The source of the local time zone setting is controlled by the SYS1.PARMLIB(CLOCKxx) parameter. There are several methods and utilities that will update the value in CVTLDTO.
In the simplest example ,the time zone value in CVTLDTO is changed with a system operator commands:
When CA Date Simulator is started (by executing PGM=WARPMAIN) it copies the CVTLDTO value to a CA Date Simulator control block. It does this in an effort to minimize its processing overhead on all time/date request.
If CA Date Simulator is executing when the local TIMEZONE (ie. CVTLDTO) is changed, CA Date Simulator must be stopped and restarted to update the copied CVTLDTO value. Failure to do this will result in the time reported by CA Date Simulator being incorrect.
CA Date Simulator has a separate component that executes in CICS, named WARPCICS. WARPCICS copies the value from WARPMAIN to local CICS storage when CICS is first started. If CICS is executing when the time zone was changed, then CICS must be restarted after WARPMAIN was restarted.
Given this explanation, the "best practice" after CVTLDTO is changed is:
- STOP CA DATE SIMULATOR if running.
CA Date Simulator is stopped either by executing //STEP1 EXEC PGM=WARPDOWN
or issuing a "P jobname" where jobname is the name of the CA Date Simulator task.
- SHUTDOWN any CICS region where CA Date Simulator is installed.
CICS regions that use CA Date Simulator will contain the following message in the job output:
DATE SIMULATOR SUCCESSFULLY INSTALLED
- Alter the TIMEZONE using:
SET TIMEZONE=D.HH.MM.SS where D is E for East or W for West or other method.
- START CA DATE SIMULATOR.
Start CA Date Simulator task or submit jcl to execute WARPMAIN
//STEP1 EXEC PGM=WARPMAIN,PARM='STCKSVC=nnn'
- START CICS region.
Steps 1-3 can be completed in any order. Steps 4,5 must be completed in order after step 3.