MVSFORUMS.com Forum Index MVSFORUMS.com
A Community of and for MVS Professionals
 
 FAQFAQ   SearchSearch   Quick Manuals   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

excluding records in a sort/merge in easytrieve how to?

 
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Utilities
View previous topic :: View next topic  
Author Message
jebus
Beginner


Joined: 27 Oct 2005
Posts: 1
Topics: 1

PostPosted: Thu Oct 27, 2005 8:16 am    Post subject: excluding records in a sort/merge in easytrieve how to? Reply with quote

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?

Thanks in advance for any replies
Back to top
View user's profile Send private message
Frank Yaeger
Sort Forum Moderator
Sort Forum Moderator


Joined: 02 Dec 2002
Posts: 1618
Topics: 31
Location: San Jose

PostPosted: Thu Oct 27, 2005 10:14 am    Post subject: Reply with quote

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
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Phantom
Data Mgmt Moderator
Data Mgmt Moderator


Joined: 07 Jan 2003
Posts: 1056
Topics: 91
Location: The Blue Planet

PostPosted: Mon Oct 31, 2005 2:21 am    Post subject: Reply with quote

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.

Thanks,
Phantom
Back to top
View user's profile Send private message
vkphani
Intermediate


Joined: 05 Sep 2003
Posts: 483
Topics: 48

PostPosted: Mon Nov 07, 2005 5:38 am    Post subject: Reply with quote

Declare two variables one for input file and the other for output file.

Eg:IN1 and OUT1.

Try the below code.

Code:

IF IN1 NE (A1 AND B2)
OUT1 = IN1
PUT OTFILE



Assumed OTFILE as your output file name.
Back to top
View user's profile Send private message Send e-mail
Display posts from previous:   
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Utilities All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
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


MVSFORUMS
Powered by phpBB © 2001, 2005 phpBB Group