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 

Compare two fields in a same record using DFSORT

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


Joined: 25 Feb 2009
Posts: 5
Topics: 3

PostPosted: Fri Jun 12, 2009 7:22 am    Post subject: Compare two fields in a same record using DFSORT Reply with quote

Hi All,

I have a file of 80 LRECL.
Now I want to compare two fields in a record (Both the fields are in same record). If they are matching then I need to write that record to output file. Is it possible using DFSORT?

EX:
Input record:
aaaaabbbbbcccccdddddaaaaa
Here I want to compare the value in position 1-5 with position 21-25. If both are matching then I want that record to output file.

Thanks
Anand
Back to top
View user's profile Send private message
dbzTHEdinosauer
Supermod


Joined: 20 Oct 2006
Posts: 1411
Topics: 26
Location: germany

PostPosted: Fri Jun 12, 2009 7:43 am    Post subject: Reply with quote

Code:

//SYSIN    DD *                   
  SORT    FIELDS=COPY             
  OMIT    COND=(pos,length,format,NE,pos,length,format)

or
Code:

//SYSIN    DD *                   
  SORT    FIELDS=COPY             
  INCLUDE COND=(pos,length,format,EQ,pos,length,format)


thx to expat.

DFSORT Documentation
_________________
Dick Brenholtz
American living in Varel, Germany
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: Sun Jun 14, 2009 7:08 pm    Post subject: Reply with quote

Anand,

If you're not familiar with DFSORT and DFSORT's ICETOOL, I'd suggest reading through "z/OS DFSORT: Getting Started". It's an excellent tutorial, with lots of examples, that will show you how to use DFSORT, DFSORT's ICETOOL and DFSORT Symbols. You can access it online, along with all of the other DFSORT books, from:

www.ibm.com/servers/storage/support/software/sort/mvs/srtmpub.html
_________________
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
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