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

Program abends with SOC4 while reading the 231st record


IBM Mainframe Forums -> COBOL Programming
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
Craq Giegerich

Senior Member


Joined: 19 May 2007
Posts: 1512
Location: Virginia, USA

PostPosted: Wed Apr 16, 2008 1:27 am
Reply with quote

CICS GUY,

You got me on that one just don't beat me again. I wonder if the file was created and then more records were added it a different step. Maybe use IDCAMS or DITTO to dump that part of file and see what is there.
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19244
Location: Inside the Matrix

PostPosted: Wed Apr 16, 2008 1:34 am
Reply with quote

Hello,

Quote:
Since you are using COBOL in a manner that it is not designed for you should expect to run into problems like this.
Gee, i hope not.

That has been very handy for a long, long time. . .
Back to top
View user's profile Send private message
Reshmi

New User


Joined: 06 Oct 2005
Posts: 9

PostPosted: Wed Apr 16, 2008 2:47 pm
Reply with quote

We tried by changing the input file rec definition to X(30000),then
we see that program abends for 185th record. It works perfectly for
first 184 records.
Back to top
View user's profile Send private message
CICS Guy

Senior Member


Joined: 18 Jul 2007
Posts: 2146
Location: At my coffee table

PostPosted: Wed Apr 16, 2008 7:23 pm
Reply with quote

Reshmi wrote:
We tried by changing the input file rec definition to X(30000),then
we see that program abends for 185th record. It works perfectly for
first 184 records.
What does your JCL look like?
Back to top
View user's profile Send private message
Reshmi

New User


Joined: 06 Oct 2005
Posts: 9

PostPosted: Fri Apr 18, 2008 7:17 pm
Reply with quote

Hi all,

Sorry for the delay in responding.
We have now fixed that issue.

Before we were reading the input file to a ws-variable record of x(10000).
our input file was of just size 440, and we were getting SOC4 during read.

From the below link : "http://publib.boulder.ibm.com/infocenter/pdthelp/v1r1/index.jsp?topic=/com.ibm.entcobol.doc_3.4/rlfdere1.htm
we read that
"The RECORD CONTAINS 0 CHARACTERS clause can be specified for input QSAM files containing fixed-length records; the record size is determined at run time from the DD statement parameters or the data set label. If, at run time, the actual record is larger than the 01 record description, then only the 01 record length is available. If the actual record is shorter, then only the actual record length can be referred to. Otherwise, uninitialized data or an addressing exception can be produced"

So we now declared our ws variable as:
01 ws-var.
05 WS-EXT1 PIC X OCCURS 1 TO 10000 DEPENDING ON
WS-RECLEN.

and before reading the file we move the length of the file 440 that
we now pass from JCL to WS-RECLEN.
While reading, we then read the file into 01 variable and it works fine.

Thanks a lot to all of you for spending time to help us out.
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 -> COBOL Programming

 


Similar Topics
Topic Forum Replies
No new posts How to split large record length file... DFSORT/ICETOOL 10
No new posts Using API Gateway from CICS program CICS 0
No new posts SFTP Issue - destination file record ... All Other Mainframe Topics 2
No new posts FINDREP - Only first record from give... DFSORT/ICETOOL 3
No new posts To find whether record count are true... DFSORT/ICETOOL 6
Search our Forums:

Back to Top