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

VSAM open error


IBM Mainframe Forums -> IBM Tools
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
Shubhi Saxena

New User


Joined: 31 Jul 2008
Posts: 8
Location: NOIDA

PostPosted: Thu Sep 03, 2009 2:48 pm
Reply with quote

Hi,

I copied an empty VSAM into another VSAM file using file manager.
When I try to open the first file using file manager, the file opens and the message " Input data set empty" is displayed.
But when I try to open the file that has been copied , I am not able to open the file and I get a message "Data set empty" using file manager. When I try to initialize it in the batch process, then to the file does'nt open and the job aends with user abend 4049.

Can anyone please suggest why this is happening and what can be done to rectify it ?
Back to top
View user's profile Send private message
himanshu7

Active User


Joined: 28 Aug 2007
Posts: 131
Location: At Desk

PostPosted: Thu Sep 03, 2009 4:43 pm
Reply with quote

Hi,

When VSAM files are empty and we try to open it, it gives an error VSAM 160 error code. If opened without any tool like print ids (/) ch and when tried with any tool like file manager or file-aid it displays empty dataset.

Please open the i/p file in edit mode using FM and insert any dummy rec and then copy it to the O/P VSAM file.

You can also do the initialization using REPRO to avoid the error.
Back to top
View user's profile Send private message
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 8696
Location: Dubuque, Iowa, USA

PostPosted: Thu Sep 03, 2009 4:52 pm
Reply with quote

Your first file has had at least one record inserted and then deleted. This initializes the file and allows it to be opened. Since you did not do that for your second file, you get the error message. You do not say what your batch process is, but you will need to open the second file file for OUTPUT (NOT I-O or INPUT), write a record to the file, and then it will open. You can delete the record from the file if you want, but until something has been written to the VSAM file, it cannot be opened.
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 -> IBM Tools

 


Similar Topics
Topic Forum Replies
No new posts Error to read log with rexx CLIST & REXX 11
No new posts Error when install DB2 DB2 2
No new posts Access to non cataloged VSAM file JCL & VSAM 18
No new posts CLIST - Virtual storage allocation error CLIST & REXX 5
No new posts Calling an Open C library function in... CICS 1
Search our Forums:

Back to Top