Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

Syncsort question to use same sort fields for two files

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
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    Post subject: Syncsort question to use same sort fields for two files
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: 3158
Location: Tucson AZ

PostPosted: Wed Mar 05, 2008 9:10 pm    Post subject: Re: Syncsort question.
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    Post subject:
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

Senior Member


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

PostPosted: Wed Mar 05, 2008 10:58 pm    Post subject: Re: Syncsort question to use same sort fields for two files
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: 500
Location: USA

PostPosted: Thu Mar 06, 2008 2:05 am    Post subject: Re: Syncsort question to use same sort fields for two files
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: 500
Location: USA

PostPosted: Thu Mar 06, 2008 2:07 am    Post subject: Re: Syncsort question to use same sort fields for two files
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    Post subject: Reply to: Syncsort question to use same sort fields for two
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

Global Moderator


Joined: 14 Mar 2007
Posts: 10202
Location: italy

PostPosted: Thu Mar 06, 2008 8:23 pm    Post subject: Reply to: Syncsort question to use same sort fields for two
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: 500
Location: USA

PostPosted: Thu Mar 06, 2008 9:02 pm    Post subject:
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

Senior Member


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

PostPosted: Thu Mar 06, 2008 11:07 pm    Post subject:
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    Post subject:
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

Senior Member


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

PostPosted: Sat Mar 08, 2008 6:31 am    Post subject:
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    Post subject: Yes
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: 500
Location: USA

PostPosted: Wed Mar 12, 2008 8:53 pm    Post subject:
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    Post subject: No
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: 500
Location: USA

PostPosted: Thu Mar 13, 2008 8:07 pm    Post subject: Re: No
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    IBMMAINFRAMES.com Support Forums -> JCL & VSAM All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts syncsort: copy lines after the keyword shreya19 SYNCSORT 7 Fri Dec 02, 2016 9:47 am
No new posts High CPU consumption Job using IAM fi... aswinir JCL & VSAM 8 Thu Dec 01, 2016 8:28 pm
No new posts Limit duplicate records in the SORT pshongal SYNCSORT 6 Mon Nov 21, 2016 12:54 pm
No new posts How to convert the VBM file to VB or... Sulabh Agrawal JCL & VSAM 4 Fri Nov 18, 2016 1:04 pm
No new posts Match or compare two files in VB Format anatol DFSORT/ICETOOL 14 Thu Nov 03, 2016 7:41 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us