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: 8657
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 IDCAMS RENAMING VSAM FILE ALONG WITH ... upendrasri JCL & VSAM 11 Tue Apr 17, 2018 10:42 pm
No new posts VSAM file NOT Found error while proce... SumaReva CICS 5 Wed Apr 11, 2018 9:54 pm
No new posts VSAM - Accessing beyond record size Benchwarmer JCL & VSAM 6 Wed Apr 11, 2018 9:20 pm
No new posts converting a mainframe file with ASA ... Lynne Schuler All Other Mainframe Topics 5 Wed Apr 04, 2018 9:44 am
No new posts Sort numeric fields with trailing spaces sancraig16 SYNCSORT 7 Tue Apr 03, 2018 1:21 am

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