🖥 JCL
JCL Utilities - IEBCOPY
Intermediate 🕑 15 min read
👁 0 views
15
Code Example
## JCL Utilities - IEBCOPY
IEBCOPY copies, compresses, and manages Partitioned Data Sets (PDS/PDSE).
### Standard DD Names
| DD Name | Purpose |
|---------|---------|
| SYSUT1-4 | Input datasets |
| SYSUT3-4 | Work datasets |
| SYSIN | Control statements |
| SYSPRINT | Messages |
### Operations
1. **COPY** - Copy members
2. **UNLOAD** - PDS to sequential
3. **LOAD** - Sequential to PDS
4. **COMPRESS** - Reclaim space in-place
### COPY Statement
\`\`\`jcl
COPY OUTDD=output,INDD=input
SELECT MEMBER=(mem1,mem2,...)
EXCLUDE MEMBER=(mem1,mem2,...)
\`\`\`
### SELECT with Rename
\`\`\`jcl
SELECT MEMBER=((oldname,newname))
\`\`\`
### COMPRESS (In-Place)
\`\`\`jcl
COPY OUTDD=lib,INDD=lib
\`\`\`
### Unload to Sequential
\`\`\`jcl
UNLOAD OUTDD=seqfile,INDD=pds
\`\`\`
### Return Codes
- 0: Success
- 4: Member not found (partial success)
- 8: Error
- 12: Severe
- 16: Terminating