IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

Sort/Select records bases on values within the same record


IBM Mainframe Forums -> JCL & VSAM
Post new topic   Reply to topic
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
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: 2481
Location: @my desk

PostPosted: Fri Nov 14, 2008 12:37 pm
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
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 View Bookmarks
All times are GMT + 6 Hours
Forum Index -> JCL & VSAM

 


Similar Topics
Topic Forum Replies
No new posts Compare 2 files and retrive records f... DFSORT/ICETOOL 2
No new posts Compare 2 files(F1 & F2) and writ... JCL & VSAM 8
No new posts Need to set RC4 through JCL SORT DFSORT/ICETOOL 5
No new posts How to split large record length file... DFSORT/ICETOOL 10
No new posts INCLUDE OMIT COND for Multiple values... DFSORT/ICETOOL 5
Search our Forums:

Back to Top