Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups 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: 7226

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: 7226

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: 7908
Location: Bellevue, IA

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: 437
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 High CPU consumption Job using IAM fi... aswinir JCL & VSAM 8 Thu Dec 01, 2016 8:28 pm
No new posts Match or compare two files in VB Format anatol DFSORT/ICETOOL 14 Thu Nov 03, 2016 7:41 pm
This topic is locked: you cannot edit posts or make replies. How to use 2 input files in control c... Gunapala CN DFSORT/ICETOOL 23 Thu Oct 13, 2016 3:42 pm
No new posts Adding records from two files into on... shiitiizz SYNCSORT 4 Mon Sep 19, 2016 8:41 pm
No new posts Icetool or Joinkeys example to compar... ishant chauhan DFSORT/ICETOOL 21 Sat Aug 20, 2016 2:40 am


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us