Posted: Sat Apr 17, 2004 1:27 am Post subject: Copying few records in a big file!!!!
Hi Friends,
I have a Input sequential file containing around 1 lakh records and want to copy around 30000 records to the output sequential file. But the 30000 records to be copied are in the following sequence
a) From 1 to 10000
b) From 40000 to 50000
c) From 90000 to 100000
ie around 30000 records in the output file
This is the requirement friends...can I do it by fileaid online/batch or any other tool..
Thanx in advance..
Regards,
Lal..
Joined: 26 Nov 2002 Posts: 12375 Topics: 75 Location: San Jose
Posted: Sat Apr 17, 2004 8:20 am Post subject:
LAL,
Here is a simple 1 pass sort step which will give you the desired results. I assuming that your input file is 80 bytes in length and is of FB recfm format.
A brief explanation of the Job. We a seqnum which acts like a rec no at the end of every record. Now we will use include on the outfil and select only the records which are needed. And finally while writting out we strip off the seqnum using outrec.
Joined: 02 Dec 2002 Posts: 1618 Topics: 31 Location: San Jose
Posted: Sat Apr 17, 2004 9:41 am Post subject:
Lal,
Kolusu's one pass DFSORT job is the most efficient, but it must be changed for different LRECLs. For what it's worth, here's a two pass DFSORT/ICETOOL that doesn't have to be changed for different LRECLs:
_________________ Frank Yaeger - DFSORT Development Team (IBM)
Specialties: JOINKEYS, FINDREP, WHEN=GROUP, ICETOOL, Symbols, Migration
DFSORT is on the Web at:
www.ibm.com/storage/dfsort
Joined: 02 Dec 2002 Posts: 1618 Topics: 31 Location: San Jose
Posted: Thu Aug 14, 2008 1:58 pm Post subject:
And here's a simpler and much better one pass job that doesn't have to be changed for different LRECLs. It uses DFSORT's new SUBSET function available with z/OS DFSORT V1R5 PTF UK90013 (July, 2008):
Posted: Fri Oct 17, 2008 6:12 am Post subject: Frank's effort is laudable !
Frank,
I am really surpirsed and must praise you for your effort to post new solutions to the already given solutions using new features of DFSORT. I must appreciate you and your effort is definitely laudable as far as DFSORT solutions are concerned.
For this particular thread, the solution was given in year 2004 and you have given a new solution to the same in year 2008 (this uses new feature of DFSORT) !!! How do you keep track of this You are really making wonders with your acumen of DFSORT product & the greatest thing is the DFSORT help has been multiplied now with KOLUSU joining you.
GREAT.......GREAT......GREAT........ 8)
You are a great institute yourself. I wish and pray God to give you great health and keep going like this forever.
_________________ MF
==
Any training that does not include the emotions, mind and body is incomplete; knowledge fades without feeling.
==
I would agree with MF User. Both Frank and Kolusu are absolute genious when it comes to providing solution in Sort(They are also genious in other areas of Mainframe too ). I have been so inspired by their solutions that whenever I am assigned any task, the first thought that comes to my mind is how to achieve this using SORT. Great work guys and thanks a lot for such a great help and great product.
Joined: 02 Dec 2002 Posts: 1618 Topics: 31 Location: San Jose
Posted: Fri Oct 17, 2008 11:42 am Post subject:
Thanks for all of the kind words. Kolusu and I really appreciate them. I'm extremely happy that Kolusu took me up on my invitation to join the DFSORT Team!
Quote:
How do you keep track of this
By doing exactly that - I keep track of them in a file by URL so I can refer back to them.
Quote:
They are also genious in other areas of Mainframe too
Kolusu's broad knowledge of other Mainframe areas never ceases to amaze me. But I can't claim that kind of knowlege except for DFSORT and ICETOOL. _________________ Frank Yaeger - DFSORT Development Team (IBM)
Specialties: JOINKEYS, FINDREP, WHEN=GROUP, ICETOOL, Symbols, Migration
DFSORT is on the Web at:
www.ibm.com/storage/dfsort
Kolusu's broad knowledge of other Mainframe areas never ceases to amaze me.
I am envious about it......... Just kidding. I wonder how Kolusu gets time to do that. _________________ MF
==
Any training that does not include the emotions, mind and body is incomplete; knowledge fades without feeling.
==
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum