IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

Sort to check two parameters of the same record


IBM Mainframe Forums -> DFSORT/ICETOOL
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
Vidya Bhama

New User


Joined: 17 Sep 2008
Posts: 41
Location: Chennai

PostPosted: Wed Feb 04, 2009 4:34 pm
Reply with quote

Hi,

Is it possible to check two fields in the same record and write to an output dataset if equal using SORT.

for example

ABCD111111ABCD....
XXXX222222FGHJI.....

If the filed from position 1-4 is same as 11-14 then the record should be written to output (In the above example the first rec must be written and second should be rejected).
Can anyone help on this
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8797
Location: Welsh Wales

PostPosted: Wed Feb 04, 2009 4:54 pm
Reply with quote

Code:

//SYSIN    DD *                   
  SORT    FIELDS=COPY             
  OMIT    COND=(1,4,CH,NE,11,4,CH)
Back to top
View user's profile Send private message
Frank Yaeger

DFSORT Developer


Joined: 15 Feb 2005
Posts: 7129
Location: San Jose, CA

PostPosted: Wed Feb 04, 2009 9:21 pm
Reply with quote

Or to avoid the double negative for better understandability (is that a word?):

Code:

   INCLUDE COND=(1,4,CH,EQ,11,4,CH)
Back to top
View user's profile Send private message
Vidya Bhama

New User


Joined: 17 Sep 2008
Posts: 41
Location: Chennai

PostPosted: Tue Feb 10, 2009 4:25 pm
Reply with quote

thanks this worked.
Sorry for a delayed reply.
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> DFSORT/ICETOOL

 


Similar Topics
Topic Forum Replies
No new posts Need to set RC4 through JCL SORT DFSORT/ICETOOL 5
No new posts How to split large record length file... DFSORT/ICETOOL 10
No new posts SFTP Issue - destination file record ... All Other Mainframe Topics 2
No new posts FINDREP - Only first record from give... DFSORT/ICETOOL 3
No new posts JCL sort card - get first day and las... JCL & VSAM 9
Search our Forums:

Back to Top