The following example demonstrates how to use the UNLOAD command:
Example 1—copy a table generation to an output dataset
Copy the contents of table PARTNO on the tableBASE Library MAINLIB to the dataset identified by the DDNAME PARTFLE.
UNLOAD LIB=MAINLIB TBL=PARTNO TO=PARTFLE;
Target dataset rules
The rules for the target dataset are:
- QSAM DS with DISP=NEW or OLD are allowed; SHR is not allowed and will return error 33.
- BDAM DS is not allowed.
- PDS member with DISP=SHR or OLD is allowed
- PDSE member with DISP=SHR or OLD is allowed
- VSAM DS is not allowed
- DUMMY DD statements are allowed.