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
 
Empty KSDS Files

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

New User


Joined: 20 Aug 2015
Posts: 3
Location: Gurgaon

PostPosted: Fri Aug 21, 2015 2:44 pm    Post subject: Empty KSDS Files
Reply with quote

I have 2 KSDS Files, One which I deleted defined and it contains No Records. And the other KSDS File, from which I deleted all the records.

There is a difference in these 2 files, Can anybody please let me know what it is.
When i am browsing the first one, I am not able to browse it, it says Empty File. But I can browse the second file, although that also does not have any record. I tried giving the 2 files in JCL as input. For first one, JCL fails with file status code 35, as we all know we can not open empty VSAM file for input. But with Second type of file, JCL runs smoothly without giving any error
Back to top
View user's profile Send private message

Bill Woodger

DFSORT Moderator


Joined: 09 Mar 2011
Posts: 7314

PostPosted: Fri Aug 21, 2015 3:50 pm    Post subject: Reply to: Empty KSDS Files
Reply with quote

To be opened successfully for reading, a KSDS must have had at least one record written to it, even if it currently contains no records.
Back to top
View user's profile Send private message
Jeenu Bajaj

New User


Joined: 20 Aug 2015
Posts: 3
Location: Gurgaon

PostPosted: Fri Aug 21, 2015 4:11 pm    Post subject: Reply to: Empty KSDS Files
Reply with quote

But when I deleted all records from KSDS File, I was still able to browse the file
Back to top
View user's profile Send private message
Bill Woodger

DFSORT Moderator


Joined: 09 Mar 2011
Posts: 7314

PostPosted: Fri Aug 21, 2015 4:25 pm    Post subject: Reply to: Empty KSDS Files
Reply with quote

Yes.... and?
Back to top
View user's profile Send private message
Robert Sample

Global Moderator


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

PostPosted: Fri Aug 21, 2015 5:48 pm    Post subject:
Reply with quote

You need to find and read the Redbook VSAM Demystified where you can find all sorts of information about VSAM. The behavior you posted is normal and expected -- VSAM distinguishes between an empty file (that has never had a record) and a file with no records in it. They are not the same, so why would you expect the browse (or anything else, for that matter) to work the same?
Back to top
View user's profile Send private message
Jeenu Bajaj

New User


Joined: 20 Aug 2015
Posts: 3
Location: Gurgaon

PostPosted: Fri Aug 21, 2015 7:01 pm    Post subject: Reply to: Empty KSDS Files
Reply with quote

Ok. Got it!! Thanks a ton guys for your answers!!
Back to top
View user's profile Send private message
Pete Wilson

Active User


Joined: 31 Dec 2009
Posts: 445
Location: London

PostPosted: Tue Sep 08, 2015 2:48 am    Post subject:
Reply with quote

Jeenu..once you load a record to a VSAM file it formats the Control Interval (or CI...kind of like a block in NONVSAM terms) and leaves it formatted even if you delete the record.

If no record is ever loaded to the file there are no formatted CI's and VSAM recognises the difference.

There's a program around on the web called VSAMINIT that will 'initialise' a file for you by inserting and (optionally) deleting a record into the file, but you could write your own version to.
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 Compare two PS files using ICE TOOL f... SENTHIL MURUGAAN DFSORT/ICETOOL 5 Sun Dec 24, 2017 1:26 pm
No new posts KSDS and Index file in cobol deepak14450 COBOL Programming 9 Fri Dec 22, 2017 9:36 am
No new posts ISSUE IN copying Sequential file reco... thesumitk JCL & VSAM 2 Wed Dec 13, 2017 3:07 pm
No new posts Compare VSAM files using DFSORT pshongal DFSORT/ICETOOL 5 Thu Nov 23, 2017 10:24 am
No new posts unable to set RC = 4 when empty file migusd SYNCSORT 1 Tue Nov 21, 2017 1:21 am

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