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
 
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 Execute JCL step based on the content... sprikitik JCL & VSAM 2 Tue Oct 03, 2017 10:03 am
This topic is locked: you cannot edit posts or make replies. PS file data should be passed as symb... d_sarlie JCL & VSAM 15 Tue Oct 03, 2017 5:18 am
No new posts VSAM RLS Wait time blayek JCL & VSAM 2 Mon Oct 02, 2017 9:05 pm
No new posts Garbage on output file Hervey Martinez SYNCSORT 4 Wed Sep 27, 2017 12:50 am
No new posts File Aid tool to compare numeric data balaji81_k Compuware & Other Tools 2 Tue Sep 26, 2017 3:35 am

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