Subscribe to this Blog

Your email:

IT Managers: Get the Techsys Advantage!

Click here to learn more about our FREE 7-Day trial.

Techsys Mainframe Blog

Current Articles | RSS Feed RSS Feed

z/OS Problem Determination Series - Day 11

 | Submit to Digg digg it | Submit to Reddit reddit | Add to delicious delicious | Submit to StumbleUpon StumbleUpon | Share on Facebook Facebook | Share on Twitter Twitter | Share on LinkedIn LinkedIn 

While our previous efforts in this series have been focused on S0C7 abends, today we look into to other program interruption abends.

The group of abend codes ranging from S0C1 to S0CF occur as a result of an exception, and there is no recovery routine in your program to handle that type of abend. For instance, you can put a ESTAE routine in place to handle data exception conditions such as the S0C7 (data exception) conditions. This was quite common in the early mainframe days, when data entry (keypunch) errors would cause an abend. Recovery routines were put in place to fix the data, if possible, so that processing could continue. This was primarilly utilized by assembler language programs.

The abend codes associated with program interruptions are:

S0C1 - Operation exception. This is caused by executing an instruction that is an invalid op-code. For instance, in an assembler language program, you can add the following code to force a S0C1 abend:
ABEND0C7 DC X'0000' Define 2 null bytes to force an abend
When your program executes the op-code of hex 00, the abend will occur. An easy way to force an abend during program testing...
S0C2 - Privileged-operation exception. The reason code is 2. 
 
S0C3 - Execute exception. The reason code is 3.
 
S0C4 - This is another common program interruction. Although the IBM documentation describes 8 different conditions where the S0C4 abend will occur, the two most common conditions are:
  • Your program tried to modify a storage area where the storage protection key did not match the storage protect key in your PSW. This condition has a return code value of 4. Applications typically run with a storage protection key of 8. The operating system's storage has a storage protection key of 0. So, an application program running in key 8, cannot modify operating system storage and will result in a S0C4 abend. This is how the operating system protects itself from application programs (and programmers). Application programs can modify operating system storage if they can get into supervisor mode (via SETMODE), but this must be accomplished via their program being placed in an authorized library & being linked with AC=1.
  • The other common S0C4 abend involves trying to access a virtual storage address that doesn't exist. A common problem is a non-initilized field and you try to access a storage addresss of x'40404040'. Since x'40' is a space in EBCDIC, the address field either was never initialized or spaces was accidentally to this field. The return code of 11 is returned for this condition.

S0C5 - Addressing exception. The reason code is 5.

S0C6 - Specification exception. The reason code is 6.
 
S0C7 - Data exception. This condition occurs most often when one, or both operands, of a decimal operation do not contain valid packed decimal data. If the final byte of the field does not contain xF for unsigned fields or xC/xD for signed fields, a S0C7 abend will occur. See last weeks examples for additional information.
 
S0C8 - Fixed-point-overflow exception. The reason code is 8.
 
S0C9 - Fixed-point-divide exception. This condition occurs when you attempt to divide a number by 0. This condition happens not only with decimal operation instructions, but also in register-to-register instructions as well as storage-to-storage instructions on binary fields.
 
S0CA - Decimal-overflow exception. The reason code is A.

S0CB - Decimal-divide exception. The reason code is B.

S0CC - Exponent-overflow exception. The reason code is C.

S0CD - Exponent-underflow exception. The reason code is D.

S0CE - Significance exception. The reason code is E.

S0CF - Floating-point-divide exception. The reason code is F.

As you can see, only a few of the abends require additional information as they are the most common. For the "not so common" abends I have included the IBM explanation for the abend strictly to illustrate the possibility of other S0Cx abends. I seriously doubt you will generate any of these during the course of a normal programming assignment. If you happen to generate one of these, on purpose or accidently, please forward the information to me so that I can include it here!

Tomorrow, we will focus on the Sx37 abends that are a result of improperly allocated datasets.

Comments

With S0C4 relating to storage that does not exist you are likely to also see return code 10. Whether you get return code 10 or 11 depends at what point the DAT fails, i.e. page or segment translation exception. This has an important implication for the NSI address in the PSW, with return code 10 it will not have been updated.
Posted @ Monday, May 18, 2009 2:12 PM by Rob Cole
Good point! I see the RC 11 so often, I tend to forget about the RC 10. Thanks for the input!!! 
 
RJ
Posted @ Monday, May 18, 2009 2:35 PM by Ralph Johnson
Post Comment
Name
 *
Email
 *
Website (optional)
Comment
 *

Allowed tags: <a> link, <b> bold, <i> italics

Receive email when someone replies.