Just about every vendor that I've seen implement this has done it slightly different. This is how you do it in mvbase - from my "How To" folder:
If you have the manual for your version, start looking through the section on Dictionary types! How to write basic subr DICT items in MvBase LASTVALUE 001 SUBROUTINE LASTVALUE 002 $INCLUDE BASICLIB ACCESS.COMMON 003 ANSWER = CURRENT$<1,DCOUNT(CURRENT$,@VM)> 004 RETURN ANSWER LAST.QTY 001 A 002 12 003 004 005 006 007 008 B:BP LASTVALUE 009 R 010 10 Dick Pick used to have a challenge for anyone to write a dictionary that would allow printing the last value of a MV field (as I did above with a SUBR). I figured a way to do it with A correlatives and wrote to him. He wrote back and said the challenge was to use F correlatives, and even though I had figured out a way, I didn't win the CIGAR. He also thanked me and told me he was going to tell everyone he knew that there was now a way. It took three dicts: one to do a boolean comparison to value mark (leaves a 1 for every value mark found) the second to do a summation of previous step + 1 the third to do a index of the previous step on the attr to arrive at the last value of the attr Now it's a piece of cake to do in just about any version with all the additions that have been done. But back in 1988 it was a *little* harder! hth, Allen -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Behalf Of Jeff Schasny Sent: Wednesday, September 17, 2008 07:01 To: u2-users@listserver.u2ug.org Subject: Re: [U2] I need a correlative, just like the correlative... I don't know how to do that in a correlative i.e. Pick/SMA style dictionary entry. Any help would be appreciated. Allen E. Elwood wrote: > Which is why I always just use a subr. The real cost to the client is the > cost creation and maintenance. Subr's are just *so* easy to understand. ------- u2-users mailing list u2-users@listserver.u2ug.org To unsubscribe please visit http://listserver.u2ug.org/