Hello, Some of my output fields contain an extra comma at the end of the field. How can I eliminate that comma For example, here is a "bad" record for a single "name" field containing a second comma in red(bad): Smith,Vincent, Here is the "good" record that only contains one comma and a space, not a second comma for mname(good): Dobbins,Tyrone G Here is another "good" record without a middle name Smith, John Here is how I am parsing the fname, mname and lname from the single "name" field, but the mname is giving me two fields mname for Smith DATA NAMEA; SET NAM1; X=INDEXC(NAME1,','); Y=INDEXC(NAME1,' '); LNAME1=SUBSTR(NAME1,1,X-1); FNAME1=SUBSTR(NAME1,X+1, Y-X); MNAME1=SCAN(NAME1,3); IF (MNAME1 =FNAME1 ) THEN MNAME1=' '; For the output on Vincent Smith, here's what I get: VINCENT,, ,SMITH Here's what I need: VINNY, ,SMITH How do I eliminate that second comma? Thanks so much, Mary
... View more