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: 287
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 Append data from two files into a sin... Praveen04 DFSORT/ICETOOL 5 Thu Mar 16, 2017 7:29 pm
No new posts SQL query not working in Cobol program. CuriousMainframer COBOL Programming 14 Wed Feb 22, 2017 5:56 pm
No new posts Execute TSO ACF commands from COBOL-I... supreethi.srid TSO/ISPF 0 Tue Feb 21, 2017 5:19 pm
No new posts Mainframe Interview Questions CICS,CO... akshathan Mainframe Interview Questions 6 Thu Feb 09, 2017 6:38 pm
No new posts Submit job from Cobol with input data abdulrafi COBOL Programming 4 Wed Feb 01, 2017 12:41 pm


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