View previous topic :: View next topic
|
Author |
Message |
sararaju
New User
Joined: 04 May 2005 Posts: 25
|
|
|
|
This question i am facing in a interview pls i need the correct answer
u have coding more than one lakhs. when u r compiling soc7 error occur. how u rectify this problem and also how to find out the exact line ?
sararaju |
|
Back to top |
|
|
David P
Active User
Joined: 11 Apr 2005 Posts: 106 Location: Cincinnati Ohio
|
|
Back to top |
|
|
kanak
Moderator
Joined: 12 Mar 2005 Posts: 252 Location: India
|
|
|
|
i m not sure abt this but one thing i can say once i had OC4 while compiling...but i never faced anything like OC7 while compiling.
any other clue or statement made by the interviewer if you got while interviewing..please let us know...
as generally OC7 occures only due to bad data and data are never checked while compiling. |
|
Back to top |
|
|
kkumarv
New User
Joined: 13 May 2005 Posts: 20 Location: Bangalore/India
|
|
|
|
Basically you need to correcting the offending data. Many times the reason for SOC7 is an un-initialized numeric item.
Examine that possibility first. Many installations provide you a dump for run time abend?s ( it can be generated also by calling some subroutines or OS services thru assembly language). These dumps provide the offset of the last instruction at which the abend occurred.
Examine the compilation output XREF listing to get the verb and the line
number of the source code at this offset. Then you can look at the source code to find the bug. To get capture the runtime dumps, you will have to define some datasets (SYSABOUT etc ) in the JCL. If none of these are helpful, use judgement and DISPLAY to localize the source of error. Some installation might have batch program debugging
tools. Use them.
Otherwise if input file its flat dataset say only numeric, you can find the
the offending data items such as in this case alphabetic/or alphanumeric by seraching f all ' ' and deleting the offending data from inputfile. |
|
Back to top |
|
|
kanak
Moderator
Joined: 12 Mar 2005 Posts: 252 Location: India
|
|
|
|
hi kkumarv
if i m not wrong what u said is for runtime case, but the question is
Quote: |
u have coding more than one lakhs. when u r compiling soc7 error occur. |
as deleting of data from file comes for execution time.correct me if i m wrong. |
|
Back to top |
|
|
kkumarv
New User
Joined: 13 May 2005 Posts: 20 Location: Bangalore/India
|
|
|
|
I have never seen SOC7 occurs at compile time, yes SOC4 can occurs due to return of non zero file status code (improper file handling). |
|
Back to top |
|
|
kanak
Moderator
Joined: 12 Mar 2005 Posts: 252 Location: India
|
|
|
|
that's what i mean to say in my first reply....but as sararaju is asking, he is being asked at the time of compilation...sararaju can u give some more information abt the question....or moderators can u plz give some light on the topic. |
|
Back to top |
|
|
laxmi
New User
Joined: 24 May 2005 Posts: 9
|
|
|
|
hai,
we wil get this SOC7 error whenever we are trying to do some arthimatic operations on nonnumeric data ,moving invalid data into the data fields
i.e., it is a data exception error
By using the XREF compiler option we can overcome it
After compiling the program using with the Compile Jcl we have to go to the spool to see the list of XREF there we have to find the address of the particular line in the program which causes the error then we can correct the program
i think it is sufficient if u have anydoubts plz let me know.
bye |
|
Back to top |
|
|
|