IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

S0C4 being unresolved.


IBM Mainframe Forums -> ABENDS & Debugging
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
hemakumarl

New User


Joined: 25 Nov 2006
Posts: 2
Location: MK

PostPosted: Sun Nov 26, 2006 1:22 am
Reply with quote

Hi All,
I am trying to process some 2 million records. My program is giving S0C4 abend while reading some records. for example, for the first 450 records or so its working fine. Then it will give abend on the next record. When i remove the 451th(These are not exact figures, just quoted as an example) record, its again working fine, say for some 1000 records and again giving the same problem. this is not a data problem, it seems to be some compiler option specific. Can any one give me a clue on why this is happening. Also, while running the cobol program in xpeditor for debug, while reading the file the status is shown as 'FETCH PROTECT AREA' and while moving the record to working storage variable, it fails with S0C4 abend.
Please note that its not happning in a regular intrevel of records.
Please let me know in case you need more details.

Thanks & Regards
Hemakumar
Back to top
View user's profile Send private message
swaroopnaga

New User


Joined: 15 Oct 2005
Posts: 8
Location: US

PostPosted: Mon Nov 27, 2006 1:02 am
Reply with quote

Hi hemakumarl,

I was also facing the same problem,like I was processing one million records,the program was abending after processing 170 records. Also I faced the same problem when I expedited the program and the same problem when I deleted the 170th record and reexecuted the program. But in my case the input file was a VB file, so when I changed the format of input file to FB, the program ran fine. But i am not sure whether this was the correct solution for all the cases. You can try out this option. And please let me know the correct reason for the SOC4 if you find the solution.

Thanks.
Back to top
View user's profile Send private message
hemakumarl

New User


Joined: 25 Nov 2006
Posts: 2
Location: MK

PostPosted: Mon Nov 27, 2006 2:45 pm
Reply with quote

Hi,

The problem is occuring on VB file and unfortunately I could not modify the file to FB and we are investigating..

Regards
Hemakumar
Back to top
View user's profile Send private message
guptae

Moderator


Joined: 14 Oct 2005
Posts: 1208
Location: Bangalore,India

PostPosted: Mon Nov 27, 2006 2:50 pm
Reply with quote

Hi There,

One of the reason for SOC4 is Tried moving variable length record that was larger than target field size just check the length of 451th record & target field length
Back to top
View user's profile Send private message
swaroopnaga

New User


Joined: 15 Oct 2005
Posts: 8
Location: US

PostPosted: Wed Nov 29, 2006 12:41 am
Reply with quote

Hi,

There is an alternative solution, we can decrease the length of the i/p file, to the extent upto which the input file contains the information needed to execute the program. By this we can avoid the SOC4.

Thanks
Naga.
Back to top
View user's profile Send private message
MFRASHEED

Active User


Joined: 14 Jun 2005
Posts: 186
Location: USA

PostPosted: Wed Nov 29, 2006 1:28 am
Reply with quote

Instead of converting file to FB, probably better option would be to define a variable length copybook to match with file, and code application to use variable lenght area properly. Assuming file was created in VB format for a reason.
Back to top
View user's profile Send private message
mmwife

Super Moderator


Joined: 30 May 2003
Posts: 1592

PostPosted: Wed Nov 29, 2006 10:20 pm
Reply with quote

You could also DISPLAY the length of each rec as it's read. This may confirm (or contradict) the "wrong len" theory.

BTW, how are the IP/OP files defined (the FDs)?
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> ABENDS & Debugging

 


Similar Topics
Topic Forum Replies
No new posts Abend S0C4 11 (Page Translation Excep... PL/I & Assembler 16
No new posts S0C4 Reason Code 10 COBOL Programming 1
This topic is locked: you cannot edit posts or make replies. S0C4-X'11' issue - page translation e... JCL & VSAM 10
No new posts Getting S0C4 while running COBOL Data... COBOL Programming 4
No new posts Getting S0C4 when Writing a Record COBOL Programming 7
Search our Forums:

Back to Top