by 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.