View previous topic :: View next topic
|
Author |
Message |
hemakumarl
New User
Joined: 25 Nov 2006 Posts: 2 Location: MK
|
|
|
|
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 |
|
|
swaroopnaga
New User
Joined: 15 Oct 2005 Posts: 8 Location: US
|
|
|
|
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 |
|
|
hemakumarl
New User
Joined: 25 Nov 2006 Posts: 2 Location: MK
|
|
|
|
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 |
|
|
guptae
Moderator
Joined: 14 Oct 2005 Posts: 1208 Location: Bangalore,India
|
|
|
|
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 |
|
|
swaroopnaga
New User
Joined: 15 Oct 2005 Posts: 8 Location: US
|
|
|
|
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 |
|
|
MFRASHEED
Active User
Joined: 14 Jun 2005 Posts: 186 Location: USA
|
|
|
|
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 |
|
|
mmwife
Super Moderator
Joined: 30 May 2003 Posts: 1592
|
|
|
|
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 |
|
|
|