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

Sort in JCL


IBM Mainframe Forums -> DFSORT/ICETOOL
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
sivasaras

New User


Joined: 29 Sep 2007
Posts: 93
Location: chenna/i-

PostPosted: Tue Sep 15, 2015 9:54 pm
Reply with quote

hi,

I have 2 files like below.

First dataset:

Code:
MA.MAAS.TEST  ABC123
MA.MAA.**        PQD456


Second dataset:

Code:
ABC123  SIVA
PQD456  SARAS


I want the output file like

Code:
MA.MAAS.TEST ABC123 SIVA
MA.MAA.**       PQD456 SARAS



How can it be done by sort?

Both having LRECL=255 and RECFM=fb

Please let me know

[Coded and de-capped]
Back to top
View user's profile Send private message
RahulG31

Active User


Joined: 20 Dec 2014
Posts: 446
Location: USA

PostPosted: Tue Sep 15, 2015 10:19 pm
Reply with quote

Are the columns fixed lengths?

Can there be multiple rows containing same value for Column1 in File 2 (and column 2 in file1 i.e. multiple ABC123) ?

What if a match is not found in either file?

And have you searched before posting?
.
Back to top
View user's profile Send private message
Nic Clouston

Global Moderator


Joined: 10 May 2007
Posts: 2453
Location: Hampshire, UK

PostPosted: Wed Sep 16, 2015 1:51 am
Reply with quote

You have been a member for 8 years. Surely you know that SORT is not JCL and that what you want is sort control cards and not JCL? So why can you not post in the correct part of the forum?

And why can you not use the code tags for your data/code as you should?

And why not explain how you get your output from yur input instead of having helpers guess?

Moving to DFSort, If your sort product is not DFSort then let us know who provides your sort product and it can be moved again.
Back to top
View user's profile Send private message
Rohit Umarjikar

Global Moderator


Joined: 21 Sep 2010
Posts: 2572
Location: NYC,USA

PostPosted: Wed Sep 16, 2015 2:30 am
Reply with quote

Search for "Sort tricks DFSORT" on Google and download the pdf link and look for the examples of join keys. However, search on the fourm too.
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 -> DFSORT/ICETOOL

 


Similar Topics
Topic Forum Replies
No new posts Very Large Sort failed - Seeking reco... DFSORT/ICETOOL 7
No new posts Date conversion using SORT SYNCSORT 4
No new posts Which SORT utility can improve the Pe... DFSORT/ICETOOL 16
No new posts Using sort on VB records based on off... DFSORT/ICETOOL 6
No new posts COBOL VS SORT Utility for file format... COBOL Programming 6
Search our Forums:

Back to Top