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 Record Not found in AlX but record re... mukun264 COBOL Programming 7 Fri Mar 24, 2017 9:28 am
No new posts Count the length of the record & ... sreekusr DFSORT/ICETOOL 4 Thu Mar 23, 2017 7:52 pm
No new posts Check Binary Values for symbols gandikk CA Products 3 Tue Mar 21, 2017 5:11 am
No new posts Innovations in Your Mainframe Sort Arun Raj PC Guides & IT News 4 Wed Mar 15, 2017 10:38 pm
No new posts SORT VSAM file with each field one by... maxsubrat DFSORT/ICETOOL 6 Tue Mar 14, 2017 1:07 pm


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