'Breaking' a VSAM KSDS



'Breaking' a VSAM KSDS

Postby Aki88 » Sun Jan 18, 2015 10:41 pm

Hello,

I know it is not advisable, but out of curiosity - is it possible to "completely empty" a KSDS, 'completely empty' here means removing the control information of the KSDS as well.

Scenario: there is a KSDS which has some records in it, now same has been emptied by using an IDCAMS REPRO with a 'DD DUMMY' INDD statement. Is there a way to end up deleting the control info as well, thereby rendering the KSDS unusable even in OPEN/EDIT/WRITE mode. Corrupting a KSDS is different, what I am referring to is removing the bits themselves which are set/reset depending on the type of access and other similar control info.

And before I get bashed for asking, I know that this is a bad question, though trust me there is good story behind this one.

Thanks.
Aki88
 
Posts: 381
Joined: Tue Jan 28, 2014 1:52 pm
Has thanked: 33 times
Been thanked: 36 times

Re: 'Breaking' a VSAM KSDS

Postby enrico-sorichetti » Mon Jan 19, 2015 2:38 am

though trust me there is good story behind this one.

tell us the story so that we can give You a good answer
cheers
enrico
When I tell somebody to RTFM or STFW I usually have the page open in another tab/window of my browser,
so that I am sure that the information requested can be reached with a very small effort
enrico-sorichetti
Global moderator
 
Posts: 3006
Joined: Fri Apr 18, 2008 11:25 pm
Has thanked: 0 time
Been thanked: 165 times

Re: 'Breaking' a VSAM KSDS

Postby Aki88 » Mon Jan 19, 2015 1:00 pm

Hello Enrico,

A fair while back, while emptying out a KSDS using IDCAMS I'd managed to render it unusable. I understand- playing with the KSDS might've corrupted it, would be the plausible conclusion here.
Though I was able to recreate the aformentioned KSDS corruption by using the same JCL, which had a delete/define of KSDS step, and a subsequent IDCAMS/or another utility program for emptying it (it is this step which I am unable to recall, though I am positive on the point that it was an IBM utility program). This same JCL minus the del/def step, when run with a KSDS having data would again yield the same results i.e. not-working-empty KSDS.

It might come as mixing of terminologies here, though, I'd verified LISTCAT of this DS as well, it didn't show anything except for a couple of informational messages (I am unable to recall the same).
File management tools as File-Manager, File-Aid etc, all showed the message- Dataset is Empty, and not the usual - dataset is unusable - message, which is thrown if the dataset is corrupted. The thing to note here is, FM or FA both allow the user to open the dataset in EDIT mode/View mode even if the DS is empty, in this case same wasn't working (message thrown was DS is empty). COBOL file open wasn't working, the usual file-stat '97' was being set, IDCAMS VERIFY kept returning informational message (I am unable to recall them).
Any attempt to write data to this KSDS using IDCAMS REPRO failed with a CC 8.
On searching the web for the reason, what I'd come to understand back then was that I'd somehow managed to remove the file control information; though it didn't make any sense to me as to how this is even possible.

A few days back during a training session I tried recreating the steps, but couldn't work it out as I was unable to recall the program I'd used back then or the informational messages; hence the query that is it even possible to delete the control information of a KSDS using a utility program. This query is only to understand the KSDS organization better; like I'd said earlier, it is indeed a bad question, though out of curiosity; any guidance is much appreciated.

Thanks.
Aki88
 
Posts: 381
Joined: Tue Jan 28, 2014 1:52 pm
Has thanked: 33 times
Been thanked: 36 times

Re: 'Breaking' a VSAM KSDS

Postby enrico-sorichetti » Mon Jan 19, 2015 2:48 pm

not enough info to continue!
cheers
enrico
When I tell somebody to RTFM or STFW I usually have the page open in another tab/window of my browser,
so that I am sure that the information requested can be reached with a very small effort
enrico-sorichetti
Global moderator
 
Posts: 3006
Joined: Fri Apr 18, 2008 11:25 pm
Has thanked: 0 time
Been thanked: 165 times

Re: 'Breaking' a VSAM KSDS

Postby Aki88 » Mon Jan 19, 2015 3:07 pm

Hello Enrico,

I am sorry, but I really don't have more details, whatever I've written is basis what I could recollect, else I'd have built the JCL and shared the error/info messages post its execution.

Though, just a summary question:

Aki88 wrote:is it even possible to delete the control information of a KSDS


Thanks.
Aki88
 
Posts: 381
Joined: Tue Jan 28, 2014 1:52 pm
Has thanked: 33 times
Been thanked: 36 times

Re: 'Breaking' a VSAM KSDS

Postby Mickeydusaor » Thu Jan 22, 2015 3:36 am

if this dataset has an alternate index you will end up having this problem if you did not deal the alternate first.
User avatar
Mickeydusaor
 
Posts: 29
Joined: Fri Feb 24, 2012 11:24 pm
Has thanked: 1 time
Been thanked: 0 time

Re: 'Breaking' a VSAM KSDS

Postby Aki88 » Thu Jan 22, 2015 1:19 pm

Hello Mickeydusaor,

Mickeydusaor wrote:if this dataset has an alternate index you will end up having this problem if you did not deal the alternate first.


The DS is a plain old KSDS, requirement is to break it thereby resulting in similar situation as stated in previous posts.

Thanks.
Aki88
 
Posts: 381
Joined: Tue Jan 28, 2014 1:52 pm
Has thanked: 33 times
Been thanked: 36 times


Return to Stupid Questions

 


  • Related topics
    Replies
    Views
    Last post