z/OS TSO/E REXX User's Guide
Previous topic | Next topic | Contents | Contact z/OS | Library | PDF


Using the SYSCPUS Function

z/OS TSO/E REXX User's Guide
SA32-0982-00

The SYSCPUS function places, in a stem variable, information about those CPUs that are on-line.

The SYSCPUS function runs in any MVS™ address space.

Example:

Consider a system with two on-line CPUs. Their serial numbers are FF0000149221 and FF1000149221. Assuming you issue the following sequence of statements
/* REXX */
x = SYSCPUS('cpus.')
SAY '0, if function performed okay: ' x
SAY 'Number of on-line CPUs is ' cpus.0
DO i = 1 TO CPUS.0
  SAY 'CPU' i ' has CPU info ' cpus.i
END
you get the following output:
0, if function performed okay: 0
Number of on-line CPUs is 2
CPU 1 has CPU info FF0000149221
CPU 2 has CPU info FF1000149221
                  /* ↑     ↑                         */
                  /* |     4 digits = model number   */
                  /* 6 digits       = CPU ID         */

Go to the previous page Go to the next page




Copyright IBM Corporation 1990, 2014