We can even use the DFSORT for this having
SKIPREC and SKIPAFT which will eliminate the number of records from the begining and last respectively.
Regards,
Puneet
k_kirru wrote:
Hi KEvin,
Thanks for ur suggestion, could you give more explanation how it works.
Hi Kevin,
Thanks for ur suggestion, could you give more explanation how it works.
OK. Just for clarification, my code presumes a RECFM of FB, LRECL of 80.
On the first copy pass, I used the STARTREC=11 parameter to skip the first 10 records. I also added a sequential record counter to the end of the data in bytes 81-88.
On the second copy pass, I invert the data by sorting on the sequential record count in descending order. Again, here I use the STARTREC=6 parameter to skip the first 5 records, which, because the data is now in reverse order, are actually the last 5 records.
On the third copy pass I restate the original order of the data by once again sorting on the sequential record counter, this time in ascending order. Also, I only include positions 1-80 in the output, thereby stripping the values for the sequential record counts.
here we will take the input file and skip the first 10 records to one output file, using SKIPREC
//step2 exec pgm=sort
here we will take the input from the previous record where we skipped 10 records and sort this file in descending and fallow the same for the 5 records
The thing is here no need of extra files and simplicity than ICETOOL, here i am not making comment about ICETOOL it has lot...& lot of advantages,
but i am thinking about the simple code.
Hi Kevin,
Thanx for ur explanation..........
Here i am trying with VB recfm, so tits giving some problem.
Could you help out how to use for Variable records.
Joined: 15 Feb 2005 Posts: 7129 Location: San Jose, CA
pradeep wrote
Quote:
The thing is here no need of extra files and simplicity than ICETOOL, here i am not making comment about ICETOOL it has lot...& lot of advantages, but i am thinking about the simple code.
Could you please show the actual code for this. I'm not clear on how you can do it without "extra files" or more simply than the ICETOOL job I showed. Of course, my ICETOOL job could be broken up into two DFSORT steps but I don't see how that qualifies as being any "simpler" than using one ICETOOL step.