View previous topic :: View next topic
|
Author |
Message |
stly Warnings : 1 New User
Joined: 25 Jul 2005 Posts: 93
|
|
|
|
i hav opened a file in input mode which contains zero records ie empty file.do i get any error.if so wat error i may get.
secondly i hav opened a file in ipnput mode n trying to read.but th file is not existing.wat error i may get. |
|
Back to top |
|
|
spriya
New User
Joined: 06 Oct 2005 Posts: 42
|
|
|
|
it simply returns the error msg record was nt found.
corrections r welcome |
|
Back to top |
|
|
Rupesh.Kothari
Member of the Month
Joined: 27 Apr 2005 Posts: 463
|
|
|
|
Hi,
Quote: |
i hav opened a file in input mode which contains zero records ie empty file.do i get any error.if so wat error i may get.
secondly i hav opened a file in ipnput mode n trying to read.but th file is not existing.wat error i may get. |
I believe It will be better if you do teh ame and let us know the result....
Regards
Rupesh |
|
Back to top |
|
|
priyesh.agrawal
Senior Member
Joined: 28 Mar 2005 Posts: 1448 Location: Chicago, IL
|
|
|
|
Quote: |
i hav opened a file in input mode which contains zero records ie empty file.do i get any error.if so wat error i may get. |
OPENING an EMPTY File should not produce any Error, but as its an I/p File, at the time you READ this Empty File it'll place a File Status Code= 10.
Quote: |
secondly i hav opened a file in ipnput mode n trying to read.but th file is not existing.wat error i may get. |
It'll lead to JCL ERROR in the JOb you are running for that Program.
Regards,
Priyesh. |
|
Back to top |
|
|
stly Warnings : 1 New User
Joined: 25 Jul 2005 Posts: 93
|
|
|
|
for the second one may i know the error wat v may get |
|
Back to top |
|
|
priyesh.agrawal
Senior Member
Joined: 28 Mar 2005 Posts: 1448 Location: Chicago, IL
|
|
|
|
Quote: |
for the second one may i know the error wat v may get |
JCL ERROR- File Not Found.
Regards,
Priyesh. |
|
Back to top |
|
|
bharathsb
New User
Joined: 23 Feb 2006 Posts: 3
|
|
|
|
stly wrote: |
i hav opened a file in input mode which contains zero records ie empty file.do i get any error.if so wat error i may get.
|
In the First Case If it is a VSAM file then ERROR Code of 212 (VSAM Open Error) would occur |
|
Back to top |
|
|
stly Warnings : 1 New User
Joined: 25 Jul 2005 Posts: 93
|
|
|
|
thank u buddies |
|
Back to top |
|
|
martin9
Active User
Joined: 01 Mar 2006 Posts: 290 Location: Basel, Switzerland
|
|
|
|
hy stly,
1. you get an EOF in your file-status
2. this will never run, JCL error
martin9 |
|
Back to top |
|
|
mmwife
Super Moderator
Joined: 30 May 2003 Posts: 1592
|
|
|
|
Hi Stly,
The ans to 1) depends on what kind of "empty" the file is.
If the file was open and closed properly but no recs were written you get an EOF condition.
If the file was never properly closed and no recs were written you get an error condition. Also if the file was allocated in one step via IEFBR14 or some such and never OPENed for OP and CLOSEd, you get an error condition when attempting to open for IP. Not sure what the status code will be but if you don't use file status the job will abend on OPEN. |
|
Back to top |
|
|
|