Mainframe Utility: DELETEME

Return to Mainframe Utilities Page

Module


/********************************************************************/
/*    DELETEME                                                      */
/*                                                                  */
/* PURPOSE:  THIS EDIT MACRO WILL ALLOW A MEMBER IN A PDS TO BE     */
/*           DELETED WHILE EDITING.  ONCE THE DELETION TAKES        */
/*           PLACE, THE PDS MEMBER LIST IS DISPLAYED.               */
/*                                                                  */
/*      CREATED BY JEFF JONES 10/31/89 - SEATTLE SE CENTER          */
/*                                                                  */
/*           C H A N G E        L O G                               */
/*      PROJECT     DATE        ID             COMMENTS             */
/*                                                                  */
/********************************************************************/
ISREDIT MACRO (NOW)
/**** SET MESSAGE DISPLAY ON/OFF BASED ON THE DEBUG SWITCH ***/
ISPEXEC VGET (DBGSWTCH) PROFILE
IF &DBGSWTCH = &STR(ON) THEN CONTROL MSG LIST CONLIST SYMLIST NOFLUSH
ELSE CONTROL NOSYMLIST NOCONLIST NOMSG NOLIST NOFLUSH

IF &NOW = &STR(HELP) THEN +
  GOTO HELPSEC


ISREDIT (EDITDSN) = DATASET
ISREDIT (EDITMBR) = MEMBER
SET &EDITDSN = &NRSTR(&EDITDSN)
SET &EDITMBR = &NRSTR(&EDITMBR)

SET &WKFILE = &NRSTR(&EDITDSN(&EDITMBR))

IF &NOW =    THEN +
    DO
        WRITENR TYPE "Y" TO DELETE &EDITMBR :
        READ ANS
    END

IF &ANS = Y OR &NOW = NOW THEN +
    DO
        DELETE '&WKFILE'
        ISREDIT CANCEL
    END

EXIT

HELPSEC: +
WRITE
WRITE        *** HELP FOR EDIT MACRO 'DELETEME' ***
WRITE
WRITE THE DELETEME MACRO WILL ENABLE A USER WHO IS EDITING A
WRITE MEMBER IN A PDS LIBRARY TO ENTER A SINGLE COMMAND ON THE
WRITE COMMAND LINE TO DELETE THE PDS MEMBER.  FOR EXAMPLE:
WRITE
WRITE    COMMAND ===> DELETEME
WRITE
WRITE CAUTION: DO NOT SET THIS MACRO UP AS A PF KEY.  THERE IS NO
WRITE QUESTION ASKED PRIOR TO THE DELETION OF THE PDS MEMBER.
WRITE
WRITE IF A MEMBER IS ACCIDENTLY DELETED, THE ISPMODE OPTION OF
WRITE DATASET SERVICES (E.P) PROCEDURE CAN BE USED TO RESTORE THE
WRITE MEMBER.
WRITE
WRITE       *** END OF HELP *** NO PROCESSING PERFORMED ***

EXIT
            


Documentation


 This utility allows you to delete the PDS member that you are currently editing
 without having to go to ISPF option 3.1.  To delete the member with a
 confirmation prompt type DELETEME on the command line and press ENTER.  You
 will be prompted with "ARE YOU SURE YOU WANT TO DELETE membername ?".  You may
 answer "Y" or anything else.  If your answer is not "Y" it will not be deleted.
 If you want to delete the member immediately, you may type in DELETEME NOW and
 press ENTER.  This will delete the member immediately.
            


Leave a Reply

Your email address will not be published. Required fields are marked *