PSW
Program status word: the processor's record of what it is doing, including the address of the next instruction, shown in abend messages and dumps.
Also written program status word, PSW at time of error, instruction address
The PSW, or program status word, is part of the processor's state. Among other things, it holds the address of the next instruction to run, the addressing mode, and a condition code set by the last comparison.
You meet it after an abend. The abend message and the dump show the PSW at the time of error, and its address part shows where the program was when it failed. Together with the address where the program was loaded, that gives the offset of the failing instruction within the program.
With the offset, you can go to the compile listing. With the LIST or OFFSET option, the listing shows which COBOL statement each offset belongs to, so the PSW leads you to the line that failed. Tools such as Fault Analyzer and Language Environment messages do this calculation for you, but it helps to understand where their answer comes from.
You do not need to decode the whole PSW. Knowing that it shows where the failure happened is enough for most debugging.
Where can I learn this hands-on?
Right here, at ZedBank. You take a junior job at a simulated bank and learn each part of the work by doing it, with Zed beside you. There's nothing to install.
Start at ZedBankRelated
- DumpA copy of a program's memory taken at the moment it failed, used to find out why.
- AbendAn abnormal end: a program stopping in an uncontrolled way rather than finishing and reporting a result.
- Compile listingThe report a compiler produces: the source with line numbers, error messages, and maps that help find where a program failed.
- AssemblerThe low-level programming language of the mainframe, where each statement matches a single machine instruction.
- z/ArchitectureThe design of the IBM Z processor, its instructions and how it handles memory, which traces back to the System/360 of 1964.
- SVCSupervisor call: the instruction a program uses to ask z/OS to do something for it, such as open a file or get storage.