zOs/REXX.O13/EXLMD
/* rexx ****************************************************************
***********************************************************************/
lev = "A540769.P"
gr = 'xt'
lev = "PVSO.RZ1.P0"
gr = 'xy'
if 0 then do
call adrTso 'alloc dd(oo) shr reuse dsn(wk.out(listcat))'
call adrTso 'listcat level('lev') ofile(oo)'
call adrTso 'free dd(oo) '
say 'after listcat lev'
exit
x = outtrap(ot.)
call adrTso 'listcat level('lev')'
x = outtrap(off)
say 'listcat' ot.0 'for' lev
exit
end
say showTime() 'start'
if 0 then do
call adrIsp 'lmdinit listid(lmdId) level('lev')'
call adrIsp 'lmdlist listid(&lmdId) option(save) group('gr')'
call adrIsp 'lmdfree listid(&lmdId)'
say showTime() 'lmdlist save' gr lev
end
if 1 then do
call adrTso 'alloc dd(ii) shr reuse dsn('gr'.datasets)'
c = 0
r = 0
do while (r = 0)
r = adrTsoRc('execio 1000 diskr ii (stem ii.)')
if rc <> 0 then
if rc <> 2 then
call err 'execio rc' rc
c = c + ii.0
do x=1 to ii.0
dsn = word(ii.x, 1)
end
end
call adrTso 'execio 0 diskr ii (finis)'
call adrTso 'free dd(ii)'
say showTime() c 'recs from' gr
end
exit
x = outtrap(ot.)
call adrTso 'listcat level('lev')'
x = outtrap(off)
say 'at end'
exit
na = ''
do cc=1 to -1 by 1
if adrIspRc('lmdlist listid(&lmdId) dataset(na)') <> 0 then do
if rc = 4 | rc = 8 then
leave
call err 'adrIsp lmdlist rc' rc
end
if cc // 100 = 0 then
say say showtime() 'name' cc na
end
call adrIsp 'lmdlist listid(&lmdId) option(free)'
call adrIsp 'lmdfree listid(&lmdId)'
say 'at end'
exit
adrTsoRc:
parse arg tsoCmd
address tso tsoCmd
return rc /* end adrTso */
adrTso:
parse arg tsoCmd
address tso tsoCmd
if rc <> 0 then
call err 'adrTso rc' rc 'for' tsoCmd
return /* end adrTso */
adrIspRc:
parse arg ispCmd
address ispexec ispCmd
return rc /* end adrIspRc */
adrIsp:
parse arg ispCmd
address ispexec ispCmd
if rc <> 0 then
call err 'adrIsp rc' rc 'for' ispCmd
return /* end adrIsp */
err: procedure expose m.
parse arg txt
say 'fatal error' txt
if m.pipe.errDump = '1' then
call pipeDump
say 'exiting'
exit 8
showtime:
parse arg showmsg
return time() sysvar('syscpu') sysvar('syssrv') showmsg