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 and write based on column compare

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


Joined: 10 Feb 2006
Posts: 188
Topics: 68

PostPosted: Thu Feb 11, 2010 4:24 pm    Post subject: compare and write based on column compare Reply with quote

Sounds like there should be a simple solution, but I can't do this in FILEAID, and didn't get a hit doing a search...

I want to copy only the records where the contents of column 2 are
not equal to the contents of column 3 :

Code:
11111 APPLE   APPLE   
22222 APPLE   BANANA 
33333 ORANGE  ORANGE 
44444 PEACH   PEACH   
55555 PEAR    APPLE   


So, I only want the second and fifth records...

Thanks for any help.
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 Feb 11, 2010 4:30 pm    Post subject: Reply with quote

Here's a DFSORT solution if that will do:

Code:

//S1    EXEC  PGM=SORT
//SYSOUT DD  SYSOUT=*
//SORTIN DD *
11111 APPLE   APPLE
22222 APPLE   BANANA
33333 ORANGE  ORANGE
44444 PEACH   PEACH
55555 PEAR    APPLE
/*
//SORTOUT DD SYSOUT=*
//SYSIN   DD  *
  OPTION COPY
  INCLUDE COND=(7,8,CH,NE,15,8,CH)
/*

_________________
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