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

S0C4 abend when concatinating two datasets


IBM Mainframe Forums -> JCL & VSAM
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
prabhanjana p

New User


Joined: 06 Aug 2009
Posts: 3
Location: chennai

PostPosted: Mon Sep 28, 2009 11:34 am
Reply with quote

MY JCL is using a cobol program, it reads a set of concatenated files and copies to an output GDG file. The S0C4 abend occurs when the first file has record and the next has ZERO records.

The cobol code tries to display the record after reading it from the input files.

When records are present in the second file there is no abend.
When given DUMMY in the place of second file( instead of ZERO records) the job concludes successfully.

I need to know the reason for the abend and If is there any fix in JCL for the same....

PS: The second concatinated file may of may not contain records.
Back to top
View user's profile Send private message
gcicchet

Senior Member


Joined: 28 Jul 2006
Posts: 1702
Location: Australia

PostPosted: Mon Sep 28, 2009 11:57 am
Reply with quote

Hi,

when the second file is empty, is it initialised ie does it have an end of file mark ?

Gerry
Back to top
View user's profile Send private message
prabhanjana p

New User


Joined: 06 Aug 2009
Posts: 3
Location: chennai

PostPosted: Mon Sep 28, 2009 12:11 pm
Reply with quote

not sure abt it.....it collects data from previous step, which is a DB2 cobol program, since the quiery in the codes will not fetch the data for the required conditions, the file is left as it is untouched....
Back to top
View user's profile Send private message
gcicchet

Senior Member


Joined: 28 Jul 2006
Posts: 1702
Location: Australia

PostPosted: Mon Sep 28, 2009 12:24 pm
Reply with quote

Hi,

see link ibmmainframes.com/viewtopic.php?t=14786&highlight=eof+mark


Gerry
Back to top
View user's profile Send private message
prabhanjana p

New User


Joined: 06 Aug 2009
Posts: 3
Location: chennai

PostPosted: Mon Sep 28, 2009 1:25 pm
Reply with quote

I got the solution for the same....
The file needs to be initialized to be used for concatenating.
The JCL is working fine now.
Thank You.
Back to top
View user's profile Send private message
dbzTHEdinosauer

Global Moderator


Joined: 20 Oct 2006
Posts: 6966
Location: porcelain throne

PostPosted: Mon Sep 28, 2009 3:17 pm
Reply with quote

you could also try using the WORK-AREA option when you READ.
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 -> JCL & VSAM

 


Similar Topics
Topic Forum Replies
No new posts ISAM and abend S03B JCL & VSAM 10
No new posts Abend S0C4 11 (Page Translation Excep... PL/I & Assembler 16
No new posts Merging 2 datasets into one DFSORT/ICETOOL 1
No new posts WER999A - UNSUCCESSFUL SORT 8ED U Ab... SYNCSORT 5
No new posts the system or user abend SF0F R=NULL COBOL Programming 0
Search our Forums:

Back to Top