On 2015-07-22 14:45, Chris Hoelscher wrote:
> An approach I have taken the past several years ...
>
> /* REXX */
> /* DELETE ALL MEMBERS OF A GIVEN LIBRARY DSN */
> /* TRACE 'R' */
> /* TRACE 'O' */
>
Ouch! Are there errors you choose to have unreported?
> DSNAME = 'dataset name'
> DSN = STRIP(DSNAME, 'BOTH', '''') /* IN CASE IT'S IN QUOTES */
> QUOTE = "'"
> QDSN = QUOTE||DSN||QUOTE /* FULLY QUOTED DSN */
>
But what if your user expects TSO prefixing conventions?
I'd just leave the quotes or not, whatever was supplied.
> ADDRESS ISPEXEC
> "LMINIT DATAID( MYDATAID) DATASET(" QDSN ") ENQ(SHRW)"
> "LMOPEN DATAID("MYDATAID") OPTION(OUTPUT)"
> "LMMDEL DATAID("MYDATAID") MEMBER(*)"
>
Does ISPF optize this to STOW I? I sometimes sort a member
list descending before deleting everything, assuming this
results in less thrashing of the directory.
> "LMCLOSE DATAID("MYDATAID")"
> "LMFREE DATAID("MYDATAID")"
>
> SAY DSN " IS NOW EMPTY"
>
And you needn't even compress it. If it's a PDSE.
-- gil
----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [email protected] with the message: INFO IBM-MAIN