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

Problem in writing Output file


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

New User


Joined: 10 Jun 2015
Posts: 51
Location: India

PostPosted: Mon Nov 14, 2016 11:14 pm
Reply with quote

Hi All,

I have written a program which reads from cursor and writes in output file.
But i am getting File status code 34 with SOC4 abend.

I checked the layout of the output file and its correct.

When i write Fetch first x rows only in the cursor then also it works fine.

I increased space of file and also tried with max region for the job but still getting same error.

Please suggest on this issue.
Back to top
View user's profile Send private message
Arun Raj

Moderator


Joined: 17 Oct 2006
Posts: 2481
Location: @my desk

PostPosted: Mon Nov 14, 2016 11:30 pm
Reply with quote

Check if your program is running into an infinite loop.
Back to top
View user's profile Send private message
Bill Woodger

Moderator Emeritus


Joined: 09 Mar 2011
Posts: 7309
Location: Inside the Matrix

PostPosted: Mon Nov 14, 2016 11:33 pm
Reply with quote

No. What is more likely is that you got a FILE STATUS of 34, ignored it, and then got the S0C4.

You have an error in your program. It is, let us say, "difficult", to know what error you have.

I don't know why you thought that eitther more disk space or more REGION would help.

By limiting the output, you probably just didn't encount the problem yet.

Attempt to minimise your program (a copy) such that it produces the error but doesn't have extraneous code. Then show it to us, if that process itself doesn't reveal the problem.
Back to top
View user's profile Send private message
RahulG31

Active User


Joined: 20 Dec 2014
Posts: 446
Location: USA

PostPosted: Mon Nov 14, 2016 11:59 pm
Reply with quote

You didn't tell:

1. How many rows your cursor is expected to produce ?
2. What is 'x' in Fetch first x rows only, that worked ?
3. How much space have you increased ?

It may happen that your cursor is producing 1000 rows and your output file may have space for only 10 records and then you increase space to accommodate another 10 rows, which is still way behind the expected 1000.

.
Back to top
View user's profile Send private message
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 8696
Location: Dubuque, Iowa, USA

PostPosted: Tue Nov 15, 2016 12:50 am
Reply with quote

Quote:
I increased space of file and also tried with max region for the job but still getting same error.
First, the region size will have absolutely NOTHING to do with your problem -- so why are you changing it? Changing random things hoping the problem will go away is NOT a valid debugging method. Increasing the data set (note that it is NOT a "file") space may resolve the file status 34, but it depends on why the file status 34 occurred.

Second, the file status 34 may be the direct cause of the S0C4 ABEND. You've posted nothing that would allow us to help you determine this, though.

Third, the file status 34 may have nothing to do with the S0C4 ABEND. Again, you've posted nothing that would allow us to help you determine this.
Back to top
View user's profile Send private message
Terry Heinze

JCL Moderator


Joined: 14 Jul 2008
Posts: 1249
Location: Richfield, MN, USA

PostPosted: Tue Nov 15, 2016 2:33 am
Reply with quote

Look up File Status Key in the Language Reference Manual.
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 Extracting Variable decimal numbers f... DFSORT/ICETOOL 17
No new posts SFTP Issue - destination file record ... All Other Mainframe Topics 2
No new posts Access to non cataloged VSAM file JCL & VSAM 18
No new posts Sortjoin and Search for a String and ... DFSORT/ICETOOL 1
No new posts Need help for File Aid JCL to extract... Compuware & Other Tools 23
Search our Forums:

Back to Top