Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

Sort to check two parameters of the same record

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL
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    Post subject: Sort to check two parameters of the same record
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: 8593
Location: Back in jolly old England

PostPosted: Wed Feb 04, 2009 4:54 pm    Post subject:
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 Moderator


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

PostPosted: Wed Feb 04, 2009 9:21 pm    Post subject:
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    Post subject:
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    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts How to change 'K' or 'M' use Sort vice_versa DFSORT/ICETOOL 5 Thu May 18, 2017 7:11 am
No new posts Check if any Detail records and extra... V S Amarendra Reddy SYNCSORT 19 Mon May 08, 2017 8:54 pm
No new posts Adding big TEXT lines to each record ... bshkris SYNCSORT 4 Sat May 06, 2017 1:40 am
This topic is locked: you cannot edit posts or make replies. Merge two files and update Trailer re... Yashashri JCL & VSAM 1 Thu May 04, 2017 12:54 pm
This topic is locked: you cannot edit posts or make replies. SORT trick needed bshkris SYNCSORT 6 Tue May 02, 2017 4:35 am


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us