HI all, I am working with a data sets which has names like Nichols, KregFI its in the form "lastname,(space)firstnamemiddlename" I accept my o/p to be like this : firstname=kerg middlename=Fl lastname=Nichols the code for that: data b; str='Nichols, KregFI'; /*** String **/ a=index(str,",")+2; /** for finding the position of first Name **/ first_name=substr(scan(str,2,","),1,a-1); /** for first name only**/ run; But ,I am getting o/p : s.no str a first_name 1 Nichols, KregFI 10 KregFI please correct and assist me for that. thanks,
... View more