TSO-ISPF JCL COBOL VSAM DB2 CICS Tools Articles Job Portal Forum Quiz Interview Q&A

Delete ISPF/PDF Edit Macro Command


Delete command is used to delete selected lines from current data set.

ISREDIT DELETE { ALL X or NX [lptr-range]}
                              {[ALL] X or NX lptr-range}
                              {lptr}
                              {lptr-range}

  • 'ALL' indicates all matching lines will be deleted.

  • 'X ! NX' parameters indicate the lines being deleted will be those that are excluded or not excluded, respectively.

  • The 'lptr' parameter indicates a label or relative line number is to be used to specify which lines will be deleted.

  • The 'lrange' parameter indicates a range of relative line numbers or labels specifying the range of lines to be deleted.

  • When either one is omitted, then one of the defaults, .ZFIRST and .ZLAST, will be used.


Example:

Example 1:

Delete all non-excluded lines.

ISREDIT DELETE ALL NX

Example 2:

Delete the lines between labels .HERE and .THERE that have a blank in column 1.

ISREDIT RESET X .HERE .THERE
ISREDIT EXCLUDE ALL " " 1 .HERE .THERE
ISREDIT DELETE ALL X .HERE .THERE

Example 3:

Delete the last line of the current data set.

ISREDIT DELETE .ZLAST

Example 4:

Delete the first 15 lines of current data set

ISREDIT DELETE 1 15


Return Code:

Possible return codes are:

  • 0: The service ended successfully, deleting the lines.

  • 4: No lines were deleted.

  • 8: No standard records exist to be deleted.

  • 12: A line number was invalid.

  • 20: A critical error has occurred.


If you have any doubts or queries related to this chapter, get them clarified from our Mainframe experts on ibmmainframer Community!

Are you looking for Job Change? Job Portal