The third example of the "Set RC=12 or RC=4 if file is empty, has more than n records, etc" trick in Smart DFSORT Tricks shows an OMIT/INCLUDE being applied, so I'd say the answer to your first question is "yes".
The second might be doable, but I'll let you work on that one.....
Thanks. I am getting many more queries after refering to the example you suggested. Kindly clarify.
File1 - VSAM KSDS 4 Bytes key
SYSIN DD *
By using the above control card I can get 1 copy of record with key '0000'.
1) Is it possible to get 10 copies of the 1 record I select from file1 in 1 step?
2) Assume SORTIN for the above control card has 100 records. Will DFSORT scan all the records in SORTIN? or It directly reads the record with key '0000'?
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: