|
Prev: Comp-3
Next: DISPLAY pointer
From: jeff on 17 Jul 2006 12:49 I was wondering if anyone could help me out here on what is the best way to accomplsh this: I have a customer-name stored in a 40 byte field ie Joe Johnson I need to move this to: 01 cust-rec. 03 cust-key-1. 05 cust-name. 07 cust-last-name pic x(20). 07 cust-first-name pic x(20). In order to read it. Trying to figure out if/how would I use the inspect statement to move the first name to cust-first-name and last name to cust-last-name.
From: Howard Brazee on 17 Jul 2006 13:06 On 17 Jul 2006 09:49:24 -0700, jeff(a)sum-it.com wrote: >I was wondering if anyone could help me out here on what is the best >way to accomplsh this: > >I have a customer-name stored in a 40 byte field ie Joe Johnson >I need to move this to: > 01 cust-rec. > 03 cust-key-1. > 05 cust-name. > 07 cust-last-name pic x(20). > 07 cust-first-name pic x(20). >In order to read it. Trying to figure out if/how would I use the >inspect statement to move the first name to cust-first-name and last >name to cust-last-name. First, do you know what you want to do about people with two last names, Jr. and other variations from the "standard"?
From: jeff on 17 Jul 2006 13:17 Howard Brazee wrote: > On 17 Jul 2006 09:49:24 -0700, jeff(a)sum-it.com wrote: > > >I was wondering if anyone could help me out here on what is the best > >way to accomplsh this: > > > >I have a customer-name stored in a 40 byte field ie Joe Johnson > >I need to move this to: > > 01 cust-rec. > > 03 cust-key-1. > > 05 cust-name. > > 07 cust-last-name pic x(20). > > 07 cust-first-name pic x(20). > >In order to read it. Trying to figure out if/how would I use the > >inspect statement to move the first name to cust-first-name and last > >name to cust-last-name. > > First, do you know what you want to do about people with two last > names, Jr. and other variations from the "standard"? Not sure how to handle that as well. This is for a sales report. Another part of the key is the cust no, but the system allows no cust-no and enter a Cust-name in any format, most enter as Joe Johnson. Should I use an inspect tally before initial space? Or a perform varying loop?
From: Howard Brazee on 17 Jul 2006 13:33 On 17 Jul 2006 10:17:04 -0700, jeff(a)sum-it.com wrote: >> >> First, do you know what you want to do about people with two last >> names, Jr. and other variations from the "standard"? > >Not sure how to handle that as well. This is for a sales report. >Another part of the key is the cust no, but the system allows no >cust-no and enter a Cust-name in any format, most enter as Joe Johnson. >Should I use an inspect tally before initial space? Or a perform >varying loop? I used to use INSPECT for this kind of thing, I've pretty much switched to using reference modification loops. When I'm given an assignment like this, I have learned to expect that there will need to be some further data manipulation to handle exceptions.
From: jeff on 17 Jul 2006 14:05
Howard Brazee wrote: > On 17 Jul 2006 10:17:04 -0700, jeff(a)sum-it.com wrote: > > >> > >> First, do you know what you want to do about people with two last > >> names, Jr. and other variations from the "standard"? > > > >Not sure how to handle that as well. This is for a sales report. > >Another part of the key is the cust no, but the system allows no > >cust-no and enter a Cust-name in any format, most enter as Joe Johnson. > >Should I use an inspect tally before initial space? Or a perform > >varying loop? > > I used to use INSPECT for this kind of thing, I've pretty much > switched to using reference modification loops. > > When I'm given an assignment like this, I have learned to expect that > there will need to be some further data manipulation to handle > exceptions. 2 seperate loops? perform move first-name perform move last-name |