IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

Syncsort question to use same sort fields for two files


IBM Mainframe Forums -> JCL & VSAM
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
mf_user
Currently Banned

New User


Joined: 05 Jan 2006
Posts: 47

PostPosted: Wed Mar 05, 2008 8:37 pm
Reply with quote

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
View user's profile Send private message
William Thompson

Global Moderator


Joined: 18 Nov 2006
Posts: 3156
Location: Tucson AZ

PostPosted: Wed Mar 05, 2008 9:10 pm
Reply with quote

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
View user's profile Send private message
Craq Giegerich

Senior Member


Joined: 19 May 2007
Posts: 1512
Location: Virginia, USA

PostPosted: Wed Mar 05, 2008 9:22 pm
Reply with quote

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
View user's profile Send private message
Anuj Dhawan

Superior Member


Joined: 22 Apr 2006
Posts: 6250
Location: Mumbai, India

PostPosted: Wed Mar 05, 2008 10:58 pm
Reply with quote

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
View user's profile Send private message
Alissa Margulies

SYNCSORT Support


Joined: 25 Jul 2007
Posts: 496
Location: USA

PostPosted: Thu Mar 06, 2008 2:05 am
Reply with quote

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
View user's profile Send private message
Alissa Margulies

SYNCSORT Support


Joined: 25 Jul 2007
Posts: 496
Location: USA

PostPosted: Thu Mar 06, 2008 2:07 am
Reply with quote

mf_user wrote:
How to achieve it using SYNCSORT?

... also, which release of SyncSort are you running?
Back to top
View user's profile Send private message
mf_user
Currently Banned

New User


Joined: 05 Jan 2006
Posts: 47

PostPosted: Thu Mar 06, 2008 6:24 pm
Reply with quote

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
View user's profile Send private message
enrico-sorichetti

Superior Member


Joined: 14 Mar 2007
Posts: 10873
Location: italy

PostPosted: Thu Mar 06, 2008 8:23 pm
Reply with quote

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
View user's profile Send private message
Alissa Margulies

SYNCSORT Support


Joined: 25 Jul 2007
Posts: 496
Location: USA

PostPosted: Thu Mar 06, 2008 9:02 pm
Reply with quote

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
View user's profile Send private message
Anuj Dhawan

Superior Member


Joined: 22 Apr 2006
Posts: 6250
Location: Mumbai, India

PostPosted: Thu Mar 06, 2008 11:07 pm
Reply with quote

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
View user's profile Send private message
Craq Giegerich

Senior Member


Joined: 19 May 2007
Posts: 1512
Location: Virginia, USA

PostPosted: Thu Mar 06, 2008 11:15 pm
Reply with quote

[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
View user's profile Send private message
Anuj Dhawan

Superior Member


Joined: 22 Apr 2006
Posts: 6250
Location: Mumbai, India

PostPosted: Sat Mar 08, 2008 6:31 am
Reply with quote

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
View user's profile Send private message
mf_user
Currently Banned

New User


Joined: 05 Jan 2006
Posts: 47

PostPosted: Tue Mar 11, 2008 5:38 pm
Reply with quote

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
View user's profile Send private message
Alissa Margulies

SYNCSORT Support


Joined: 25 Jul 2007
Posts: 496
Location: USA

PostPosted: Wed Mar 12, 2008 8:53 pm
Reply with quote

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
View user's profile Send private message
mf_user
Currently Banned

New User


Joined: 05 Jan 2006
Posts: 47

PostPosted: Thu Mar 13, 2008 7:40 pm
Reply with quote

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
View user's profile Send private message
Alissa Margulies

SYNCSORT Support


Joined: 25 Jul 2007
Posts: 496
Location: USA

PostPosted: Thu Mar 13, 2008 8:07 pm
Reply with quote

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
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> JCL & VSAM

 


Similar Topics
Topic Forum Replies
No new posts Compare 2 files and retrive records f... DFSORT/ICETOOL 3
No new posts Compare 2 files(F1 & F2) and writ... JCL & VSAM 8
No new posts Need to set RC4 through JCL SORT DFSORT/ICETOOL 5
No new posts How to split large record length file... DFSORT/ICETOOL 10
No new posts Write line by line from two files DFSORT/ICETOOL 7
Search our Forums:

Back to Top