Hi Al,
Is LOCATE different in UniData & UniVerse?
I think your ELSE is the problem - it is taken if the item is not found.
Try:
LOCATE(PART.NBR,RECORD,14;'AL',POS) ELSE
INS PART.NBR BEFORE RECORD<14,POS>
END
Good luck! Kate
----- Original Message -----
From: "Al DeWitt" <[EMAIL PROTECTED]>
To: <[email protected]>
Sent: Tuesday, November 08, 2005 12:26 PM
Subject: [U2] Sort help needed
Environment: UniData - Pick Flavor
I'm trying to build a multi-value field in part number order.
I begin with LOCATE PART.NBR IN RECORD<14> BY "AL" SETTING POS ELSE POS
= 0
The first time through RECORD<14> is empty. The second time RECORD<14>
has one value. If PART.NBR is of greater value than what is now in
RECORD<14> then I want PART.NBR to be the second value, if it is of
lesser value than I want PART.NBR to be inserted before the value in
RECORD<14>.
I will then do a second LOCATE to see where PART.NBR is stored
(RECORD<14,x>) and use that position to insert data into associated
attributes.
My problem is that I haven't done this in a while and when I did it was
in Universe. So not only am I suffering a senior moment I'm dealing
with a language barrier.
Any help would be greatly appreciated.
Thanks.
Al DeWitt
Stylmark, Inc.
-------
u2-users mailing list
[email protected]
To unsubscribe please visit http://listserver.u2ug.org/
-------
u2-users mailing list
[email protected]
To unsubscribe please visit http://listserver.u2ug.org/