Program Status Word (PSW)

The Program Status Word or PSW is a collection of data 8 bytes (or 64 bits) long, maintained by the operating system. It keeps track of the current state of the system.

We can usually ignore the PSW unless an ABEND has occurred. When an ABEND does occur, ASSIST will print out various information for us including the PSW. The PSW is printed out as 16 hex digits in two groups of 8.


What information is in the PSW?

You can find a detailed list of the fields in the PSW in the yellow card. We use the "BC Mode" of the PSW. Here is a list of some fields we will need in this course:

    Bytes     Contents

    1 & 2:    assorted data we can ignore for now
    3 & 4:    Interruption Code
    5:        2 bits = Instruction Length Code (ILC)
              2 bits = Condition Code (CC)
              4 bits we can ignore for now
    6 - 8:    Address of the next instruction


What are all these?


So what do we do with all this?

One problem with an ABEND is to determine which instruction caused the ABEND. We can find it using the information in the PSW:

    Address of ABENDing instruction = Address of next instruction - 2 * ILC


Example

Suppose an ABEND occurs and the PSW has the value FFC50001 8000001A.

We can look at this and know that: