Problem solve Get help with specific problems with your technologies, process and projects.

Retrieve partition ID

The submitted RPG code retrieves the number of partions and the partition ID. Partition IDs start at zero. The pgm calls API QWCRSSTS. There is a great deal of system statistical information that is available using this API.

The submitted RPG code retrieves the number of partions and the partition ID. Partition IDs start at zero. The pgm calls API QWCRSSTS. There is a great deal of system statistical information that is available using this API. If you're interested, I have and will share a pgm that retrieves most of what is available and places info into a file.

               
d returndata      s           2560

d datalength      s              4b 0 inz(2560)              
d rcdfmt          s              8    inz('SSTS0200')        
d x               s              5  0                        
d errorcode       s             10                           
d resetstatus     s             10    inz('*NO')             
d s0200           ds                  inz                    
d status0200              1    256                           
d partitions             77     80b 0                        
d partitionid            81     84b 0                        
c                   call      'QWCRSSTS'                     
c                   parm                    returndata       
c                   parm                    datalength       
c                   parm                    rcdfmt           
c                   parm                    resetstatus      
c                   parm                    errorcode        
c                   eval      s0200 = %subst(returndata:1:131)
c     partitions    dsply                                    
c     partitionid   dsply                                    
c                   eval      *inlr = *on  

Dig Deeper on Setting up partitions

Start the conversation

Send me notifications when other members comment.

Please create a username to comment.

-ADS BY GOOGLE

SearchDataCenter

Close