IBM OS/2 LAN Server REXX Utility DLL


Inf-HTML [About][Toc][Index] 0.9b (c) 1995 Peter Childs


NetMisc(NETREMOTETOD)


Retrieves the remote time of the day from a remote server.   
Syntax 


MyRc = NetMisc(NETREMOTETOD, 'VarRet', SrvName)

  
Parameters 
The parameters required are: 
'VarRet' variable, which is divided into: 
   o VarRet.tod_elapsedt 
     The number of seconds that have elapsed since 1 January 1970 
   o VarRet.tod_hours 
     The current hour 
   o VarRet.tod_mins 
     The current minute 
   o VarRet.tod_secs 
     The current second 
   o VarRet.tod_hunds 
     The current hundredths of a second 
   o VarRet.tod_msecs 
     The current millisecond 
   o VarRet.tod_timezone 
     The time zone of the server, calculated (in minutes) from the 
     Greenwich mean time (GMT) zone 
   o VarRet.tod_tinterval 
     The time interval for each tick of the clock represneted in 0.0001 
     seconds 
   o VarRet.tod_day 
     The day of the month (1-31) 
   o VarRet.tod_month 
     The month (1-12) 
   o VarRet.tod_year 
     The year, starting with 0 
   o VarRet.tod_weekday 
     The day of the week (0 means Sunday; 6 means Saturday) 
SrvName           The server computer name 
  
Example   


/* Perform Net remote TOD  */
call RxFuncAdd 'LoadLsRxutFuncs', 'LSRXUT', 'LoadLsRxutFuncs'
call LoadLsRxutFuncs

NETREMOTETOD = 700
SrvName      = '\\KING_BALU'

myRc = NetMisc(NETREMOTETOD, 'VarRet', SrvName)

if myRc <> '0' then do
 say 'Got error from NetMisc() ' myRc
 rcCode = 9
end
else do
 say 'Seconds elaps            ' VarRet.tod_elapsedt
 say 'Current Hour             ' VarRet.tod_hours
 say 'Current Minute           ' VarRet.tod_mins
 say 'Current Second           ' VarRet.tod_secs
 say 'Current 1/100 sec        ' VarRet.tod_hunds
 say 'Current mSec             ' VarRet.tod_msecs
 say 'Timezone in minutes      ' VarRet.tod_timezone
 say 'Timer Tic in 1/10000 Secs' VarRet.tod_tinterval
 say 'Day                      ' VarRet.tod_day
 say 'Month                    ' VarRet.tod_month
 say 'Year                     ' VarRet.tod_year
 say 'Day of week              ' VarRet.tod_weekday
 rcCode = 0
end

call DropLsRxutFuncs
call RxFuncDrop 'LoadLsRxutFuncs'

exit rcCode

  
Example Output   


Seconds elaps             777749783
Current Hour              17
Current Minute            36
Current Second            23
Current 1/100 sec         66
Current mSec              96781561
Timezone in minutes       65535
Timer Tic in 1/10000 Secs 310
Day                       24
Month                     8
Year                      1994
Day of week               3



Inf-HTML End Run - Successful