Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Profile Log in to check your private messages Log in
 
Question regarding SORT JOIN

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
View previous topic :: :: View next topic  
Author Message
bipinpeter

Active User


Joined: 18 Jun 2007
Posts: 213
Location: Cochin/Kerala/India

PostPosted: Mon Nov 02, 2009 3:42 pm    Post subject: Question regarding SORT JOIN
Reply with quote

Hi All,
My requirement as below,
I have two files , i want to match those two files based on a key and have to create an output file.I can use SORT JOIN for this requirement.

But in the output file i want the records in the same order of input file1.Now i am getting records in sorted order of key.
Is any way?
Back to top
View user's profile Send private message

expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8593
Location: Back in jolly old England

PostPosted: Mon Nov 02, 2009 3:47 pm    Post subject:
Reply with quote

Please post your code and all of the relevant details of the reord format, LRECL, key positions, lengths and formats.
Back to top
View user's profile Send private message
Anuj Dhawan

Senior Member


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

PostPosted: Mon Nov 02, 2009 3:48 pm    Post subject:
Reply with quote

1. Are you using SyncSort - as you've mentioned about "Sort JOIN"?
2. Do you have duplicates in inputs, as you talk about order of records?
Back to top
View user's profile Send private message
bipinpeter

Active User


Joined: 18 Jun 2007
Posts: 213
Location: Cochin/Kerala/India

PostPosted: Mon Nov 02, 2009 3:53 pm    Post subject:
Reply with quote

I am using the SYNCSORT.
I dont have duplicate records in input file.
Back to top
View user's profile Send private message
bipinpeter

Active User


Joined: 18 Jun 2007
Posts: 213
Location: Cochin/Kerala/India

PostPosted: Mon Nov 02, 2009 4:02 pm    Post subject:
Reply with quote

Hi,
Here is my sort card,

JOINKEYS FILE=F1,FIELDS=(51,8,A)
JOINKEYS FILE=F2,FIELDS=(41,8,A)
JOIN UNPAIRED
REFORMAT FIELDS=(F1:51,8,F2:51,8,1,5,39,1)
SORT FIELDS=COPY

After this i want the output file order as same of input file order.
Back to top
View user's profile Send private message
Arun Raj

Moderator


Joined: 17 Oct 2006
Posts: 2285
Location: @my desk

PostPosted: Mon Nov 02, 2009 9:21 pm    Post subject:
Reply with quote

Quote:
But in the output file i want the records in the same order of input file1
Bipin,

As you have already discovered yourself, output files will be sorted by the 'JOINKEY' after the JOIN operation . But you can always change the sort order by mentioning the output sort order in the SORT FIELDS statement.

Since you have a JOIN UNPAIRED application, you can have output records which are present in file-2 but not present in file-1. What about the sort order for these records?
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 question about dfsms management clas... Hervey Martinez IBM Tools 0 Tue Oct 10, 2017 6:19 pm
No new posts sort records based on length exceeds ... maxsubrat DFSORT/ICETOOL 7 Wed Oct 04, 2017 4:48 pm
No new posts JOINKEYS Paired and Unpaired Sort MFwhiz DFSORT/ICETOOL 4 Fri Sep 29, 2017 1:48 am
No new posts Difference in SORT & ICETOOL Mohan Kothakota DFSORT/ICETOOL 5 Fri Sep 22, 2017 4:56 pm
No new posts OC4 in SORT Mohan Kothakota DFSORT/ICETOOL 2 Tue Sep 12, 2017 6:30 pm

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us