This is actually some code I put together from a Rock tech note. It's
come in handy at various times. :-)
I'd be happy to share the code with you; I use UD but I suspect it
wouldn't be too hard to get it running on UV.
Bill
Untitled Page
------------------------------------------------------------------------
----- Original Message -----
*From:* ggal...@wyanokegroup.com
*To:* U2 Users List <u2-users@listserver.u2ug.org>
*Date:* 10/17/2012 10:20 AM
*Subject:* Re: [U2] Selection Suggestions for using UV instead of SQL
Looks like either UV doesn't have LSELECT, or UV 10.0.2 does not.
George
-----Original Message-----
From: u2-users-boun...@listserver.u2ug.org
[mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of Bill Haskett
Sent: Wednesday, October 17, 2012 1:16 PM
To: U2 Users List
Subject: Re: [U2] Selection Suggestions for using UV instead of SQL
George:
How about something like:
3 Dev (0)-> LSELECT ?
This will create a list of {FileName} keys for records whose
field definition value appears in a defined list.
Syntax:
LSELECT File_Name WITH Dict_Name IN LIST1 TO LIST2 [VERBOSE| -V]
Example: SELECT CUSTOMERS SAMPLE 500
SAVE.LIST MY.LIST
LSELECT SALES.ORDERS WITH CUST.NBR IN MY.LIST TO MY.LIST.2
Notes:
If a destination list is not supplied then keys will be left as the active
select list. If a source list is not supplied then the current active
select
list will be used. Lists may be specified as select buffers (0-8) or as
named
lists from SAVEDLISTS.
An example of this is as follows:
3 Dev (0)-> SELECT MASTER "260""605"
2 records selected to list 0.
3 Dev (0)-> SAVE-LIST MY.LIST
2 key(s) saved to 1 record(s).
3 Dev (0)-> LSELECT ARTMASTER WITH CLIENTNO IN MY.LIST VERBOSE
(Parsed Command)
LSELECT ARTMASTER WITH CLIENTNO IN MY.LIST TO 0
(Selected List)
List Source MY.LIST found 2 items.
(Create Temp File)
LSELECT0031 file created with MOD = 5
(Loaded List to Temp File) - 2 items.
977 key(s) saved to 1 record(s).
(Selected Result List)
UDT.COMMAND = select ARTMASTER WITH EVAL
"TRANS('LSELECT0031',CLIENTNO,'@ID','X')" GT "" TO 0
UDT.RESPONSE = ?977 records selected to list 0.??
Destination 0
Named List 0
(Delete Temp File)
LSELECT0031 file deleted...
3 Dev (0)>>
This now has a list of (/*ARTMASTER*/) records that contain a client# in
the original select list, MY.LIST.
HTH,
Bill
Untitled Page
_______________________________________________
U2-Users mailing list
U2-Users@listserver.u2ug.org
http://listserver.u2ug.org/mailman/listinfo/u2-users
_______________________________________________
U2-Users mailing list
U2-Users@listserver.u2ug.org
http://listserver.u2ug.org/mailman/listinfo/u2-users