[focus-l] Re: sort problems

  • From: Sandy Weller <wellergroup@xxxxxxxxx>
  • To: focus-l@xxxxxxxxxxxxx
  • Date: Thu, 16 Jun 2005 10:57:47 -0700 (PDT)

If the comma is always there. you can use POSIT AND SUBSTR as follows:
 
COMLOC/I2 = POSIT (FNAME, A32, ',', 1,'i2')
CMLOC/I2 = COMLOC -1
LNAME/A30 = SUBSTR(A32,1,CMLOC,30,'A30')
 
 
Sandy
"Hamilton, Robert L" <roberth@xxxxxxxxxxxx> wrote:
I have to sort a focus file by name which is in the format last_name,
first_name. this name is in /A32 format. . .
Some times the first name is just an initial, sometimes spelled out for
any one dude so sorting by the entire name is useless

What I really need is the last_name by itself; thought I had been thru
it before but cannot recall. In one case I wrote a
REXX exec and called that. 

If I use POSIT to find the ', ' - comma followed by a blank - how can I
use SUBSTR to extract the Last_name?

bobh 


__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 


Other related posts: