MACRO 00001000
SYSTIME &ZONE=0,&LOC=EAST,&ID=GMT 00002000
.* THIS MACRO BUILDS THE INFORMATION REQUIRED TO SET THE TOD CLOCK 00003000
GBLC &SY$TIME @V60BBBC 00003300
&SY$TIME SETC 'HERE' ANNOUNCE PRESENCE TO SYSLOCS @V60BBBC 00003600
LCLA &HOURS,&MIN,&SEC,&TOT 00004000
LCLC &MINUS 00005000
AIF (K'&ID EQ 0).BADID 00006000
AIF (('&LOC' NE 'EAST') AND ('&LOC' NE 'WEST')).BADLOC 00007000
AIF ('&LOC' EQ 'EAST').PLUS 00008000
&MINUS SETC '-' 00009000
.PLUS AIF ((N'&ZONE EQ 0) OR (N'&ZONE GT 3)).NOZONE 00010000
AIF ('&ZONE(1)' EQ '').NOZONE 00011000
&HOURS SETA &ZONE(1) 00012000
AIF ('&ZONE(2)' EQ '').SETSEC 00013000
&MIN SETA &ZONE(2) 00014000
.SETSEC AIF ('&ZONE(3)' EQ '').ENDTM 00015000
&SEC SETA &ZONE(3) 00016000
.ENDTM ANOP 00017000
&TOT SETA &HOURS*3600+&MIN*60+&SEC 00018000
AIF (&TOT GT 13*3600).BADZONE 00019000
SPACE 1 00020000
ENTRY DMKSYSTZ,DMKSYSTI 00021000
DMKSYSTZ DC F'&MINUS&TOT' TIME ZONE DIFFERENTIAL IN SECONDS 00022000
DMKSYSTI DC CL3'&ID' TIME ZONE IDENTIFIER 00023000
MEXIT 00024000
.BADLOC MNOTE 8,'INVALID LOC SPECIFIED' 00025000
MEXIT 00026000
.BADZONE MNOTE 8,'ZONE GREATER THAN 13 HOURS' 00027000
MEXIT 00028000
.BADID MNOTE 8,'ZERO LENGTH ID SPECIFIED' 00029000
MEXIT 00030000
.NOZONE MNOTE 8,'INVALID ZONE' 00031000
MEND 00032000