Hello,
here is little bit REXX code to retrieve the information you want. But after 
reading the previous updates i think it only works when the HMC 'Global 
performance control option' was set. 

This REXX runs under z/OS 1.10 on z9 and z10, no other configs tested.


/* rexx */                                                             
call GetPartionTable                                                   
                                                                       
say 'PR/SM-      MIF- CPs'                                             
say 'PartNo. CSS ID   On/Def Status PartName PlexName SysName'         
say '--------------------------------------------------------'         
/*                                                                     
  HMC Definitions for every Partition:                                 
                                                                       
  ! We have set the 'Global performance data control' for every LPAR on a  
CEC !         
                                                                       
   Partition Security Options                                          
   * Global performance data control                                   
                                                                       
                                                                       
 PR/SM-      MIF- CPs                                                  
 PartNo. CSS ID   On/Def Status PartName PlexName SysName              
----------------------------------------------------------             
    1     0   A    2/16   act   OPT10A   MZ00     MTZ1                 
    2     0   1    2/31   act   OPT101   MT00     MT81                 
    3     0   3   20/32   act   OPT103   MT00     MT91                 
*/                                                                     
do k = 1 to PartCnt                                                    
  PartNum = k                                                          
  say '  'right(Part.PartNum,2)    ,                                   
      '  'right(CSS.PartNum,2)     ,                                   
      '  'right(MifId.PartNum,2)   ,                                   
      '  'right(CPUOnl.PartNum,2)'/'right(CPUDef.PartNum,2) ,          
      '  'right(status.PartNum,5) ,                                    
      '  'right(PartName.PartNum,8) ,                                  
      '  'strip(PlexName.PartNum) ,                                    
      '  'strip(SysName.PartNum)                                       
                                                                       
end                                                                    
                                                                       
exit                                                                   
                                                                       
GetPartionTable:                                                       
                                                                       
/*-------------------------------------------------------------------*/
CVT      = C2d(Storage(10,4))                /* point to CVT         */
ECVT     = C2d(Storage(D2x(CVT + 140),4))    /* point to CVTECVT     */
RMCT     = ptr(CVT+604)                      /* point to RMCT        */
RMCTEXT2 = ptr(RMCT+380)                     /* point to RMCTEXT2    */
PartTab  = ptr(RMCTEXT2+168)             /* point to Partition table */
ECVTHDNM = Storage(D2x(ECVT+336),8)          /* Processor Name       */
ECVTLPNM = Storage(D2x(ECVT+344),8)          /* Lpar Name            */    
                                                                           
PartCnt  = c2d(stg(PartTab,1))                                             
                                                                           
offset = 0                                                                 
Part.  = ''                                                                
do i = 1 to PartCnt                                                        
  PartNum  = c2d(stg(PartTab+64+offset,1))                                 
  Part.PartNum   = PartNum                                                 
  CPUOnl.PartNum   = x2d(c2x(stg(PartTab+65+offset,1)))                    
  CPUDef.PartNum   = x2d(c2x(stg(PartTab+66+offset,1)))                    
  CSS.PartNum      = substr(c2x(stg(PartTab+112+offset,1)),1,1)            
  MifId.PartNum    = substr(c2x(stg(PartTab+112+offset,1)),2,1)            
  PartName.PartNum = stg(PartTab+72+offset,8)                              
  PlexName.PartNum = stg(PartTab+80+offset,8)                              
  SysName.PartNum  = stg(PartTab+88+offset,8)                              
                                                                           
  if (CPUOnl.PartNum = 0) then                                             
    status.PartNum = 'deact'                                               
  else                                                                     
    status.PartNum = ' act '                                               
                                                                           
  if (i = PartCnt) then                                                    
    leave                                                                  
                                                                           
  j = 0                                                                    
  do forever                                                               
    j = j + 1                                                              
    PartChk = c2d(stg(PartTab+64+offset+j*96,1))                           
    if (PartChk <> 0) then leave                                           
  end                                                                      
  if (CPUOnl.PartNum > 0) then                                             
    do                                                                     
      offset = offset + j*96                                               
    end                                                                    
  else                                                                     
    offset = offset + 96                                                   
                                                                           
end                                                                        
                                                                           
Return                                                                     
                                                                           
/*--------------------------------------------------------------------*/   
/*  get storage routines                                              */   
/*--------------------------------------------------------------------*/   
ptx: return c2x(storage(d2x(arg(1)),4))                                    
ptr: return c2d(storage(d2x(arg(1)),4))                                    
stg: return storage(d2x(arg(1)),arg(2))                                    
getHex:  RETURN c2x(storage(d2x(x2d(arg(1)) + x2d(arg(2))), arg(3)))       
getDec:  RETURN c2d(storage(d2x(x2d(arg(1)) + x2d(arg(2))), arg(3)),       
arg(3)) 

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@bama.ua.edu with the message: GET IBM-MAIN INFO
Search the archives at http://bama.ua.edu/archives/ibm-main.html

Reply via email to