RE: [U2] Duplicate IDs in a list

2007-06-27 Thread David A. Green
GET.LIST DELINQ.LIST TO 1
GET.LIST DELINQ.LIST TO 2
MERGE.LIST 1 UNION 2
SAVE-LIST DELINQ.LIST

 GET.LIST DELINQ.LIST TO 1
 GET.LIST DELINQ.LIST TO 2
 MERGE.LIST 1 UNION 2 TO 3
 SAVE-LIST DELINQ.LIST

Thanks,
David A. Green
DAG Consulting


-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Bill Haskett
Sent: Wednesday, June 27, 2007 3:47 PM
To: u2-users@listserver.u2ug.org
Subject: [U2] Duplicate IDs in a list

I can't remember if I've asked this before but we occasional needed to
provide a custom script for our ASP clients.  In D3 it looked
like:
 
01 N
02 DISPLAY ...selecting items for processing
03 P
04 SSELECT ARTOPEN WITH DESC = DELINQUENT CHARGE AND WITH AGE  30
ACCOUNT
05 SL DELINQ.LIST
06 GL DELINQ.LIST {U
07 SL DELINQ.LIST
08 P
09 DISPLAY ...selection complete
10 FTWIZ
 
A variety of people in our support department could build these kinds of
scripts.  This is a D3 script.  Line 03 hushes output, line
06 makes sure redundant IDs aren't selected.  I've tried the usual
MERGE.LIST commands and can't get this to work in a paragraph.
 
I guess my first problem is; does UniData have any ability to get a list
without selecting redundant IDs?  I tried:
 
GET.LIST DELINQ.LIST TO 1
GET.LIST DELINQ.LIST TO 2
MERGE.LIST 1 UNION 2 TO 3
SAVE-LIST DELINQ.LIST
 
...and it didn't work too well.  I tried it in BASIC and that didn't work
too well either.  I had to write a custom BASIC program to
use LOCATE to build an array then did a FORMLIST then a SAVE.LIST.  This was
pretty bogus and development staff have to get involved
in this.
 
I'm in ECLTYPE P mode.  Can anyone help?  Thanks.
 
Bill
---
u2-users mailing list
u2-users@listserver.u2ug.org
To unsubscribe please visit http://listserver.u2ug.org/
---
u2-users mailing list
u2-users@listserver.u2ug.org
To unsubscribe please visit http://listserver.u2ug.org/


RE: [U2] Duplicate IDs in a list

2007-06-27 Thread Larry Hiscock
Have you looked at the SAVING UNIQUE clause of the SSELECT statement?  Not
sure if it works under ECLTYPE P, but it's worth a look.

Larry Hiscock
Western Computer Services
 

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Bill Haskett
Sent: Wednesday, June 27, 2007 3:47 PM
To: u2-users@listserver.u2ug.org
Subject: [U2] Duplicate IDs in a list

I can't remember if I've asked this before but we occasional needed to
provide a custom script for our ASP clients.  In D3 it looked
like:
 
01 N
02 DISPLAY ...selecting items for processing
03 P
04 SSELECT ARTOPEN WITH DESC = DELINQUENT CHARGE AND WITH AGE  30
ACCOUNT
05 SL DELINQ.LIST
06 GL DELINQ.LIST {U
07 SL DELINQ.LIST
08 P
09 DISPLAY ...selection complete
10 FTWIZ
 
A variety of people in our support department could build these kinds of
scripts.  This is a D3 script.  Line 03 hushes output, line
06 makes sure redundant IDs aren't selected.  I've tried the usual
MERGE.LIST commands and can't get this to work in a paragraph.
 
I guess my first problem is; does UniData have any ability to get a list
without selecting redundant IDs?  I tried:
 
GET.LIST DELINQ.LIST TO 1
GET.LIST DELINQ.LIST TO 2
MERGE.LIST 1 UNION 2 TO 3
SAVE-LIST DELINQ.LIST
 
...and it didn't work too well.  I tried it in BASIC and that didn't work
too well either.  I had to write a custom BASIC program to use LOCATE to
build an array then did a FORMLIST then a SAVE.LIST.  This was pretty bogus
and development staff have to get involved in this.
 
I'm in ECLTYPE P mode.  Can anyone help?  Thanks.
 
Bill
---
u2-users mailing list
u2-users@listserver.u2ug.org
To unsubscribe please visit http://listserver.u2ug.org/
---
u2-users mailing list
u2-users@listserver.u2ug.org
To unsubscribe please visit http://listserver.u2ug.org/


Re: [U2] Duplicate IDs in a list

2007-06-27 Thread Allen Egerton

Bill Haskett wrote:
snip

A variety of people in our support department could build these kinds of 
scripts.  This is a D3 script.  Line 03 hushes output, line
06 makes sure redundant IDs aren't selected.  I've tried the usual MERGE.LIST 
commands and can't get this to work in a paragraph.
 
I guess my first problem is; does UniData have any ability to get a list without selecting redundant IDs?  I tried:
 
GET.LIST DELINQ.LIST TO 1

GET.LIST DELINQ.LIST TO 2
MERGE.LIST 1 UNION 2 TO 3
SAVE-LIST DELINQ.LIST

snip

Not certain about Unidata; in the version of Universe I'm running, this 
works, (assuming that DELINQ.LIST is a list of IDS to DELINQ.FILE):


PA
GET.LIST DELINQ.LIST
SELECT DELINQ.FILE SAVING UNIQUE @ID
SAVE.LIST DELINQ.LIST

HTH.

--
Allen Egerton
aegerton at pobox dot com
---
u2-users mailing list
u2-users@listserver.u2ug.org
To unsubscribe please visit http://listserver.u2ug.org/


Re: [U2] Duplicate IDs in a list

2007-06-27 Thread Wally Terhune
Numbered lists work in ECL type U mode (you can always use the lower case
versions of the verbs to force U mode - even in a PROC).
There is also the SAVING UNIQUE keyword.

Wally Terhune
U2 Support Architect
IBM Information Management
4700 South Syracuse Street, Denver, CO   80237
Tel:  303.773.7969
Fax: 303.773.5915
[EMAIL PROTECTED]





 Bill Haskett
 [EMAIL PROTECTED]
 os.netTo
 Sent by:  u2-users@listserver.u2ug.org
 [EMAIL PROTECTED]  cc
 stserver.u2ug.org
   Subject
   [U2] Duplicate IDs in a list
 06/27/2007 04:47
 PM


 Please respond to
 [EMAIL PROTECTED]
er.u2ug.org






I can't remember if I've asked this before but we occasional needed to
provide a custom script for our ASP clients.  In D3 it looked
like:

01 N
02 DISPLAY ...selecting items for processing
03 P
04 SSELECT ARTOPEN WITH DESC = DELINQUENT CHARGE AND WITH AGE  30
ACCOUNT
05 SL DELINQ.LIST
06 GL DELINQ.LIST {U
07 SL DELINQ.LIST
08 P
09 DISPLAY ...selection complete
10 FTWIZ

A variety of people in our support department could build these kinds of
scripts.  This is a D3 script.  Line 03 hushes output, line
06 makes sure redundant IDs aren't selected.  I've tried the usual
MERGE.LIST commands and can't get this to work in a paragraph.

I guess my first problem is; does UniData have any ability to get a list
without selecting redundant IDs?  I tried:

GET.LIST DELINQ.LIST TO 1
GET.LIST DELINQ.LIST TO 2
MERGE.LIST 1 UNION 2 TO 3
SAVE-LIST DELINQ.LIST

...and it didn't work too well.  I tried it in BASIC and that didn't work
too well either.  I had to write a custom BASIC program to
use LOCATE to build an array then did a FORMLIST then a SAVE.LIST.  This
was pretty bogus and development staff have to get involved
in this.

I'm in ECLTYPE P mode.  Can anyone help?  Thanks.

Bill
---
u2-users mailing list
u2-users@listserver.u2ug.org
To unsubscribe please visit http://listserver.u2ug.org/

[demime 1.01d removed an attachment of type image/gif which had a name of 
graycol.gif]

[demime 1.01d removed an attachment of type image/gif which had a name of 
pic12116.gif]

[demime 1.01d removed an attachment of type image/gif which had a name of 
ecblank.gif]
---
u2-users mailing list
u2-users@listserver.u2ug.org
To unsubscribe please visit http://listserver.u2ug.org/


RE: [U2] Duplicate IDs in a list

2007-06-27 Thread Bill Haskett
All:

Awesome!  I keep forgetting this.  :-o

Thanks,

Bill

-Original Message-
From: [EMAIL PROTECTED] 
[mailto:[EMAIL PROTECTED] On Behalf Of Allen Egerton
Sent: Wednesday, June 27, 2007 4:55 PM
To: u2-users@listserver.u2ug.org
Subject: Re: [U2] Duplicate IDs in a list

Bill Haskett wrote:
snip
 A variety of people in our support department could build 
these kinds of scripts.  This is a D3 script.  Line 03 hushes 
output, line
 06 makes sure redundant IDs aren't selected.  I've tried the 
usual MERGE.LIST commands and can't get this to work in a paragraph.
  
 I guess my first problem is; does UniData have any ability 
to get a list without selecting redundant IDs?  I tried:
  
 GET.LIST DELINQ.LIST TO 1
 GET.LIST DELINQ.LIST TO 2
 MERGE.LIST 1 UNION 2 TO 3
 SAVE-LIST DELINQ.LIST
snip

Not certain about Unidata; in the version of Universe I'm 
running, this 
works, (assuming that DELINQ.LIST is a list of IDS to DELINQ.FILE):

PA
GET.LIST DELINQ.LIST
SELECT DELINQ.FILE SAVING UNIQUE @ID
SAVE.LIST DELINQ.LIST

HTH.

-- 
Allen Egerton
aegerton at pobox dot com
---
u2-users mailing list
u2-users@listserver.u2ug.org
To unsubscribe please visit http://listserver.u2ug.org/
---
u2-users mailing list
u2-users@listserver.u2ug.org
To unsubscribe please visit http://listserver.u2ug.org/


RE: [U2] Duplicate IDs in a list

2007-06-27 Thread David Ward
Bill, See below. The first list contained 10 records. The second list
contains the first 10, and 10 others. The commands yield only the 10 unique
records that were not dup. If one list is larger, it has to be first in line
on the merge. Does that help you any?

GET-LIST DW1 TO 1
10 record(s) selected to SELECT list #1.
GET-LIST DW2 TO 2
20 record(s) selected to SELECT list #2.
MERGE.LIST 1 DIFF 2 TO 0
0 record(s) selected to SELECT list #0.
GET-LIST DW2 TO 1
20 record(s) selected to SELECT list #1.
GET-LIST DW1 TO 2
10 record(s) selected to SELECT list #2.
MERGE.LIST 1 DIFF 2 TO 0
10 record(s) selected to SELECT list #0.
SAVE-LIST DW1
10 record(s) SAVEd to SELECT list DW1.

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Bill Haskett
Sent: Wednesday, June 27, 2007 7:45 PM
To: u2-users@listserver.u2ug.org
Subject: RE: [U2] Duplicate IDs in a list


David:

Thanks.  But this doesn't remove duplicate IDs (nor does INTERSECTION).

7 Brpm (0)- BSELECT ARTOPEN WITH AGE_60DAYS  0 AND WITH DESC =
ASSOCIATION DUES ACCOUNT

282 records selected to list 0.

7 Brpm (0) SAVE.LIST BILL
282 key(s) saved to 1 record(s).
7 Brpm (0)- get.list BILL TO 1
282 records retrieved to list 1.
7 Brpm (0)- get.list BILL TO 2
282 records retrieved to list 2.
7 Brpm (0)- merge.list 1 UNION 2
282 record(s) selected.
7 Brpm (0) CLEARSELECT
7 Brpm (0)- DL BILL
'BILL' deleted.

It should reflect the following:

7 Brpm (0)- BSELECT ARTOPEN WITH AGE_60DAYS  0 AND WITH DESC =
ASSOCIATION DUES ACCOUNT

282 records selected to list 0.

7 Brpm (0) U2.NODUPLIST
253 items selected.
7 Brpm (0) SAVE.LIST BILL
Overwriting existing saved list.
253 key(s) saved to 1 record(s).
7 Brpm (0)- DL BILL
'BILL' deleted.
7 Brpm (0)-

Thanks again, I was getting excited.  :-)

Bill 

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of David A. Green
Sent: Wednesday, June 27, 2007 4:38 PM
To: u2-users@listserver.u2ug.org
Subject: RE: [U2] Duplicate IDs in a list

GET.LIST DELINQ.LIST TO 1
GET.LIST DELINQ.LIST TO 2
MERGE.LIST 1 UNION 2
SAVE-LIST DELINQ.LIST

 GET.LIST DELINQ.LIST TO 1
 GET.LIST DELINQ.LIST TO 2
 MERGE.LIST 1 UNION 2 TO 3
 SAVE-LIST DELINQ.LIST

Thanks,
David A. Green
DAG Consulting


-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Bill Haskett
Sent: Wednesday, June 27, 2007 3:47 PM
To: u2-users@listserver.u2ug.org
Subject: [U2] Duplicate IDs in a list

I can't remember if I've asked this before but we occasional needed to
provide a custom script for our ASP clients.  In D3 it looked
like:
 
01 N
02 DISPLAY ...selecting items for processing
03 P
04 SSELECT ARTOPEN WITH DESC = DELINQUENT CHARGE AND WITH AGE  30
ACCOUNT 05 SL DELINQ.LIST
06 GL DELINQ.LIST {U
07 SL DELINQ.LIST
08 P
09 DISPLAY ...selection complete
10 FTWIZ
 
A variety of people in our support department could build these kinds 
of scripts.  This is a D3 script.  Line 03 hushes output, line
06 makes sure redundant IDs aren't selected.  I've tried the usual
MERGE.LIST commands and can't get this to work in a paragraph.
 
I guess my first problem is; does UniData have any ability to get a 
list without selecting redundant IDs?  I tried:
 
GET.LIST DELINQ.LIST TO 1
GET.LIST DELINQ.LIST TO 2
MERGE.LIST 1 UNION 2 TO 3
SAVE-LIST DELINQ.LIST
 
...and it didn't work too well.  I tried it in BASIC and that didn't 
work too well either.  I had to write a custom BASIC program to
use LOCATE to build an array then did a FORMLIST then a 
SAVE.LIST.  This was
pretty bogus and development staff have to get involved
in this.
 
I'm in ECLTYPE P mode.  Can anyone help?  Thanks.
 
Bill
---
u2-users mailing list
u2-users@listserver.u2ug.org
To unsubscribe please visit http://listserver.u2ug.org/
---
u2-users mailing list
u2-users@listserver.u2ug.org
To unsubscribe please visit http://listserver.u2ug.org/
---
u2-users mailing list
u2-users@listserver.u2ug.org
To unsubscribe please visit http://listserver.u2ug.org/
---
u2-users mailing list
u2-users@listserver.u2ug.org
To unsubscribe please visit http://listserver.u2ug.org/