z/OS ISPF Services Guide
Previous topic | Next topic | Contents | Contact z/OS | Library | PDF


LMERASE—erase a data set

z/OS ISPF Services Guide
SC19-3626-00

The LMERASE service deletes an entire ISPF library or an MVS™ partitioned data set. All members of the data set are deleted and all statistics are erased. The data set name used must be the cataloged name, not an alias data set name.

Command invocation format

Read syntax diagramSkip visual syntax diagram
>>-ISPEXEC--LMERASE--------------------------------------------->

>--+------------------+--+--------------+--+------------+------->
   '-PROJECT(project)-'  '-GROUP(group)-'  '-TYPE(type)-'   

>--+------------------+--+------------------+------------------->
   |        .-NO--.   |  '-DATASET(dataset)-'   
   '-PURGE(-+-YES-+-)-'                         

>--+----------------+--+--------------------+------------------><
   '-VOLUME(volume)-'  '-PASSWORD(password)-'   

Call invocation format

Read syntax diagramSkip visual syntax diagram
>>-CALL--ISPLINK('LMERASEb'--,-+-project-+--,-+-group-+--------->
                               '-'b'-----'    '-'b'---'   

                 .-'NObbbbbb'-.                                
>--,-+-type-+--,-+-'b'--------+--,-+-dataset-+--,-+-volume-+---->
     '-'b'--'    '-'YESbbbbb'-'    '-'b'-----'    '-'b'----'   

>--,-+-password-+-);-------------------------------------------><
     '-'b'------'      

or

Read syntax diagramSkip visual syntax diagram
>>-CALL--ISPEXEC--(buf-len,--buffer);--------------------------><

You must specify the data set (ISPF library, or MVS partitioned or sequential data set) as a three-level qualified name, or as a 44-character data set name string. If both are specified, ISPF will use the data set name string. If neither is specified, an error message is displayed.  

Parameters

project
The highest-level qualifier in the specification of an ISPF library or of an MVS data set with a three-level qualified data set name. The maximum length of this parameter is 8 characters.
group
The second-level qualifier in the specification of an ISPF library or of an MVS data set with a three-level qualified data set name. The maximum length of this parameter is 8 characters.
type
The third-level qualifier in the specification of an ISPF library or of an MVS data set with a three-level qualified data set name. The maximum length of this parameter is 8 characters.
YES|NO
If YES is specified, LMERASE deletes the data set regardless of its expiration date. If NO is specified, LMERASE deletes the data set only if its expiration date has passed.
dataset
The name of an existing MVS partitioned or sequential data set. A member name or pattern cannot be included if the name is that of a partitioned data set. The maximum length of this parameter is 46 characters, with 2 characters for a beginning and ending single quotation mark, and 44 characters for the data set name. If the single quotation marks are omitted, the users data set prefix from the TSO profile is automatically appended to the front of the data set name.
volume
The serial number of the DASD volume on which the data set resides. This parameter is associated with the data set parameter, but is required only if the data set is not cataloged. If the volume parameter is specified but the data set parameter is not, the volume is ignored. The maximum length of this parameter is 6 characters.
password
The MVS password of the data set. This parameter is required only if the data set is password-protected. Do not specify a password for RACF-protected data sets. The maximum length of this password is 8 characters.
buf-len
A fullword fixed binary integer containing the length of the buffer parameter.
buffer
A buffer containing the name of the service and its parameters in the same form as they would appear in an ISPEXEC invocation for a command invocation.

Return codes

These return codes are possible:
 0
Normal completion.
 8
One of these:
  • Data set is not cataloged or other allocation failure.
  • Data set delete failed.
  • Data set name is an alias.
  • Expiration date not expired and PURGE parameter omitted
  • No data set specified as input
  • PROJECT specified, but GROUP or TYPE not specified.
12
Expiration date not expired and PURGE(NO) specified.
20
Severe error; unable to continue.

Example

This example invokes LMERASE to delete a data set with a three-level qualified data set name that has DEPT877 as its highest-level qualifier, PRIVATE as its second-level qualifier, and CLIST as its third-level qualifier.

Command invocation

ISPEXEC LMERASE PROJECT(DEPT877)          +
                GROUP(PRIVATE)            +
                TYPE(CLIST)               +
                PURGE(YES)

Call invocation

CALL ISPLINK('LMERASE ','DEPT877 ',
                        'PRIVATE ',
                        'CLIST ',
                        'YES     ');
OR
 
Set the program variable BUFFER to contain:
BUFFER = 'LMERASE PROJECT(DEPT877)
                 GROUP(PRIVATE)
                 TYPE(CLIST)
                 PURGE(YES)';
Set the program variable BUFLEN to the length of the variable BUFFER. Issue the command:
CALL ISPEXEC (BUFLEN, BUFFER);

Go to the previous page Go to the next page




Copyright IBM Corporation 1990, 2014