/* ** ARexx script to say that Miami is offline plus ** display the connectstring and log the date/time in "Data:logs/Miami_phone.mylog" ** ** ONLINE_stop contains the stopped time ** ONLINE_online ** ** 01-12-99: The date format is now 'dd-mm-yy', the 'mm' is now a number, ** cause arexx doesn't gives localised dates. ** ** By T.Igracki@gmx.de */ PARSE ARG passive pass = ""; IF passive ~= "" THEN pass = "passive" OPTIONS RESULTS LF = '0a'x SHELL COMMAND "SetEnv SAVE ONLINE 0 >NIL:" datum = TRANSLATE(DATE('E'), "-", "/")||" "Time() SHELL COMMAND "SetEnv ONLINE_stop "datum /* rette online start */ SHELL ENV2REXX GETENV ONLINE_start onlineStart = RESULT SHELL COMMAND "Delete ENVARC:ONLINE_start" SHELL COMMAND "Delete ENV:ONLINE_start" ADDRESS 'MIAMI.1' /* onlinetime = hours":"mins":"secs*/ onlinetime = datum "-" onlineStart IF ~OPEN('log', 'Data:Logs/Miami_phone.mylog', 'A') THEN ok = OPEN('log', 'Data:Logs/Miami_phone.mylog', 'W') ELSE ok = 1 IF ok THEN DO CALL WRITELN('log', "Offline "datum" "pass) CALL WRITELN('log', "Time "onlinetime) CALL WRITELN('log',"") CALL CLOSE('log') END ELSE Say "Failed to open logfile (Data:Logs/Miami_phone.mylog)!"