View previous topic :: View next topic
|
Author |
Message |
rakeshCSC
New User
Joined: 30 Apr 2007 Posts: 1 Location: Hyderabad
|
|
|
|
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 |
|
|
rz061m
New User
Joined: 03 Mar 2006 Posts: 48 Location: Chennai
|
|
|
|
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 |
|
|
pingte
Active User
Joined: 03 Dec 2005 Posts: 120 Location: india
|
|
|
|
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 |
|
|
bansal
New User
Joined: 03 Jan 2007 Posts: 27 Location: Hyderabad
|
|
|
|
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 |
|
Back to top |
|
|
nuthan
Active User
Joined: 26 Sep 2005 Posts: 146 Location: Bangalore
|
|
|
|
IF you are trying to read an Empty VSAM file your job will get error with MAXCC 12. |
|
Back to top |
|
|
|