The only way I have found is with a B correlative (ie: attr 8 s/b
b;LASTVM) and a very short basis program as follows:
SUBROUTINE LASTVM
******
* RETURN THE LAST VM FIELD IN ATTR REQUESTED
* RJ KANN <04/30/09>
******
INCLUDE \jbase30\include\qbasiccommonpick
LOCATE('XYZZY',access(3),access(5);VMC) ELSE VMC=VMC-1
newpick(12)=access(3)<access(5),VMC>
99 RETURN
END
Richard Kann
Comp-Ware Systems, Inc.
inavran wrote:
> Hi,
>
> I was wondering if anyone knew the correct syntax for extracting the
> 'last multi-value' from a field using a 10 line dictionary items
>
> eg record (3 attributes with 4 multi-values on each line)
>
> 001:john]dave]simon]chris
> 002:blue]red]yellow]green
> 003:30]25]42]50
>
> i would want to extract just "chris" from attribute 1. (being the last
> MV)
>
> also, i would be curious how to extract a specific other multi value
> as well (eg "dave" (MV 2)
>
> at present i am doing this using a subroutine CALL within the DICT,
> which is very slow (as you would expect), so i am keen to get a better
> solution in place.
>
> I am using jBASE 3.4.x on Windows 2003
>
> Many thanks in advance.
>
> Ian
>
> >
>
>
>
--~--~---------~--~----~------------~-------~--~----~
Please read the posting guidelines at:
http://groups.google.com/group/jBASE/web/Posting%20Guidelines
IMPORTANT: Type T24: at the start of the subject line for questions specific to
Globus/T24
To post, send email to [email protected]
To unsubscribe, send email to [email protected]
For more options, visit this group at http://groups.google.com/group/jBASE?hl=en
-~----------~----~----~----~------~----~------~--~---