Delete data set members

With ZOAU, you can delete the member ${prefix}.PROJ23.COBOL(MORTGAGE) in the following ways:

  • Issuing a shell command:

    • Option 1:
    mrm "${prefix}.PROJ23.COBOL(MORTGAGE)"
    
    • Option 2:
    mvscmdauth --pgm=IDCAMS --sysprint=dummy --sysin=stdin <<zz
      DELETE ${prefix}.PROJ23.COBOL(MORTGAGE)
    zz
    
  • Calling an API in Python programs:

    datasets.delete_members("%s.PROJ23.COBOL(MORTGAGE)" % HLQ)
    

Without ZOAU, to achieve the same purpose, you need to write the following JCL statements:

//*
//* Remove (delete) the PDS member MORTGAGE from
//* the dataset @@HLQ@@.ZOASAMP.PROJ23.COBOL
//* Returns 0 if successful, non-zero otherwise
//*
//MRM     EXEC PGM=IDCAMS
//SYSPRINT DD SYSOUT=*
//SYSIN DD *
  DELETE @@HLQ@@.ZOASAMP.PROJ23.COBOL(MORTGAGE)
/*