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
 

 

Will JOB Abend if Use empty VSAM file

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
View previous topic :: :: View next topic  
Author Message
rakeshCSC

New User


Joined: 30 Apr 2007
Posts: 1
Location: Hyderabad

PostPosted: Tue Jun 05, 2007 12:54 pm    Post subject: Will JOB Abend if Use empty VSAM file
Reply with quote

Hi,

i have a query like i am gng to use an empty VSAM file in my program,
at that time will i get any compilation error or job will be abebded with any file status plz let me know.

Regards
Y.Srinivasa Rakesh
Back to top
View user's profile Send private message

rz061m

New User


Joined: 03 Mar 2006
Posts: 48
Location: Chennai

PostPosted: Tue Jun 05, 2007 2:31 pm    Post subject:
Reply with quote

Hi,

YES, of course. If you use and empty file(just created) it will abend saying "file does not exist". To avoid this have a dummy record in the VSAM file or Open the file in OUTPUT mode and then close it, before opening in it again. By this way you will can avoid the progarm from abending.

Thanks,
Karthik. P
Back to top
View user's profile Send private message
pingte

Active User


Joined: 03 Dec 2005
Posts: 120
Location: india

PostPosted: Tue Jun 05, 2007 4:27 pm    Post subject:
Reply with quote

Hi Rakesh,

there will not be any compilation error. During compilation the existence of file is not checked. Only syntax checking is done.

But of course the job will abend.

To avoid this scenario of opening empty VSAM and abending, you can use SELECT OPTIONAL clause in FD section.
Back to top
View user's profile Send private message
bansal

New User


Joined: 03 Jan 2007
Posts: 27
Location: Hyderabad

PostPosted: Wed Jun 06, 2007 6:58 pm    Post subject: Re: Will JOB Abend if Use empty VSAM file
Reply with quote

To add to the above , u can specify the dummy record in the jcl by specifying AMP='AMORG'

This parameter will treat it as a VSAM file.

Hope this helps icon_biggrin.gif
Back to top
View user's profile Send private message
nuthan

Active User


Joined: 26 Sep 2005
Posts: 146
Location: Bangalore

PostPosted: Thu Jun 07, 2007 4:40 pm    Post subject: Re: Will JOB Abend if Use empty VSAM file
Reply with quote

IF you are trying to read an Empty VSAM file your job will get error with MAXCC 12.
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 -> JCL & VSAM All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Changing of LRECL of a file abdulrafi DFSORT/ICETOOL 2 Fri Mar 24, 2017 3:25 pm
No new posts splitting a file abdulrafi DFSORT/ICETOOL 4 Fri Mar 24, 2017 11:51 am
No new posts Receive a file using PCOMM macro Harald.v.K IBM Tools 0 Thu Mar 23, 2017 6:50 pm
No new posts Export flat file data into excel sheet murali.andaluri DFSORT/ICETOOL 2 Mon Mar 20, 2017 5:39 pm
No new posts Formatting VB File Learncoholic DFSORT/ICETOOL 3 Mon Mar 20, 2017 12:29 pm


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