Posted: Thu Oct 27, 2005 8:16 am Post subject: excluding records in a sort/merge in easytrieve how to?
I have 2 files that I have merged/sorted together. Current merged/sorted layout is as follows
A1
B1
A2
B2
detail
detail
A1
B1
A2
B2
detail
detail
during the merge/sort process I want to exclude all of the A1 and B2 records. I can create a sort/merge to bring these 2 files together in resulting layout above but I do not know how to exclude these records from the merged/sorted file. Can it be done? and if so how?
Joined: 02 Dec 2002 Posts: 1618 Topics: 31 Location: San Jose
Posted: Thu Oct 27, 2005 10:14 am Post subject:
I don't know what easytrieve (in your Subject) has to do with this, but it sounds like a simple OMIT will do assuming that you have some way to identify the A1 and B2 records, e.g. if they actually have 'A1' and 'B2' in positions 1-2 you would use:
Code:
OMIT COND=(1,2,CH,EQ,C'A1',OR,1,2,CH,EQ,C'B2')
If it's more complicated than that, you need to explain more clearly 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
Joined: 07 Jan 2003 Posts: 1056 Topics: 91 Location: The Blue Planet
Posted: Mon Oct 31, 2005 2:21 am Post subject:
Jebus,
From what you have given as sample file, It seems that the A1, A2, B1 ... are some type of header records. Pls Clarify
When you say
Quote:
I want to exclude all of the A1 and B2 records
Do you mean to say that you want to exclude the header A1 and all detail records that belong to that and followed by B2 and its detail records ????
Also, when you post something please be clear on has to be accomplished. You refer to Easytrieve on the subject but we don't see any relevance to that in your query. A clear subject line will attract the right SME (subject matter expert) to answer your question. This will provide you a faster response.
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