On Wednesday, 04/11/2007 at 04:01 EST, "McKown, John" <[EMAIL PROTECTED]> wrote:
> I don't have z/VM here to test this. But could use get the TOD using the > REXX "DIAG" interface to issue DIAG code X'70'? If only everyone set their TODs to UTC that would be ok. :-) UTC = (local time) MINUS (tz offset from diag 0) If you *do* want to convert a TOD to a readable form: /* TODCVT2 EXEC - Alan Altmark, Endicott, 09/16/96 */ Call APILOAD 'VMREXTMR' Call APILOAD 'VMREXMTR' arg tod /* such as from QUERY VTOD */ signal on novalue tod_format = vm_tmr_format_tod_absolute tod = x2c(tod) todl = length(tod) tod2_format = vm_tmr_format_tod_relative tod2 = d2c(0,8) tod2l = length(tod2) dif_format = vm_tmr_format_usa dif = left(' ',32) difl = length(dif) difl2 = 0 zero = 0 retcode = 0 reascode = 0 parse value diag(0) with 33 timezone +4 . /* # of seconds difference from UTC */ dif_tz = c2d(timezone,4) Call CSL 'DateTimeSubtract retcode reascode' , 'tod todl tod_format zero vm_tmr_window_none zero' , 'tod2 tod2l tod2_format zero vm_tmr_window_none zero' , 'dif difl difl2 dif_format dif_tz vm_tmr_window_none zero' if retcode <> 0 then do say 'Return code =' retcode say 'Reason =' reascode end else say 'Time =' left(dif, difl2) Alan Altmark z/VM Development IBM Endicott