Hi. This is a nice problem. I unfortunately only were able to solve the simple part of it, but by replying now, it will bring it to the attention of those that will find the elegant solution in a blink: DATA WANT; INPUT STRING $80.; ref_no = scan(string,1, ""); mode = scan( string, 2, "" ); price = scan( string, -1, "" ); name = compbl(prxchange("s/.*MARS|PLAN|Family|Revenue|LifeLong|Vriddhi|BEST|Live|Smart|Builder|Young Scholar|Secure|[0-9]|Varsha/ /i", -1,string)); DATALINES; Y10800539 YEARLY MARS Family REVENUE Builder Mrs. sina Manahattan 970 Y10800542 YEARLY MARS PLAN Vriddhi Mr. Surendra gita Kumar 100.4 Y10800543 YEARLY MARS PLAN Vriddhi Mr. Rahul kapu Man 969.83 Y10800539 YEARLY MARS Family REVENUE Builder Mrs. sina Manahattan 970 Y10800539 YEARLY MARS LifeLONG BEST Mr Virag Bashmukh 86 Y10800539 YEARLY MARS LifeLONG BEST Mr. Tricky behoshi H 94.5 Y10800539 YEARLY MARS Young Scholar Secure Mr. Joyton Flavian sequence 500 Y10800543 YEARLY MARS Family REVENUE Builder Mr. Suraj putraJoban 5000 Y10800543 YEARLY MARS PLAN Varsha Ms. Mahalakshmi krishnanram 504 Y10800543 YEARLY MARS PLAN Vriddhi Mr. Himanshu Pahwa 3003.75 Y10800543 YEARLY MARS PLAN Vriddhi Mr. Sanjay Vaarma 213.54 Y10800543 YEARLY MARS PLAN Vriddhi Mrs. Jane Saggarwal 3327 Y10800543 YEARLY MARS LIVE SMART Mr Syed husain Jasmeet 800 Y10800543 YEARLY MARS PLAN Vriddhi Mr Rajesh babr 1000.69 Y10800543 YEARLY MARS PLAN Vriddhi Mr. Rajan visal 241.53 ; Basically you will have to use some character function (scan, substr, findw...) to parse the string...I am still working on it. Got the name down. Cheers! Anca.
... View more