Remove specific character (First name) in name field



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

Remove specific character (First name) in name field

Postby Aech » Thu Aug 16, 2018 5:41 pm

Hi,

I have a set of names with the format Title, First name and Last name like below

Mr FAAA LBBBB
Ms FCCC LDDDD
Mrs FEEE LGGGG
Miss FOOO LPPPP
Prof FSSS LHHHH


I want to remove the First name from these records and display only Title and Last name as below

Mr LBBBB
Ms LDDDD
Mrs LGGGG
Miss LPPPP
Prof LHHHH


I read SQZ parameter can be used to left/right squeeze the spaces but not sure if that is appropriate in my scenario.
Could you please let me know what other options I have to achieve this.
Aech
 
Posts: 6
Joined: Mon Mar 05, 2018 2:50 pm
Has thanked: 4 times
Been thanked: 0 time

Re: Remove specific character (First name) in name field

 

Re: Remove specific character (First name) in name field

Postby Akatsukami » Thu Aug 16, 2018 10:58 pm

How are you planning to remove the first names?
"You have sat too long for any good you have been doing lately ... Depart, I say; and let us have done with you. In the name of God, go!" -- what I say to a junior programmer at least once a day
User avatar
Akatsukami
Global moderator
 
Posts: 1057
Joined: Sat Oct 16, 2010 2:31 am
Location: Bloomington, IL
Has thanked: 6 times
Been thanked: 51 times

Re: Remove specific character (First name) in name field

Postby NicC » Fri Aug 17, 2018 1:27 pm

Use PARSE to split the fields into 3 variables (%00, %01, %02) then BUILD using only the first and third variables (%00, %02).
The problem I have is that people can explain things quickly but I can only comprehend slowly.
Regards
Nic
NicC
Global moderator
 
Posts: 2821
Joined: Sun Jul 04, 2010 12:13 am
Location: Pushing up the daisies (almost)
Has thanked: 4 times
Been thanked: 118 times


Return to DFSORT/ICETOOL/ICEGENER

 


  • Related topics
    Replies
    Views
    Last post