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
 

 

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: 288
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
This topic is locked: you cannot edit posts or make replies. Cobol GUI (like Editor) Kala Mainframe COBOL Programming 14 Wed May 10, 2017 12:30 pm
No new posts IMS T-Pipe queue counts in a COBOL Pr... Siva NKK Kothamasu IMS DB/DC 0 Tue May 09, 2017 6:31 pm
No new posts Unable to create multiple files using... mbattu COBOL Programming 3 Fri May 05, 2017 5:35 pm
This topic is locked: you cannot edit posts or make replies. Merge two files and update Trailer re... Yashashri JCL & VSAM 1 Thu May 04, 2017 12:54 pm
No new posts COBOL Code Parsers and Lineage Establ... balimanja COBOL Programming 2 Tue May 02, 2017 3:30 am


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