CreatePDS
This command is used to create a new cataloged partitioned data set (PDS). It does nothing if the data set already exists. The command has two attributes: the data set name and the creation options.
def newPDS = new CreatePDS()
newPDS.setDataset("USR1.SRC.COBOL")
newPDS.setOptions("cyl space(1,1) lrecl(80) dsorg(PO) recfm(F,B) dsntype(library)")
newPDS.execute()
The CreatePDS command also supports setter method chaining, which provides a more compact and readable way to define a command for execution. For example:
new CreatePDS().dataset("USR1.SRC.COBOL").options("cyl space(1,1) lrecl(80) dsorg(PO) recfm(F,B) dsntype(library)").execute()
The CreatePDS command uses the BPXWDYN text interface to dynamically allocate a new cataloged data set. The options attribute must consist of valid BPXWDYN dynamic allocation options.