Joined: 12 Jun 2007 Posts: 64 Topics: 17 Location: Hyderabad
Posted: Sun Sep 02, 2007 6:07 am Post subject: copying recs from multiple i/ps into a output using sort
Hi All,
My requirement is that I have 3 inps file from which I have to take recs of different positions from 3 files and write into a single output file.
And I have different sort cards for the 3 inps file.
EXAM:
INPUT1:
01 manoj
45 rakesh
89 raja
INPUT2:
99 thila
43 hhh
56 fiki
33 sila
INPUT3:
67 yhik
55 ggg
87 kkk
90 zaf
83 ajj
Now my ouput file sholud contain Rec no 2 to 3 from file1, rec no. 1 to 3 from file2 and rec no. 2-4 from file3 after sort card is applied to the input file.
Joined: 02 Dec 2002 Posts: 1618 Topics: 31 Location: San Jose
Posted: Sun Sep 02, 2007 10:06 am Post subject:
It's not clear what you want to do exactly.
What is the RECFM and LRECL of each input file? What is the RECFM and LRECL of the output file?
Quote:
after sort card is applied to the input file.
Do you mean a SORT statement such as:
Code:
SORT FIELDS=(1,2,CH,A)
or do you mean something else? Is it the same SORT statement for all three files or different SORT statements for the different files? What are the SORT statements you want to use?
Please show the expected output records for your example of input records. _________________ 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
RECFM means the record format - Varible or Fixed length.
LRECL states the record length.
Your requirement is not understandable.
Use [code] [\code] tags to enclose your code.
Please explain in detail what you are actually trying to achieve so that we can provide you with some valuable responses.
Vivek G _________________ Vivek G
--------------------------------------
A dream is just a dream. A goal is a dream with a plan and a deadline. (Harvey Mackay)
Joined: 02 Dec 2002 Posts: 1618 Topics: 31 Location: San Jose
Posted: Tue Sep 11, 2007 12:01 pm Post subject:
Computer,
It's not clear what you want and your description of what you want doesn't really match your input/output example, but I'm guessing you want to SORT each input file and then include specific sorted record numbers from it (e.g. records 2-3). Here's a job that does that and produces the output you show from the input you show:
Note that if you want to include records based on conditions, you can use an INCLUDE=(...) operand on the OUTFIL statement instead of STARTREC and ENDREC.
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:
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