Posted: Fri Aug 08, 2008 5:55 am Post subject: Data issues - remove records based on condition
I tried searching the postings but did not get what I am looking for:
My senario: There are 2 files DefaultersFile and MasterFile
DefaultersFile
2
4
5
6
MasterFile
Header
1
2
3
4
7
Trailer
NondefaultersFile
Header
1
3
7
Trailer
I have a master File with accounts and I need to exclude all the accounts who are defaulters which I get from the DefaultersFile. I need to exclude such accounts from the MasterFile and create a NondefaultersFile.
I know how to exclude the defaulted accounts from the Masterfile using DefaultersFile as a Lookup.
However, due to some OLD data issues, The DefaultersFile does contain some accounts which are not present in the MasterFile (Ex:5,6) which is coming over to the NondefaultersFile. I do NOT want to bring it to the NondefaultersFile. How can this be done?
Also, by default, the ICETOOL is sorting the Header and Trailer records of the MasterFile and putting it over to the NondefaultersFile as if it is some record. I want to avoid this as well. How can this be done?
Joined: 02 Dec 2002 Posts: 1618 Topics: 31 Location: San Jose
Posted: Fri Aug 08, 2008 1:00 pm Post subject:
Can the Header record be identified by something in the record (e.g. 'HDR' in positions 1-3). If so, how can it be identified?
Can the Trailer record be identified by something in the record (e.g. 'TRL' in positions 1-3). If so, how can it be identified?
Is the account number really a 1-character field in position 1? If not, what is the starting position, length and format of the account number field in each input file?
You do not show any duplicate account numbers in DefaultersFile - can it actually have duplicate account numbers (e.g. two 4 accounts)?
You do not show any duplicate account numbers in Master File - can it actually have duplicate account numbers (e.g. two 4 accounts)?
If either input file can have duplicate account numbers within it, please show this in a better example of your input records and expected output records. _________________ Frank Yaeger - DFSORT Development Team (IBM)
Specialties: JOINKEYS, FINDREP, WHEN=GROUP, ICETOOL, Symbols, Migration
DFSORT is on the Web at:
www.ibm.com/storage/dfsort
For Simplicity, assume the Header record can be identified by first 3 characters i.e. 'HDR' and similarly the Trailer record can be identified by first 3 characters i.e. 'TRL' .
The Account number is 15 Bytes Text field. In the MasterFile it starts from 20th position whereas in the DefaultersFile it starts from the first position.
Both the MasterFile and DefaultersFile does NOT contain any duplicates.
To confirm again: The NonDefaultersFile should contain all the account numbers that are present in the MasterFile but NOT in the DefaultersFile. Also, due to some data issues in the DefaultersFile, it contains some account numbers which are not present in the MasterFile. (Ideally this should never happen!) So I do not want such records to come over to the NonDefaultersFile.
Kindly let me know if you require any more details.
_________________ Frank Yaeger - DFSORT Development Team (IBM)
Specialties: JOINKEYS, FINDREP, WHEN=GROUP, ICETOOL, Symbols, Migration
DFSORT is on the Web at:
www.ibm.com/storage/dfsort
Last edited by Frank Yaeger on Thu Aug 21, 2008 11:14 am; edited 1 time in total
Joined: 02 Dec 2002 Posts: 1618 Topics: 31 Location: San Jose
Posted: Wed Aug 20, 2008 11:15 am Post subject:
Please show a new example of your input records and expected output records with duplicates so I can see what you want to do. _________________ Frank Yaeger - DFSORT Development Team (IBM)
Specialties: JOINKEYS, FINDREP, WHEN=GROUP, ICETOOL, Symbols, Migration
DFSORT is on the Web at:
www.ibm.com/storage/dfsort
The Account number is 15 Bytes Text field. In the MasterFile it starts from 20th position whereas in the DefaultersFile it starts from the first position.
_________________ Frank Yaeger - DFSORT Development Team (IBM)
Specialties: JOINKEYS, FINDREP, WHEN=GROUP, ICETOOL, Symbols, Migration
DFSORT is on the Web at:
www.ibm.com/storage/dfsort
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum