REXX Show WLM/SRM Queues                                                        goto homepage

Infos über Address Spaces auf die WLM/SRM Queues – neue Version 10/2009

 

 

/* REXX */
/*------------------------------------------------------*/
/* Copyright 2005-09 YCOS Yves Colliard Software GmbH   */
/*------------------------------------------------------*/
/* Show the SRM Queues - ASCB                           */
/*------------------------------------------------------*/
/* 06.10.09 - correct/enh. service class display        */
/*------------------------------------------------------*/
/* */
dosay="Y"
dosay="N"
/* */
call setvar
/* */
cvt    = PTR(76)       /*  4C                            PSACVT    */
say "CVT: " D2X(cvt,8)
rmct   = PTR(cvt+604)  /*  25C     RMCT                  CVTOPCTP  */
say "RMCT:" D2X(rmct,8)
wmct   = PTR(rmct+32)  /*  20      WCT ptr               RMCTWMCT  */
say "WMCT:" D2X(wmct,8)
anzsc=c2d(storage(d2x(wmct+8),4))
scte   = PTR(wmct+24)
cl=0
do while storage(d2x(scte),4)="SCTE"
  cl=cl+1
  class.cl=storage(d2x(scte+24),8)
  select
  when class.cl="$SRMBEST" then do
    class.cl="SYSTEM  "
  end
  when class.cl="$SRMGOOD" then do
    class.cl="SYSSTC  "
  end
  when class.cl="$SRMGOD1" then do
    class.cl="SYSSTC1 "
  end
  when class.cl="$SRMGOD2" then do
    class.cl="SYSSTC2 "
  end
  when class.cl="$SRMGOD3" then do
    class.cl="SYSSTC3 "
  end
  when class.cl="$SRMGOD4" then do
    class.cl="SYSSTC4 "
  end
  when class.cl="$SRMGOD5" then do
    class.cl="SYSSTC5 "
  end
  when class.cl="$SRMDISC" then do
    class.cl="SYSOTHER"
  end
  otherwise
    nop
  end
  scte   = PTR(scte+8)
end
/* */
o.1="ASCB     Jobname  Type ServClas DP Swp Swap_Type          - Orig",
    "Options"
if dosay="N" then do
  "execio 1 diskw ou (stem o."
end
else do
  say o.1
end
/* */
inq    = PTR(rmct+116) /*  74      INQ ptr               RMCTINQE  */
say "INQ :" D2X(inq,8)
swap="IN  "
x=loucb(inq)
/* */
lsq    = PTR(rmct+108) /*  6C      LOGQ Ptr              RMCTLSQE  */
say "LSQ :" D2X(lsq,8)
swap="LOG "
x=loucb(lsq)
/* */
wtq    = PTR(rmct+104) /*  68      WAITQ Ptr             RMCTWTQE  */
swap="PHYS"
say "WTQ :" D2X(wtq,8)
x=loucb(wtq)
/* */
otq    = PTR(rmct+112) /*  70      OUTQ Ptr              RMCTOTQE  */
swap="OUT "
say "OTQ :" D2X(otq,8)
x=loucb(otq)
/* */
o.1=""
o.2="Options: - Start Logon Mount"
o.3="         - APPC OMVS Init"
o.4="         - NSW Priv"
if dosay="N" then do
  "execio 4 diskw ou (stem o."
end
else do
  say o.1
  say o.2
  say o.3
  say o.4
end
if dosay="N" then do
  "execio 0 diskw ou (finis"
end
/* */
exit
/* */
loucb:
thee=arg(1)
oucb   = PTR(thee+4)    /*  4       OUCB Forward                    */
say "OUCB:" D2X(oucb,8)
/* */
do while oucb<>thee
  yfl    = X2B(C2X(storage(d2x(oucb+18),1))) /* Flag               */
                                       /*      bit 1     - Start   */
                                       /*      bit 2     - Logon   */
                                       /*      bit 3     - Mount   */
  select
  when substr(yfl,2,1)="1" then do
    aty="Start "
  end
  when substr(yfl,3,1)="1" then do
    aty="Logon "
  end
  when substr(yfl,4,1)="1" then do
    aty="Mount "
  end
  otherwise
    aty=""
  end
  mfl3   = X2B(C2X(storage(d2x(oucb+37),1))) /* Flag               */
                                       /*      bit 0     - APPC    */
                                       /*      bit 3     - OMVS    */
                                       /*      bit 7     - Init    */
  if substr(mfl3,1,1)="1" then do
    aty=aty"APPC  "
  end
  if substr(mfl3,4,1)="1" then do
    aty=aty"OMVS "
  end
  if substr(mfl3,8,1)="1" then do
    aty=aty"Init "
  end
  rfl    = X2B(C2X(storage(d2x(oucb+25),1))) /* Flag               */
                                       /*      bit 4     - Batch J */
  /* Comment Start
  if substr(rfl,5,1)="1" then do
    aty=aty"Job "
  end
     Comment End */
  sfl    = X2B(C2X(storage(d2x(oucb+17),1))) /* Flag               */
                                       /*      bit 0     - NSW     */
                                       /*      bit 5     - Priv    */
  if left(sfl,1)="1" then do
    aty=aty"NSW "
  end
  if substr(sfl,6,1)="1" then do
    aty=aty"Priv "
  end
  src    = C2D(storage(d2x(oucb+41),1)) /* Flag last reason swap */
  if swap<>"IN" then do
    src=src+0
    if src>maxsrc then do
      src="U"
    end
    swapt=swap sw.src
  end
  else do
    swapt=swap sw.bl
  end
  /* */
  ascb   = PTR(oucb+44)  /*  2C    ASCB ptr              OUCBASCB  */
  jbni   = PTR(ascb+172) /*  AC    JBNI ptr Jobname      ASCBJBNI  */
  if jbni=0 then do
  jbns   = PTR(ascb+176) /*  B0    JBNS ptr Jobname      ASCBJBNS  */
  jobn  =storage(d2x(jbns),8)
  end
  else do
  jobn  =storage(d2x(jbni),8)
  end
  dpa=c2x(storage(d2x(ascb+43),1))
  /* */
  scte = PTR(oucb+212+x2d(600)) /*  D4      SCTE Ptr     OUCBSCTE  */
  servc= storage(d2x(scte+24),8)
  select
  when servc="$SRMBEST" then do
    servc="SYSTEM  "
  end
  when servc="$SRMGOOD" then do
    servc="SYSSTC  "
  end
  when servc="$SRMGOD1" then do
    servc="SYSSTC1 "
  end
  when servc="$SRMGOD2" then do
    servc="SYSSTC2 "
  end
  when servc="$SRMGOD3" then do
    servc="SYSSTC3 "
  end
  when servc="$SRMGOD4" then do
    servc="SYSSTC4 "
  end
  when servc="$SRMGOD5" then do
    servc="SYSSTC5 "
  end
  when servc="$SRMDISC" then do
    servc="SYSOTHER"
  end
  otherwise
    nop
  end
  o.1=D2X(ascb,8) jobn storage(d2x(oucb+176),4),
           servc dpa swapt aty
  if dosay="N" then do
    "execio 1 diskw ou (stem o."
  end
  else do
    say o.1
  end
  oucb   = PTR(oucb+4)   /*  4     OUCB Forward                    */
  /* Comment Start
  say "OUCB:" D2X(oucb,8) D2X(inq,8)
     Comment End */
end
return 0
/* */
/*--------------------------------------------------------------------*/
PTR: RETURN C2D(BITAND(STORAGE(D2X(ARG(1)),4),'7FFFFFFF'X))
PTR24: RETURN C2D(BITAND(STORAGE(D2X(ARG(1)),4),'00FFFFFF'X))
/*--------------------------------------------------------------------*/
/* make it readable ... */
yves_make_it:
return "*"c2x(arg(1))"*" "*"translate(arg(1),tabou,tabin)"*"
/* create table for yves_make_ti */
yves_tab:
tabin=xrange('00'x,'FF'x)
tabou=copies(' ',64)
tabou=tabou" "copies(' ',10)
tabou=tabou".<(+×&"copies(' ',9)
tabou=tabou"!$*);^-/"copies(' ',9)
tabou=tabou",%_>?"copies(' ',10)
tabou=tabou":#@'"
tabou=tabou'=" abcdefghi'copies(' ',7)
tabou=tabou'jklmnopqr'copies(' ',8)
tabou=tabou'stuvwxyz'copies(' ',22)
TABOU=TABOU'{ABCDEFGHI'COPIES(' ',7)
TABOU=TABOU'JKLMNOPQR'COPIES(' ',8)
TABOU=TABOU'STUVWXYZ'COPIES(' ',6)
TABOU=TABOU'0123456789'COPIES(' ',6)
return
setvar:
sw.10="Unilateral        - DMN "  /* 0A */
sw.9 ="Exchange          - DMN "  /* 09 */
sw.8 ="Enq Exchange      - DMN "  /* 08 */
sw.14="Make Room         - WSM "  /* 0E */
sw.12="Improve CS        - WSM "  /* 0C */
sw.13="Improve Paging    - WSM "  /* 0D */
sw.11="Transition        - SYST"  /* 0B */
sw.7 ="Request           - SYST"  /* 07 */
sw.4 ="Aux Shortage      - SYST"  /* 04 */
sw.5 ="Pageable Shortage - SYST"  /* 05 */
sw.2 ="Terminal Input    - WAIT"  /* 02 */
sw.1 ="Terminal Output   - WAIT"  /* 01 */
sw.3 ="Long              - WAIT"  /* 03 */
sw.6 ="Detected          - WAIT"  /* 06 */
sw.15="APPC              - WAIT"  /* 0F */
sw.16="OMVS Input        - WAIT"  /* 10 */
sw.17="OMVS Output       - WAIT"  /* 11 */
sw.18="Read Swap         - SYST"  /* 12 */
maxsrc=18
sw.U ="Unknown Swap Reas - ????"
sw.BL="                  -     "
return

 

Resultat:

CVT:  00FDDDB8 
RMCT: 019AD800 
WMCT: 02198BB0 
INQ : 019AEAE0 
OUCB: 0199B858 
LSQ : 019AEAB0 
OUCB: 024EA700 
WTQ : 019AEA98 
OUCB: 019AEA98 
OTQ : 019AEAC8 
ASCB     Jobname  Type ServClas DP Swp Swap_Type          - Orig Options      
00FDC400 *MASTER* STC  SYSTEM   FF IN                     -      Start NSW Priv
00FBB980 PCAUTH   STC  SYSTEM   FF IN                     -      Start NSW    
00FBB800 RASP     STC  SYSTEM   FF IN                     -      Start NSW    
00FBB680 TRACE    STC  SYSTEM   FF IN                     -      Start NSW    
00FBB500 DUMPSRV  STC  SYSTEM   FF IN                     -      Start NSW Priv
...
00FCFD00 YVESB    JES2 BATMDM   F2 IN                     -      Start Init    
00FCBD00 INIT     STC  SYSSTC   FF LOG  Long              - WAIT Start Init Priv
00FBBB80 INIT     STC  SYSSTC   FF LOG  Long              - WAIT Start Init Priv
...
00FC6580 SSHD4    OMVS SRVHIM   FF LOG  Long              - WAIT Start OMVS Init
00FC6400 INETD4   OMVS SRVHIM   FF LOG  Long              - WAIT Start OMVS Init
00FC6B80 FTPD1    OMVS SRVHIM   FF LOG  Long              - WAIT Start OMVS Init
00FC6280 PORTMAP  STC  STCLOM   FF LOG  Long              - WAIT Start         
00FC7100 BPXOINIT STC  SYSTEM   FF LOG  Detected          - WAIT Start         
00FC6100 HEMSTC   STC  STCLOM   FF LOG  Detected          - WAIT Start         
00FC7400 YVES     TSO  TSO01    FF LOG  Terminal Input    - WAIT Logon         
...