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/Select records bases on values within the same record

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
View previous topic :: :: View next topic  
Author Message
JayC

New User


Joined: 27 Sep 2008
Posts: 70

PostPosted: Fri Nov 14, 2008 12:18 pm    Post subject: Sort/Select records bases on values within the same record
Reply with quote

Hi,
Could someone help me with the following :
I need to select records from my input file based on the values from two fields in the same record being equal.
Eg -
INPUT
Code:

120080901JAY123JOEXYZ
120080901JAY123JAYUTC
120080901JAY123ANNYTS
120080901JOE123JOEUTC
120080901JAY123JIMUUV

OUTPUT
Code:

120080901JAY123JAY  UTC
120080901JOE123JOE  UTC


I need to select the records if the valeus in the columns 10 to 12 and columns 16 to 19 are equal.
[/code]
Back to top
View user's profile Send private message

Arun Raj

Moderator


Joined: 17 Oct 2006
Posts: 2275
Location: @my desk

PostPosted: Fri Nov 14, 2008 12:37 pm    Post subject:
Reply with quote

JayC,

From your previous posts, I can see you are using Syncsort and not DFSORT. Questions related to Syncsort should be raised in JCL forum and not in DFSORT forum. Please keep this in mind for future posts.

You can achieve this using the INCLUDE parameter.

Code:
//SYSIN DD *
  OPTION COPY
  INCLUDE COND=(10,3,CH,EQ,16,3,CH)
Back to top
View user's profile Send private message
JayC

New User


Joined: 27 Sep 2008
Posts: 70

PostPosted: Fri Nov 14, 2008 12:46 pm    Post subject:
Reply with quote

Thanks, Didn't find a SYNCSORT forum so posted it here.
Will keep it in mind.

Thanks for the help. I guess it was simpler than I thought.
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 -> JCL & VSAM All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Sorting of hex values Saurabh_mi DFSORT/ICETOOL 1 Thu May 25, 2017 3:49 pm
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 Replace values in the input data Vikas Maharnawar DFSORT/ICETOOL 10 Thu May 11, 2017 2:18 pm
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


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