Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

Problem in writing Output file

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> COBOL Programming
View previous topic :: :: View next topic  
Author Message
vickey_dw

New User


Joined: 10 Jun 2015
Posts: 30
Location: India

PostPosted: Mon Nov 14, 2016 11:14 pm    Post subject: Problem in writing Output file
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: 2164
Location: @my desk

PostPosted: Mon Nov 14, 2016 11:30 pm    Post subject:
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

DFSORT Moderator


Joined: 09 Mar 2011
Posts: 7234

PostPosted: Mon Nov 14, 2016 11:33 pm    Post subject: Reply to: Problem in writing Output file
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: 331
Location: USA

PostPosted: Mon Nov 14, 2016 11:59 pm    Post subject: Reply to: Problem in writing Output file
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: 7913
Location: Bellevue, IA

PostPosted: Tue Nov 15, 2016 12:50 am    Post subject:
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: 1238
Location: Richfield, MN, USA

PostPosted: Tue Nov 15, 2016 2:33 am    Post subject:
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    IBMMAINFRAMES.com Support Forums -> COBOL Programming All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Add PD field from 2nd file to PD in 1st Sushant Garje DFSORT/ICETOOL 6 Thu Dec 01, 2016 4:32 pm
No new posts File Aid to File Manager conversion murali3955 IBM Tools 4 Thu Nov 24, 2016 3:41 pm
No new posts How to convert the VBM file to VB or... Sulabh Agrawal JCL & VSAM 4 Fri Nov 18, 2016 1:04 pm
No new posts CICS Roll back partially - Need to re... dwijadas CICS 4 Wed Nov 16, 2016 4:30 pm
No new posts SQZ pipe delimited file with 1 column... Rick Silvers DFSORT/ICETOOL 2 Sun Nov 06, 2016 8:11 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us