Here is a sample DFSORT JCL on how to use IFTHEN, OVERLAY, WHEN and HIT.
How to Use IFTHEN, OVERLAY, WHEN, HIT in DFSORT..
//SYSIN DD * INREC IFTHEN =(WHEN=(10,1,CH,EQ'C'),OVERLAY(10:C'+'),HIT=NEXT), IFTHEN=(WHEN=(27,1,CH,EQ'C'),OVERLAY(27:C'+'),HIT=NEXT), and so on SORT FIELDS=COPY OUTREC FIELDS=(1,3122) // Note: HIT=NEXT, tells that to process next IFTHEN
Recent Posts
- Tony Robbins Vocabulary: 50 Powerful Words and Phrases to Improve Your English
- Migrating JSON Files from AWS S3 to PostgreSQL Using AWS Glue and PySpark
- 5 PySpark Performance Anti-Patterns on Databricks (And How to Fix Them)


You must be logged in to post a comment.