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: 2233
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 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
No new posts SORT requirement sjiraga COBOL Programming 6 Thu Mar 09, 2017 9:11 pm
No new posts IMS DB-How to update a record (a sing... Nic Clouston IMS DB/DC 9 Thu Mar 09, 2017 4:38 pm


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