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.
Continue Reading This Article
Enjoy this article as well as all of our content, including E-Guides, news, tips and more.
Step 2 of 2:
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