Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist 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: 2285
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 Copy 4 byte of data from the last rec... arunsoods DFSORT/ICETOOL 9 Fri Oct 06, 2017 12:15 pm
No new posts Extend the decimal values in DIVISION Balaryan DFSORT/ICETOOL 3 Thu Oct 05, 2017 4:05 pm
No new posts sort records based on length exceeds ... maxsubrat DFSORT/ICETOOL 7 Wed Oct 04, 2017 4:48 pm
No new posts Addition of two records on 2 fields amar143 SYNCSORT 8 Tue Oct 03, 2017 11:14 am
No new posts JOINKEYS Paired and Unpaired Sort MFwhiz DFSORT/ICETOOL 4 Fri Sep 29, 2017 1:48 am

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us