* :--------------------------------------- * ------------------------: Copybook for GetSystemTime API * : * : GetSystemTime retrievs the system time * : in Coordinated Universal Time (UTC). * : * : This can be usefull in Client Server * : applications where the Client may be * : in different Time Zones than the * : Server. * : Also, since file times are in UTC * : it is usefull to be able to quickly * : compare them to current time. * :--------------------------------------- * * CALLING EXAMPLE------------------------------------------------- * * -- Working Storage Section: * * COPY WIN32API. * COPY SYSTIME. * * -- Procedure Division: * * : Set which type of API/Function to run * SET API-GETSYSTEMTIME TO TRUE * * : Call the actual Function * CALL 'GSWINAPI' USING WIN32API-PARMS * SYSTEM-TIME * DUMMY * DUMMY * DUMMY * DUMMY * DUMMY * * ---------------------------------------------------------------- * * CLIENT/SERVER: * When running under Client/Server, this Function defaults to * running on the Client side. To run on the server side: * * SET WIN32API-EXECUTE-API-ON-SERVER TO TRUE. * * 01 SYSTEM-TIME. 05 ST-YEAR PIC S9(4) COMP-5. 05 ST-MONTH PIC S9(4) COMP-5. 05 ST-DAY-OF-WEEK PIC S9(4) COMP-5. 05 ST-DAY PIC S9(4) COMP-5. 05 ST-HOUR PIC S9(4) COMP-5. 05 ST-MINUTE PIC S9(4) COMP-5. 05 ST-SECOND PIC S9(4) COMP-5. 05 ST-HUNDREDTHS PIC S9(4) COMP-5.