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

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

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: 8165
Location: East Dubuque, Illinois, 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 FTP Skip or ignore error and process ... AJAYREDDY All Other Mainframe Topics 3 Wed Sep 27, 2017 8:12 pm
No new posts Comparing 2 Files using Current time arunsoods SYNCSORT 9 Fri Sep 22, 2017 6:00 pm
No new posts Split 1 file into 10 output Files - S... Prasanth Kumar SYNCSORT 5 Sat Sep 16, 2017 12:02 am
No new posts BUILD OUTFIL based on condition other... balaji81_k DFSORT/ICETOOL 13 Fri Sep 08, 2017 11:06 pm
No new posts Join records from 2 files with No Dup... Poha Eater DFSORT/ICETOOL 22 Sun Aug 27, 2017 10:35 pm

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