How do u debug a S0C7 abend? (aswered till we get the field
which caused that)
After knowing the field which caused that how do u know the
record which caused that if it is in production env? (dumb)
Ok let us assume that we got to know that 100th record
caused that and I wanted to skip only 100th record from the
file and process from 101th.
How to do that in JCL using SORT? (tried with STOPAFT
but ended up dumb when he said smthing else is ther)

Answers were Sorted based on User's Feedback



How do u debug a S0C7 abend? (aswered till we get the field which caused that) After knowing the ..

Answer / sandeep negi

If you came to know which field is responsible for that.
you can run your testjcl with output file DISP parameter as
(NEW,CATLG,CATLG), by doing so, your output file will get
created irrespective of SOC7 abend becuase the last record
of your outuput file will be responsible for generating
abend.

Now you can strip off that record (because its bad data)
and run your jcl.

How to Skip any record through JCL -
You can use ICETOOL

//S1 EXEC PGM=ICETOOL
//TOOLMSG DD SYSOUT=*
//DFSMSG DD SYSOUT=*
//IN DD DSN=... input file
//OUT DD DSN=... output file
//TOOLIN DD *
SUBSET FROM(IN) TO(OUT) REMOVE INPUT RRN(100)

this will remove 100th record from your file and will copy
rest all records into ouptput file.

Is This Answer Correct ?    3 Yes 0 No

How do u debug a S0C7 abend? (aswered till we get the field which caused that) After knowing the ..

Answer / hks

Use OMIT option of Sort Utillity

Is This Answer Correct ?    2 Yes 0 No

How do u debug a S0C7 abend? (aswered till we get the field which caused that) After knowing the ..

Answer / varun

You need to you SKIPREC and not STOPAFT here.

Is This Answer Correct ?    1 Yes 0 No

Post New Answer

More COBOL Interview Questions

What is EIBCALEN? Why it is used?

9 Answers   ADP,


I have a source program compiled with Cobol-2. The output file has a record length of 100 defined in the program but a record of 60 bytes getting written into it. i.e. The rest of 40 bytes I am not Writing anything. But it by default puts some values into the last 40 bytes. However it does not impact anything. But when Compiled the module with Enterprise Cobol the last 40 bytes were spaces as fillers. Can anyone explain?

5 Answers   Cognizant,


how to convert the recors form vsam file to db2 table tru file aid

0 Answers   TCS,


I try to use some column names in my cobol progorm but these column not in db2 table ..when do i get error ..while bind time or runtime?

2 Answers  


BY seeing a program how can we say that it is static call or dynamic call

5 Answers   CGI,






wht is load module and object module ?

2 Answers   DELL, TCS,


diffrence between renames and redifnes with examples

3 Answers   IBM,


How can i write a comp-3 variable into a sequential file should i declara the field in the file description as comp- 3?

1 Answers  


How to find How Many Lines in Sysin DD * Parameter Thru Cobol Coding? If any one knows the Answer Please Reply .....Thanks From Shree

3 Answers   Merrill Lynch,


Explain how to differentiate call by context by comparing it to other calls?

0 Answers  


Please let me know how the Eject verb works for page break.. I want to know the code, how it is used.

3 Answers  


i was faced one question- i have value -00001234.56 Suppress the zeroes and the output should be -1234.56 But Not - 1234.56 spaces should not be available after suppressing the zeroes. logic in jcl and cobol?

0 Answers  


Categories