View previous topic :: View next topic
|
Author |
Message |
prabhanjana p
New User
Joined: 06 Aug 2009 Posts: 3 Location: chennai
|
|
|
|
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 |
|
|
gcicchet
Senior Member
Joined: 28 Jul 2006 Posts: 1702 Location: Australia
|
|
|
|
Hi,
when the second file is empty, is it initialised ie does it have an end of file mark ?
Gerry |
|
Back to top |
|
|
prabhanjana p
New User
Joined: 06 Aug 2009 Posts: 3 Location: chennai
|
|
|
|
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 |
|
|
gcicchet
Senior Member
Joined: 28 Jul 2006 Posts: 1702 Location: Australia
|
|
Back to top |
|
|
prabhanjana p
New User
Joined: 06 Aug 2009 Posts: 3 Location: chennai
|
|
|
|
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 |
|
|
dbzTHEdinosauer
Global Moderator
Joined: 20 Oct 2006 Posts: 6966 Location: porcelain throne
|
|
|
|
you could also try using the WORK-AREA option when you READ. |
|
Back to top |
|
|
|