View previous topic :: View next topic
|
Author |
Message |
mf_user Currently Banned New User
Joined: 05 Jan 2006 Posts: 47
|
|
|
|
I have two different input files but need to use same sort fields and write to two different output files.
How to achieve it using SYNCSORT? |
|
Back to top |
|
|
William Thompson
Global Moderator
Joined: 18 Nov 2006 Posts: 3156 Location: Tucson AZ
|
|
|
|
mf_user wrote: |
I have two different input files but need to use same sort fields and write to two different output files. |
I'm sorry, but you will need to expand on this.....
Need? Is this a 'requirement'? Or are you looking to have the same sort/copy split them on a match/merge basis? |
|
Back to top |
|
|
Craq Giegerich
Senior Member
Joined: 19 May 2007 Posts: 1512 Location: Virginia, USA
|
|
|
|
Rather then complicating things and making maintenance more of a problem why not just use two sort steps? The extra processing to combine the files then separate them after the sort would use up any savings you would have with one step instead of 2. |
|
Back to top |
|
|
Anuj Dhawan
Superior Member
Joined: 22 Apr 2006 Posts: 6250 Location: Mumbai, India
|
|
|
|
mf_user wrote: |
I have two different input files but need to use same sort fields and write to two different output files. |
Hi,
I think it's doable. Something like this
Code: |
//SORTIN DD DSN=first file
DD DSN=fsecond file |
& prerequisite is that records in first-file & second fine should be identified uniquely, and then use the magic of INREC/OVERLAYSPLICE. Just a thought...
But the better suggestion is already given by Craig.(Craq) |
|
Back to top |
|
|
Alissa Margulies
SYNCSORT Support
Joined: 25 Jul 2007 Posts: 496 Location: USA
|
|
|
|
mf_user wrote: |
I have two different input files but need to use same sort fields and write to two different output files. |
What is the RECFM and LRECL of the input files? What are the sort fields? What is the criteria for each output file? Please provide more details about your job requirements so that we may help you more efficiently. |
|
Back to top |
|
|
Alissa Margulies
SYNCSORT Support
Joined: 25 Jul 2007 Posts: 496 Location: USA
|
|
|
|
mf_user wrote: |
How to achieve it using SYNCSORT? |
... also, which release of SyncSort are you running? |
|
Back to top |
|
|
mf_user Currently Banned New User
Joined: 05 Jan 2006 Posts: 47
|
|
|
|
Hi, Alissa.
We are using "SYNCSORT FOR Z/OS 1.2.2.1RI".
The RECFM is FB and LRECL is 80.
TIA. |
|
Back to top |
|
|
enrico-sorichetti
Superior Member
Joined: 14 Mar 2007 Posts: 10873 Location: italy
|
|
|
|
Quote: |
have two different input files but need to use same sort fields and write to two different output files.
|
It would be nice if You would post Your full need/requirement
If the O/P conveyed all the info You have or if that is all You need,
why complicate your life...
run two sort steps |
|
Back to top |
|
|
Alissa Margulies
SYNCSORT Support
Joined: 25 Jul 2007 Posts: 496 Location: USA
|
|
|
|
MF,
I am still not clear as to what your requirements are.
1. Is Input File1 sorted into Output File1, and Input File2 sorted into Output File2? Or...
2. Are Input Files 1 and 2 sorted together and then written to Output Files 1 and 2 (2 outfiles containing the same output)? Or...
3. Are Input Files 1 and 2 sorted together and then written to Output File1 based on certain criteria and then written to Output File2 based on different criteria?
Please clarify your requirements. |
|
Back to top |
|
|
Anuj Dhawan
Superior Member
Joined: 22 Apr 2006 Posts: 6250 Location: Mumbai, India
|
|
|
|
Quote: |
I am still not clear as to what your requirements are. |
No one perhaps..I repeat..
Quote: |
It would be nice if You would post Your full need/requirement |
|
|
Back to top |
|
|
Craq Giegerich
Senior Member
Joined: 19 May 2007 Posts: 1512 Location: Virginia, USA
|
|
|
|
[quote="Anuj D."]
Quote: |
It would be nice if You would post Your full need/requirement |
That would be expecting to much. |
|
Back to top |
|
|
Anuj Dhawan
Superior Member
Joined: 22 Apr 2006 Posts: 6250 Location: Mumbai, India
|
|
|
|
yeah may be, but perhaps somhwhere TS gets the message that we need some more inforamtion ..to come up with something valuable.. |
|
Back to top |
|
|
mf_user Currently Banned New User
Joined: 05 Jan 2006 Posts: 47
|
|
|
|
Hi, Alissa.
Quote: |
1. Is Input File1 sorted into Output File1, and Input File2 sorted into Output File2?
|
The above is correct.
Thanks. |
|
Back to top |
|
|
Alissa Margulies
SYNCSORT Support
Joined: 25 Jul 2007 Posts: 496 Location: USA
|
|
|
|
Is there a unique identifier in the records of each file to identify which input file it came from? For example, all the records in input File1 have the characters ABC in columns 1-3, whereas File2 records all have XYZ in columns 1-3. |
|
Back to top |
|
|
mf_user Currently Banned New User
Joined: 05 Jan 2006 Posts: 47
|
|
|
|
No such identifier.
It is proving no solution is available to this problem.
I think, should go for the solution suggested by Craq Giegerich.
Thanks. |
|
Back to top |
|
|
Alissa Margulies
SYNCSORT Support
Joined: 25 Jul 2007 Posts: 496 Location: USA
|
|
|
|
mf_user wrote: |
I think, should go for the solution suggested by Craq Giegerich. |
I agree - that is probably your best bet at this point. |
|
Back to top |
|
|
|