Hi Greg,
KSAMUTIL will do this :) see below....
:ksamutil
HP32208A.07.04 THU, JAN 22, 1998, 7:28 AM KSAMUTIL VERSION:A.07.00
>HELP
VALID COMMANDS ARE:
BUILD[B].......TO CREATE A FILE
ERASE..........TO RESET A FILE TO INITIAL CONDITIONS
EXIT[E]........TO LEAVE THIS ROUTINE
PURGE..........TO DELETE A FILE
RENAME[R]......TO RENAME A FILE
SAVE[S]........TO RETAIN A TEMPORARY FILE
VERIFY[V]......TO DESCRIBE FILE CHARACTERISTICS
KEYINFO[KI]....TO OBTAIN KEY FILE INFORMATIONS & TO RECOVER
KEYDUMP[KD]....TO OBTAIN FORMATTED KEY FILE STRUCTURAL DUMP
KEYSEQ[KS].....TO CHECK THE SEQUENCE OF KEY FILE
MORE (Y/N)?
Art "I finally knew an answer... but others will beat me too it :) hehe " Bahrs
>>> "Stigers, Greg ~ AND" <[log in to unmask]> 01/22/98 07:29am >>>
I have an NM KSAM file that contains records, and I now want it to be
empty. I know that I could write a COBOL program to OPEN it OUTPUT, and
voila! I would now have an empty file. I could also purge or rename it,
and rebuild it, but sure as I do that, someone will need to change a key
or a field, and then the BUILD would have to be maintained. I would
prefer to find another, sure way to do this that is less prone to human
error. I don't see where SuprTool can do this for me, nor did I see
anything searching MPEX. The best way I came up with was to rename the
original, then FCopy it to the original name, and use FCOPY
FROM=OLDFILE;TO=(NEWFILE);NEW;SUBSET="",1,EXCLUDE
to "clone" this file. I * think * that has the disadvantage of reading
all of the records in the source file to exclude them. I would like a
better approach, if there is one.
|