Data commit

This commit is contained in:
Ingy döt Net 2023-07-01 11:58:00 -04:00
parent 7387c8f97b
commit cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions

View file

@ -0,0 +1,20 @@
/*REXX program processes instrument data as read from a time sorted data file.*/
iFID= 'LICENSE.LOG' /*the fileID of the input file. */
high=0 /*highest number of licenses (so far). */
#=0 /*the count of number of licenses out. */
n=0 /*the number of highest licenses out. */
do recs=0 while lines(iFID)\==0 /* [↓] read file until end─of─file. */
parse value linein(iFID) with . ? . $ /*get IN│OUT status, job info.*/
if ?=='IN' then #=#-1 /*decrement the license count.*/
else if ?=='OUT' then #=#+1 /*increment " " " */
if # >high then do; n=1; job.1=$; end /*the job info for highest cnt*/
if #==high then do; n=n+1; job.n=$; end /* " " " " equal " */
high=max(high,#) /*calculate max license count.*/
end /*while ···*/
say recs 'records read from the input file: ' iFID
say 'The maximum number of licenses out is ' high " at:"
say
do j=1 for n /*show what/when max licenses occurred.*/
say left('',20) job.j /*indent the information displayed. */
end /*j*/ /*stick a fork in it, we're all done. */

View file

@ -0,0 +1,66 @@
/* REXX **************************************************************
* 19.11.2012 Walter Pachl transcribed from PL/I
* and dual-coded (for PC (Windows) and TSO)
**********************************************************************/
Parse Source source
call time 'R'
Say source
Parse Upper source system .
If left(system,3)='WIN' |, /* changed from 'Windows' (I see WIN64 in source) */
wordpos(system,'MSDOS PCDOS')>0 Then Do
fid='mlijobs.txt'
Do i=1 By 1 While lines(fid)>0
l.i=linein(fid)
End
l.0=i-1
End
Else Do
"ALLOC FI(IN) DA(MLIJOBS.TEXT) SHR REUSE"
'EXECIO * DISKR IN (STEM L. FINIS'
'FREE FI(IN)'
End
store.0=0
max_nout=0
nout =0
cnt=0
cnt.=0
do i=1 To l.0
line=l.i
Parse Var line 9 inout +3
Select
When inout='OUT' then nout = nout+1;
When inout='IN' then nout = nout-1;
Otherwise Iterate
End
cnt.nout=cnt.nout+1
cnt=cnt+1
if nout = max_nout then
Call store line
if nout > max_nout then Do
max_nout=nout
drop store.
store.0=0
Call store
end;
end;
Say 'The maximum number of licences taken out = ' max_nout
Do i=1 to store.0
k=pos('@',store.i)
Say 'It occurred at 'substr(store.i,k+1)
End
limit=5
Do nout=0 To max_nout
If nout=limit+1 Then Say '.........'
If nout<=limit | nout>=max_nout-limit Then
Say right(cnt.nout,5) right(nout,3)
End
Say right(cnt,5) 'Jobs'
Say time('E') 'seconds (elapsed)'
Exit
store:
z=store.0+1
store.z=line
store.0=z
Return