home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
OS/2 Shareware BBS: 3 Comm
/
03-Comm.zip
/
GCP$.ZIP
/
cistime.cmd
next >
Wrap
OS/2 REXX Batch file
|
1992-10-08
|
875b
|
39 lines
/* */
Arg month
month = STRIP(month)
If month = "" then Do
month = SUBSTR(DATE('S'), 5, 2)
End
Else Do
If ((month < 10) & (LEFT(month,1) <> '0')) then
month = "0"month
End /* Do */
fmonth = month
if (left(fmonth, 1) = '0') then
fmonth = SUBSTR(fmonth, 2)
File = "LOG"fmonth"-92.CIS"
timefile = '.\temp.tme'
Do Queued(); Pull .; End
'@TYPE 'file' | FIND "S 'month'/" | cut -w7 | RXQUEUE'
totalhrs = 0
totalmins = 0
totalsecs = 0
Do Queued()
Pull time
Parse Var time mins ":" seconds
totalmins = totalmins + mins
if seconds > 0 then totalmins = totalmins + 1
If totalmins > 59 then Do
totalhrs = totalhrs + 1
totalmins = totalmins - 60
end /* Do */
End /* do */
Say "Time spent was "totalhrs":"totalmins":00"
Cost = 36*totalhrs + totalmins * (36/60)
Say "Cost is $"Cost