Exclude records with a character in random position



IBM's flagship sort product DFSORT for sorting, merging, copying, data manipulation and reporting. Includes ICETOOL and ICEGENER

Exclude records with a character in random position

Postby ragsara » Tue Dec 02, 2014 9:24 am

Hi,
Please find the below requirement :

I need to excluede the records which has '@' symbol in it, It can be present in any position of the record. Can this be handled in SORT ?

Input file length : 50 FB
Prmsinchak@abc.com         
PCRUPERT@abc.COM
PSARA1524@ABCDEF.NET     
PRDREISBECK@XYZ.COM
123       
PGTAYLERFROMFRANCE@ABCD.COM         
Pdccorcilius@abc.com
ABCDEF       
PJ_DIENST@ABCD.NET
ABC123
#$%^&*       
PMICHAELDONELAN@ABC.NET   
PVGEMMITI13@XYZ.COM     

Expected Output :
123                 
ABCDEF       
ABC123 
#$%^&*


Thanks in advance.
ragsara
 
Posts: 23
Joined: Thu Mar 22, 2012 5:17 pm
Has thanked: 0 time
Been thanked: 0 time

Re: Exclude records with a character in random position

 

Re: Exclude records with a character in random position

Postby BillyBoyo » Tue Dec 02, 2014 1:12 pm

  OMIT COND=(1,50,SS,EQ,C'@')


The important part is the Sub-string data-type (SS) which allows all the bytes specified to be searched. This will find @ anywhere within the first 50 bytes of your record.
BillyBoyo
Global moderator
 
Posts: 3804
Joined: Tue Jan 25, 2011 12:02 am
Has thanked: 22 times
Been thanked: 264 times

Re: Exclude records with a character in random position

Postby ragsara » Tue Dec 02, 2014 11:16 pm

Thanks Billy
ragsara
 
Posts: 23
Joined: Thu Mar 22, 2012 5:17 pm
Has thanked: 0 time
Been thanked: 0 time


Return to DFSORT/ICETOOL/ICEGENER

 


  • Related topics
    Replies
    Views
    Last post