SKIPREC=x tells DFSORT to skip x records before it starts processing. STOPAFT=y tells DFSORT to stop after y records have been accepted for processing.
As an example, if your input file has:
and you use this DFSORT statement:
your output file will have:
SKIPREC=4 tells DFSORT to skip records 01-04. STOPAFT=3 tells DFSORT to stop after the next 3 records which are 05-07.
Another way you can do the same thing is to use:
This tells DFSORT to start at record 5 and end at record 7.
However, note that with STOPAFT, DFSORT actually stops reading the records when the STOPAFT count is satisfied, so only 7 records will be read, whereas with ENDREC, DFSORT reads all of the records. So STOPAFT is actually more efficient.
If you're not familiar with DFSORT and DFSORT's ICETOOL, I'd suggest reading through "z/OS DFSORT: Getting Started". It's an excellent tutorial, with lots of examples, that will show you how to use DFSORT, DFSORT's ICETOOL and DFSORT Symbols. You can access it online, along with all of the other DFSORT books, from:
I'm seeing this phrase a lot lately from various people. FYI, the correct English phrase is actually "Please do what's necessary.". Although in this context "Please help." would probably be more appropriate, albeit somewhat redundant since this is a help board.