Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Profile Log in to check your private messages Log in
 
related to cobol files

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> COBOL Programming
View previous topic :: :: View next topic  
Author Message
stly
Warnings : 1

New User


Joined: 25 Jul 2005
Posts: 93

PostPosted: Mon Mar 06, 2006 1:36 pm    Post subject: related to cobol files
Reply with 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.
Back to top
View user's profile Send private message

spriya

New User


Joined: 06 Oct 2005
Posts: 42

PostPosted: Mon Mar 06, 2006 2:11 pm    Post subject: Re: related to cobol files
Reply with quote

it simply returns the error msg record was nt found.
corrections r welcome
Back to top
View user's profile Send private message
Rupesh.Kothari

Member of the Month


Joined: 27 Apr 2005
Posts: 464

PostPosted: Mon Mar 06, 2006 2:25 pm    Post subject: Re: related to cobol files
Reply with quote

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
View user's profile Send private message
priyesh.agrawal

Senior Member


Joined: 28 Mar 2005
Posts: 1452
Location: Chicago, IL

PostPosted: Mon Mar 06, 2006 5:37 pm    Post subject: Re: related to cobol files
Reply with quote

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
View user's profile Send private message
stly
Warnings : 1

New User


Joined: 25 Jul 2005
Posts: 93

PostPosted: Tue Mar 07, 2006 1:43 pm    Post subject:
Reply with quote

for the second one may i know the error wat v may get
Back to top
View user's profile Send private message
priyesh.agrawal

Senior Member


Joined: 28 Mar 2005
Posts: 1452
Location: Chicago, IL

PostPosted: Tue Mar 07, 2006 4:39 pm    Post subject: Re: related to cobol files
Reply with quote

Quote:
for the second one may i know the error wat v may get

JCL ERROR- File Not Found.

Regards,
Priyesh.
Back to top
View user's profile Send private message
bharathsb

New User


Joined: 23 Feb 2006
Posts: 3

PostPosted: Wed Mar 08, 2006 11:57 am    Post subject: Re: related to cobol files
Reply with quote

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
View user's profile Send private message
stly
Warnings : 1

New User


Joined: 25 Jul 2005
Posts: 93

PostPosted: Sat Apr 01, 2006 10:34 am    Post subject:
Reply with quote

thank u buddies
Back to top
View user's profile Send private message
martin9

Active User


Joined: 01 Mar 2006
Posts: 290
Location: Basel, Switzerland

PostPosted: Sat Apr 01, 2006 5:20 pm    Post subject:
Reply with quote

hy stly,

1. you get an EOF in your file-status
2. this will never run, JCL error

martin9
Back to top
View user's profile Send private message
mmwife

Super Moderator


Joined: 30 May 2003
Posts: 1592

PostPosted: Sat Apr 01, 2006 11:24 pm    Post subject:
Reply with quote

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
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> COBOL Programming All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts How to display offset thru cobol prog... tvinodkumar7 CICS 2 Sun Apr 22, 2018 8:42 pm
No new posts Linkage editor is part of COBOL, z/OS... ankit.jain COBOL Programming 4 Fri Apr 20, 2018 4:17 pm
This topic is locked: you cannot edit posts or make replies. Difference between EQUAL and EQUAL TO... jithinraghavan COBOL Programming 3 Thu Apr 19, 2018 2:22 am
No new posts Call COBOL or PLI with a click from w... vaibhav gs All Other Mainframe Topics 1 Mon Apr 16, 2018 7:29 pm
No new posts Comparing two sequential files Mohan Kothakota COBOL Programming 14 Mon Apr 16, 2018 6:35 pm

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us