merging files

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

Moderators: Frank Yaeger, Moderator Group

Post Reply
krishnapriya
Member
Posts: 2
Joined: Fri Mar 09, 2012 1:49 pm

merging files

Post by krishnapriya » Fri Mar 09, 2012 2:00 pm

HI,

I WANT TO MERGE TWO FILES.LAYOUT OF TWO FILES IS SAME LY.
FOR EX. I/P FILE1 & FILE2 HAS 3 FIELD.
THE THIRD FIELD CONTAINS 2 BYTE ALPHANUMERIC SUPPOSE IN FILE1 IT IS 10 AND IN FILE2 IT IS 01.
THE TWO FILES ARE SORTED BASED ON FILED1 AND AFTER MERGING IS GOING TO BE DONE.
WHILE MERGING I WANT THE 3RD FIELD TO BE 11 INSTEAD OF 10 IN FILE1 AND 01 IN FILE2

Anuj Dhawan
Moderator
Posts: 1625
Joined: Sat Aug 09, 2008 9:02 am
Location: Mumbai, India

Post by Anuj Dhawan » Fri Mar 09, 2012 3:31 pm

1. TURN OFF YOUR CAPS LOCK.
2. You've posted in COBOL part of the Forum - so are you looking for a COBOL solution? As this can be easily written in a SORT step. (only if I correctly understood what you mean)
3. And before I, for one, attempt to answer, You need to do a good job explaining your requirement:
THE TWO FILES ARE SORTED BASED ON FILED1 AND AFTER MERGING IS GOING TO BE DONE. WHILE MERGING I WANT THE 3RD FIELD TO BE 11 INSTEAD OF 10 IN FILE1 AND 01 IN FILE2
what does bold text mean here?

Possibly show us an example of inputs and the expected output.
Regards,
Anuj

User avatar
dbzTHEdinosauer
Moderator
Posts: 981
Joined: Mon Oct 02, 2006 8:31 pm

Post by dbzTHEdinosauer » Fri Mar 09, 2012 4:09 pm

transfered to dfsort forum, if syncsort, then Frank can move it again

transfered to sort forum,
as Anuj says, can be done very easily in sort.

the solution can be found under the JOINKEYS explanation

if this is homework, then TS can do his own homework.
Dick Brenholtz
JCL, SQL and code in programs have an irritating habit of doing what you say,
not what you meant.

krishnapriya
Member
Posts: 2
Joined: Fri Mar 09, 2012 1:49 pm

Post by krishnapriya » Fri Mar 09, 2012 5:24 pm

Hi,

give the jcl coding and explain it clearly.bcoz i dont understand the process of DFSORT SYNCSORT ICETOOL utillities if it is going to be used in jcl coding.

User avatar
dbzTHEdinosauer
Moderator
Posts: 981
Joined: Mon Oct 02, 2006 8:31 pm

Post by dbzTHEdinosauer » Fri Mar 09, 2012 5:41 pm

you have obviously not bothered to look at the document provided
by the link that I gave you to the JOINKEYS explanation in my previous post,

do so,
no one is going to cut and past and thus repeat what the manuals so ably explain.
Dick Brenholtz
JCL, SQL and code in programs have an irritating habit of doing what you say,
not what you meant.

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

Post by Frank Yaeger » Fri Mar 09, 2012 11:38 pm

krishnapriya,

If you want detailed help, you need to give a detailed explanation of what you want to do. Your explanation is not clear.

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.
Frank Yaeger - DFSORT Development Team (IBM) - yaeger@us.ibm.com
Specialties: JOINKEYS, FINDREP, WHEN=GROUP, ICETOOL, Symbols, Migration
=> DFSORT/MVS is on the Web at http://www.ibm.com/storage/dfsort

Post Reply

FREE TUTORIALS

Tutorials
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.
Interview
Mainframe Interview questions



Other References
Mainframe Tools and others