View previous topic :: View next topic
|
Author |
Message |
chintu687
New User
Joined: 06 Aug 2009 Posts: 7 Location: Hyderabad
|
|
|
|
I am using an output file in a program, i opened it in output mode and displayed the file status. I did not mention the DD name in the JCL and submitted the job.
The job got executed successfully and the file status displayed was 35.
Now i have coded WRITE statement for the same file and executed the job. Now the job abended with S0C4 and the file status displayed was 96.
Here I have displayed the file status before the WRITE statement.
If the program failed at WRITE statement then the file status should be 35 and abended. But it displayed 96 and abended.
Why the file status has been changed from 35 to 96 even before executing the WRITE statement?
Can somebody explain what happend in the background.
Thank you,
chintu |
|
Back to top |
|
|
Binop B
Active User
Joined: 18 Jun 2009 Posts: 407 Location: Nashville, TN
|
|
|
|
Hi Chintu,
Welcome to the forum...
Did u go through COBOL file status codes. What did they tell you ?
For your Reference
COBOL File Status
Please do look into this and do post us back if you still haven't understood your problem... |
|
Back to top |
|
|
MBabu
Active User
Joined: 03 Aug 2008 Posts: 400 Location: Mumbai
|
|
|
|
wow - I thought web pages with colours that horrible were outlawed in the 1980s after www.webpagesthatsuck.com first came out. |
|
Back to top |
|
|
Robert Sample
Global Moderator
Joined: 06 Jun 2008 Posts: 8696 Location: Dubuque, Iowa, USA
|
|
|
|
Quote: |
Can somebody explain what happend in the background. |
Since you did not provide any code, all we can do is guess, not explain. One possibility is that you attempted to use the buffer or its fields (the 01 level under the FD) which won't work when you get a 35 file status upon OPEN. |
|
Back to top |
|
|
Anuj Dhawan
Superior Member
Joined: 22 Apr 2006 Posts: 6250 Location: Mumbai, India
|
|
|
|
Quote: |
If the program failed at WRITE statement then the file status should be 35 and abended |
From an application programmer point of view, with WRTIE command, sytem assumes, file must be OPENed in OUTPUT, I-O or EXTEND mode (please NOTE: input mode is not included which will casue status 35) so with WRITE you get Status code 96 which means an OPEN statement with I-O or EXTEND phrase was attempted for an optional file, but no DD statement was specified for the file. And this is exactly what your case is. |
|
Back to top |
|
|
dbzTHEdinosauer
Global Moderator
Joined: 20 Oct 2006 Posts: 6966 Location: porcelain throne
|
|
|
|
this same question is posted in another forum (by a member who swears that this thread is not his).
therefore, this is a classroom exercise. |
|
Back to top |
|
|
Binop B
Active User
Joined: 18 Jun 2009 Posts: 407 Location: Nashville, TN
|
|
|
|
interesting.... |
|
Back to top |
|
|
|