CVTTIMSEC CONVERT TIME TO SECONDS TAATINU |
The Convert Time to Seconds command converts a time value (HHMMSS) to
a return parameter containing the number of seconds prior to
midnight. For example, if the value is 030000 (3:00 AM), the return
seconds would be (36000 x 3) or 10,800. CVTTIMSEC may be helpful
when dealing with time values.
A typical series of commands would be:
DCL &RTNSEC LEN(11 0)
.
CVTTIMSEC TIME(&xxx) RTNSEC(&RTNSEC)
The &RTNSEC variable must be declared as *DEC LEN(11 0). While this
is larger than needed for a time value, it allows the use of the
field as a work field.
If the time was 10:00:00, the RTNSEC value would be 36000.
CVTTIMSEC escape messages you can monitor for
---------------------------------------------
None. Escape messages from based on functions will be re-sent.
CVTTIMSEC Command parameters *CMD
----------------------------
TIME The time to be converted to seconds. It must be a
valid time value between '000000' and '235959'. The
special value *CURRENT may be entered to mean the
current time.
RTNSEC The number of seconds returned. This is a required
return variable that must be declared as *DEC LEN(11
0).
Restrictions
------------
Because CVTTIMSEC returns a variable, the command may only be used in
a CL program.
Prerequisites
-------------
The following TAA Tools must be on your system:
SNDESCINF Send escape information
SNDESCMSG Send escape message
Implementation
--------------
None, the tool is ready to use.
Objects used by the tool
------------------------
Object Type Attribute Src member Src file
------ ---- --------- ---------- ----------
CVTTIMSEC *CMD TAATINU QATTCMD
TAATINUC *PGM CLP TAATINUC QATTCL
|
Added to TAA Productivity tools April 15, 2010