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
 
Removing a record in a file through sort

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

New User


Joined: 24 Jan 2011
Posts: 21
Location: India

PostPosted: Thu Jan 27, 2011 4:57 pm    Post subject: Removing a record in a file through sort
Reply with quote

Hi
I have a file with around 100 records .In some records first 10 characters and another 10 characters matches with each other . I want to remove the records if these match . Is there any sort jcl to remove these?

eg.SAmple scenario
Input file
ABCDEFG123456767ABCDEF12332434
HHHHHHH454GHJKL7HHHHHH2324345
JSDSDSD123232343ABDSDSK232344

Here in first 2 records the (1,6) characters match with characters in (16,6) . So these must be removed and only third record must be present in output.

Output file :
JSDSDSD123232343ABDSDSK232344
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: Thu Jan 27, 2011 5:03 pm    Post subject:
Reply with quote

Code:
 SORT      FIELDS=COPY
 EXCLUDE   COND=(pos,length,format,operator,pos,length,format)
Back to top
View user's profile Send private message
Vasanthr

New User


Joined: 24 Jan 2011
Posts: 21
Location: India

PostPosted: Thu Jan 27, 2011 5:11 pm    Post subject:
Reply with quote

thanks got it
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: Fri Jan 28, 2011 12:26 am    Post subject:
Reply with quote

That would be OMIT, not EXCLUDE. The DFSORT control statements would be:

Code:
 
   SORT FIELDS=COPY
   OMIT COND=(1,6,CH,EQ,16,6,CH)
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 sort records based on length exceeds ... maxsubrat DFSORT/ICETOOL 7 Wed Oct 04, 2017 4:48 pm
No new posts Execute JCL step based on the content... sprikitik JCL & VSAM 2 Tue Oct 03, 2017 10:03 am
This topic is locked: you cannot edit posts or make replies. PS file data should be passed as symb... d_sarlie JCL & VSAM 15 Tue Oct 03, 2017 5:18 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