What are the reasons for which S0C7 occurs?

All sort of Mainframes Interview Questions.
Post Reply
Sushma Rahul
Registered Member
Posts: 11
Joined: Tue Dec 22, 2015 2:30 pm

What are the reasons for which S0C7 occurs?

Post by Sushma Rahul »

Hi,

I got this question to face, which left me not answering anything as the interviewer said the answer himself.

What are the reasons for which S0C7 occurs? Many programmers would say to look out for OFFSET ADDRESS and see the DUMP and trace the statement where S0C7 occurred? Does this really help, what is the actual procedure to solve S0C7 in general ? Can you share a specific method available?
William Collins
Global Moderator
Global Moderator
Posts: 490
Joined: Sun Aug 25, 2013 7:24 pm

Re: What are the reasons for which S0C7 occurs?

Post by William Collins »

S0C7 occurs only when a Decimal Instruction is used (consult the Principles of Operation) and the data provided does not conform to the convention for packed-decimal data.

Note that if the source field is a DISPLAY/zoned-decimal field, you need to apply the consideration of conformation once the data has been "packed" (see the description of CVP or PACK in the same manual).

And yes, that is the general way to start finding out what is going on. Since the answer to that question can be "almost anything" it is not possible to generalise beyond that point.
User avatar
Robert Sample
Global Moderator
Global Moderator
Posts: 1895
Joined: Fri Jun 28, 2013 1:22 am
Location: Dubuque Iowa
United States of America

Re: What are the reasons for which S0C7 occurs?

Post by Robert Sample »

As William indicated, a S0C7 occurs only when a decimal instruction attempts to use data not valid for it. However, the reasons for the S0C7 are numerous and varied:
- the programmer could have put invalid data in the field (on purpose or by accident)
- the field could have been read from a file which had invalid data in the field
- storage overlay could have overlaid the field with invalid data
- subprogram linkage could be messed up causing a referenced field to not have valid data
etc
Sushma Rahul
Registered Member
Posts: 11
Joined: Tue Dec 22, 2015 2:30 pm

Re: What are the reasons for which S0C7 occurs?

Post by Sushma Rahul »

Thanks for the answers. This should help me in next interview for the similar question...
Post Reply

Create an account or sign in to join the discussion

You need to be a member in order to post a reply

Create an account

Not a member? register to join our community
Members can start their own topics & subscribe to topics
It’s free and only takes a minute

Register

Sign in

Return to “Interview Questions.”