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

File Matching Logic is possible through sort


IBM Mainframe Forums -> DFSORT/ICETOOL
Post new topic   Reply to topic
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
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
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
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 Developer


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

PostPosted: Mon Aug 03, 2009 8:56 pm
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
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 View Bookmarks
All times are GMT + 6 Hours
Forum Index -> DFSORT/ICETOOL

 


Similar Topics
Topic Forum Replies
No new posts Compare 2 files and retrive records f... DFSORT/ICETOOL 3
No new posts FTP VB File from Mainframe retaining ... JCL & VSAM 8
No new posts Need to set RC4 through JCL SORT DFSORT/ICETOOL 5
No new posts Extract the file name from another fi... DFSORT/ICETOOL 6
No new posts How to split large record length file... DFSORT/ICETOOL 10
Search our Forums:

Back to Top