Text processing/Max licenses in use: Difference between revisions
Content added Content deleted
Walterpachl (talk | contribs) (→Version 2 dual-coded for PC and TSO: add Windows Output for ooRexx and Regina) |
(→{{header|Vedit macro language}}: added zkl) |
||
Line 2,301: | Line 2,301: | ||
2008/10/03_08:40:40 for job 1837 |
2008/10/03_08:40:40 for job 1837 |
||
</pre> |
</pre> |
||
=={{header|zkl}}== |
|||
{{trans|D}} |
|||
The referenced log file is no longer available, so, using the example log: |
|||
<lang zkl>nOut,maxOut,maxTimes:=0,-1,List(); |
|||
foreach job in (File("mlijobs.txt")){ |
|||
_,status,_,date:=job.split(); |
|||
nOut+=( if(status.toUpper()=="OUT") 1 else -1 ); |
|||
if(nOut>maxOut){ maxOut=nOut; maxTimes.clear(); } |
|||
if(nOut==maxOut) maxTimes.append(date); |
|||
} |
|||
println(("Maximum simultaneous license use is %d at" |
|||
" the following times:\n %s").fmt(maxOut,maxTimes.concat("\n")));</lang> |
|||
{{out}} |
|||
<pre> |
|||
Maximum simultaneous license use is 1 at the following times: |
|||
2008/10/03_23:51:05 |
|||
</pre> |
|||
{{omit from|GUISS}} |
{{omit from|GUISS}} |