Hi,
I want to compare 2 sequential file,
both are having diff record lenght and diff layouts,
but both files have few fields which are same (say employee names are in both files and having the same length)
now i want to do a comparison of these 2 files based on the common fields, and if the records with the same employee name exist in both the file and i need to copy that complete records into the 3rd file
1st file - lrecl = 300 (1,10,CH is the employee name)
2nd file - lrecl = 500 (15,25,CH is the employee name)
basically i need to see if the same employee name records exist in file1, then i need to write that record into the 3rd file with 500 lrecl.
just i need to see if file2 records are present in file1 or not. if Yes, then need to write those records in 3rd file,
Thanks in advance,
your help is greatly appriciated,
Comparing 2 sequential files with diff lrecl
Moderators: Frank Yaeger, Moderator Group
-
- Member
- Posts: 1
- Joined: Tue Jan 12, 2010 3:12 pm
- Location: Bangalore
Comparing 2 sequential files with diff lrecl
Regards,
Mukesh
Bangalore
Mukesh
Bangalore
- Frank Yaeger
- Moderator
- Posts: 812
- Joined: Sat Feb 18, 2006 5:45 am
- Location: San Jose, CA
- Contact:
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 so I can see what level of DFSORT you have.
Also, please run this job and show the //SYSOUT messages you receive:
Also, please run this job and show the //SYSOUT messages you receive:
Code: Select all
//S1 EXEC PGM=SORT
//SYSOUT DD SYSOUT=*
//SORTIN DD *
RECORD
//SORTOUT DD DUMMY
//SYSIN DD *
OPTION COPY
/*
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
Specialties: JOINKEYS, FINDREP, WHEN=GROUP, ICETOOL, Symbols, Migration
=> DFSORT/MVS is on the Web at http://www.ibm.com/storage/dfsort
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
- Cobol Interview Questions
50+ Interview Questions - JCL Interview Questions
50+ Interview Questions - DB2 Interview Questions
100+ Interview Questions - CICS Interview Questions
70+ Interview Questions - VSAM Interview Questions
27 Interview Questions
Other References
Mainframe Tools and others
- XPEDITER Reference
Explains how we can debug a program - FILEAID Reference
Explains how to browse , edit and delete datasets - Change Man Reference
Quick Start tutorial on Changeman - Abend Reference
Important Abend codes explained - FaceBook Page
MainframeGurukul FaceBook Page - LinkedIn Page
MainframeGurkul Linkedin Page