Merge two files with no join keys

In this Mainframe Forum - You can post your queries on DFSORT, ICETOOL , SyncSort & JCL Utilities

Moderators: Frank Yaeger, Moderator Group

Post Reply
Posts: 1
Joined: Thu Jul 21, 2011 6:14 pm

Merge two files with no join keys

Post by ttapada » Thu Jul 21, 2011 6:22 pm

Good afternoon, everybody.

I have 2 files, that are the same structure, that are from different business days and that I compare so I identify changes.
I've done this with JOINKEYS and works fine.

For each I've identified, I'll have to create a record in a third file, that versions records by date.
Structure is:
FROM_DATE;TO_DATE; Business_data....

There's a 4th file, that contains processing date and previous business date.

What I want is to add dates from dates file (4th file I've mentioned) to all records I've identified in first step, so I can then append them to the 3rd file.

I hope I didn't make it to confusing..

Thanks in advance for all help you can provide.

User avatar
Frank Yaeger
Posts: 812
Joined: Sat Feb 18, 2006 5:45 am
Location: San Jose, CA

Post by Frank Yaeger » Fri Jul 22, 2011 1:34 am

I hope I didn't make it to confusing
It's confusing to me.

Are you using DFSORT or Syncsort?

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.

Show the JOINKEYS job you're using.
Frank Yaeger - DFSORT Development Team (IBM) -
Specialties: JOINKEYS, FINDREP, WHEN=GROUP, ICETOOL, Symbols, Migration
=> DFSORT/MVS is on the Web at

Post Reply


Free tutorials from mainframegurukul
  • JCL Tutorial
    Covers all important JCL concepts.
  • Cobol Tutorial
    This tutorials covers all Cobol Topics from STRING to COMP-3.
  • DB2 Tutorial
    DB2 Tutorial focuses on DB2 COBOL Programming.
  • SORT Tutorial
    This Tutorial covers all important aspects of DFSORT with examples
  • CICS Tutorial
    This CICS tutorial covers CICS concepts and CICS Basics, CICS COBOL Programming.
Mainframe Interview questions

Other References
Mainframe Tools and others