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
 

 

S0C4 abend when concatinating two datasets

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
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    Post subject: S0C4 abend when concatinating two datasets
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: 1703
Location: Australia

PostPosted: Mon Sep 28, 2009 11:57 am    Post subject:
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    Post subject:
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: 1703
Location: Australia

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

Hi,

see link http://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    Post subject:
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    Post subject: Reply to: S0C4 abend when concatinating two datasets
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    IBMMAINFRAMES.com Support Forums -> JCL & VSAM All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts DUMP DATASETS VS TRACE DATASETS! lind sh CICS 4 Tue Dec 06, 2016 11:31 pm
No new posts IMS BMP program causes 878 system abend Artemk IMS DB/DC 7 Tue Nov 22, 2016 8:26 pm
No new posts abend sort based on count records in ... anatol DFSORT/ICETOOL 5 Mon Oct 17, 2016 10:10 pm
No new posts Single COPY CICS TS datasets and when... Kyle Carroll CICS 2 Tue Oct 11, 2016 9:47 pm
No new posts hot to get details when "EXEC CI... Andi1982 CICS 11 Tue Sep 20, 2016 5:01 pm


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