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
 

 

File Matching Logic is possible through sort

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL
View previous topic :: :: View next topic  
Author Message
sid_aec

New User


Joined: 01 Jul 2008
Posts: 60
Location: Kolkata

PostPosted: Sun Aug 02, 2009 1:07 pm    Post subject: File Matching Logic is possible through sort
Reply with quote

Hi,
In an interview I have been asked the below question:
One file have 1000 records and another file have 2000 records,Need to have one file with the records where the first 15 bytes between the two files matches with each other.If multiple records of first file matches with a second file record then all the records will be there into the third file.
Can anybody tell me how can I do other than writing a cobol program.
Back to top
View user's profile Send private message

santosh.ambaprasad

New User


Joined: 08 Mar 2009
Posts: 16
Location: London

PostPosted: Sun Aug 02, 2009 5:32 pm    Post subject: Reply to: File Matching Logic is possible through sort
Reply with quote

yes.
It is possible to do using ICETOOL(DFSORT)

Do a search on 'SPLICE' in this forums, you will see quite a few posts..

Cheers
Santosh S
Back to top
View user's profile Send private message
sid_aec

New User


Joined: 01 Jul 2008
Posts: 60
Location: Kolkata

PostPosted: Mon Aug 03, 2009 8:56 am    Post subject: Reply to: File Matching Logic is possible through sort
Reply with quote

Please don't mind but as I know to use splice I have to consider one file as base file and records from another file will be joined with the base file records based on matching key and those bytes will be joined to the base record which are mentioned WITH parameter.
But if I want to have the base record too in my output file then how can I achieve and If the both file have duplicates then how can I consider one as a Base file.
Please suggest if you have any trick.
Back to top
View user's profile Send private message
Frank Yaeger

DFSORT Moderator


Joined: 15 Feb 2005
Posts: 7130
Location: San Jose, CA

PostPosted: Mon Aug 03, 2009 8:56 pm    Post subject:
Reply with quote

The KEEPBASE operand of SPLICE keeps the base records.

If you want a complete answer, you need to give a complete description of the problem. Please show an example of the records in each input file (relevant fields only) and what you expect for output. Explain the "rules" for getting from input to output. Give the starting position, length and format of each relevant field. Give the RECFM and LRECL of the input files. If file1 can have duplicates within it, show that in your example. If file2 can have duplicates within it, show that in your example.
Back to top
View user's profile Send private message
sid_aec

New User


Joined: 01 Jul 2008
Posts: 60
Location: Kolkata

PostPosted: Mon Aug 03, 2009 11:31 pm    Post subject: Reply to: File Matching Logic is possible through sort
Reply with quote

THANKS a lot..I just wanted learn the trick and then try myself.Thanks again.
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 -> DFSORT/ICETOOL All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts SORTJOIN - Copy Matched and Unmatched... Steve Ironmonger DFSORT/ICETOOL 5 Tue Jan 17, 2017 4:26 pm
No new posts Copy RECFM =VB TO FB file with RECL =... sahil41352 DFSORT/ICETOOL 3 Wed Dec 28, 2016 11:29 pm
No new posts Add PD field from 2nd file to PD in 1st Sushant Garje DFSORT/ICETOOL 6 Thu Dec 01, 2016 4:32 pm
No new posts File Aid to File Manager conversion murali3955 IBM Tools 4 Thu Nov 24, 2016 3:41 pm
No new posts Limit duplicate records in the SORT pshongal SYNCSORT 6 Mon Nov 21, 2016 12:54 pm


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