Hi
I have a file of lenght=108 anf Rec format = FB.
It has got hearder and trailer also.
The problem is it has some duplicate records, i want to copy them into a
saperate file.
The data is as :
HEAD00XYZ
A 123
ABC 123
JOGX 456
JOG1X 456
JOGX 777
JRRX 456
JRR1X 456
JRRX 777
TRAILER08XYZ
Here the first field can be of 6 char max.
Here i want to move the duplicate records starting from J and ending at X with second field 777 to other file
eg:
HEAD00XYZ
A 123
ABC 123
JOGX 456
JOG1X 456
JRRX 456
JRR1X 456
TRAILER06XYZ
and then modify the trailer record also.it counts the incoming records.
Second file:
JOGX 777
JRRX 777
Thanks
Removing duplicates to other file.
Moderators: Frank Yaeger, Moderator Group
- Frank Yaeger
- Moderator
- Posts: 812
- Joined: Sat Feb 18, 2006 5:45 am
- Location: San Jose, CA
- Contact:
Do you need the original information from the HEADER and TRAILER, or can they be rebuilt with the information shown?
The key is in positions 1-6 ... right?
The count only includes the data records ... right?
The key is in positions 1-6 ... right?
The count only includes the data records ... right?
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
HI Frank
Yes i need the original data from header to trailer, with count changing in
the trailer record.
Yes the key position is from 1-6 only but along with that we need to put one more check at position 7-9. as i want to copy the record with 777 at position 7-9 to other file.
The count only includes the data records only.
Thanks a lot.
Yes i need the original data from header to trailer, with count changing in
the trailer record.
Yes the key position is from 1-6 only but along with that we need to put one more check at position 7-9. as i want to copy the record with 777 at position 7-9 to other file.
The count only includes the data records only.
Thanks a lot.
anilanju wrote:Here i want to move the duplicate records starting from J and ending at X with second field 777 to other file
what happens if your data is like thisanilanju wrote:Yes the key position is from 1-6 only but along with that we need to put one more check at position 7-9. as i want to copy the record with 777 at position 7-9 to other file.
ABC is a duplicate and but it does not start with J and end with X.
JRR1X starts with J and ends with x but the pos 7-9 is not 777 and still is duplicate based on the first 6 characters.
Code: Select all
HEAD00XYZ
A 123
ABC 123
ABC 777 <<< does it go to file 2?
JOGX 456
JOG1X 456
JOGX 777
JRRX 456
JRR1X 345
JRR1X 456 <<< does it go to file 2?
JRRX 777
TRAILER08XYZ
HI
For records Starting with J and ending at X, we need a check at position 7-9 for 777,as i want to copy the record with 777 at position 7-9 to other file
only.
For rest of the duplicate records, we can move the first duplicate record to other file.For them there is no check on th second field.
Thanks a lot.
Regards
For records Starting with J and ending at X, we need a check at position 7-9 for 777,as i want to copy the record with 777 at position 7-9 to other file
only.
For rest of the duplicate records, we can move the first duplicate record to other file.For them there is no check on th second field.
Thanks a lot.
Regards
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