Ever get on a D3 system and run WHERE LZ looking for stuff but get barraged by PIBs in some normal status? I got tired of that and wrote a BP that goes through WHERE LZ output and strips out the trivial stuff. Posting it here for anyone's use, but also to get opinions on improvements. Don't be shy!!
* whereLZ - bsc -09/05/2024
*
* ver 1.1 - bsc - 06/05/2025 - detect if hot backup secondary
*
tclread wCmd
slpTim = field(wCmd," ",2)'cn' ;* set sleep seconds
if slpTim else slpTim = 2 ;* default is 2
passes = field(wCmd," ",3)'cn' ;* set number of passes
if passes else passes = 3 ;* default is 3
isSecondary = 1 ;* call checkFHBRole(isSecondary)
for passNo = 1 to passes
crt "Pass ":passNo
execute \\where lz\\ capturing whereTxt
aMax = dcount(whereTxt,@am)
for aX = 4 to aMax
line = whereTxt<aX>
if index(line,"inconsis",1) then
crt line ;* corrupt FCB/DCB/whateverCB
end else
wPib = line[2,4]
if wPib matches "4n" then
wMode = field(line[33,99],":",1)
begin case
* This first group is for both servers
case wMode = "MD0"
case wMode = "MD0_PINIT"
case wMode = "MD0_PP"
case wMode = "WRAPUPX_DISC_RSTART"
case wMode = "RP_CMD"
case wMode = "SP_SLEEP"
case wMode = "PP_SCHED"
case wMode = "WS_WHERE1"
case wMode = "RQMSLEEP"
case isSecondary ; crt line
* This second group is primary only
case wMode = "PX_RESUME"
case wMode = "PX_INPUT"
case wMode = "AU_INPUT"
case wMode = "PX_IN"
case wMode = "RDL_GETCHAR"
case wMode = "SP_SPOOLOUT"
case wMode = "SP_SERIALSLEEP"
case wMode = "SLEEP50"
case wMode = "SLEEPSUBX"
case wMode = "GETITM"
case wMode = "CNTRLNP"
case 1 ; crt line
end case
end
end
next aX
sleep slpTim
next passNo
------------------------------
Brian S. Cram
Principal Technical Support Engineer
Rocket Software
------------------------------