IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

Will JOB Abend if Use empty VSAM file


IBM Mainframe Forums -> JCL & VSAM
Post new topic   Reply to topic
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
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
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
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
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
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 View Bookmarks
All times are GMT + 6 Hours
Forum Index -> JCL & VSAM

 


Similar Topics
Topic Forum Replies
No new posts Compare 2 files and retrive records f... DFSORT/ICETOOL 3
No new posts FTP VB File from Mainframe retaining ... JCL & VSAM 8
No new posts Extract the file name from another fi... DFSORT/ICETOOL 6
No new posts How to split large record length file... DFSORT/ICETOOL 10
No new posts Extracting Variable decimal numbers f... DFSORT/ICETOOL 17
Search our Forums:

Back to Top