Thanks for the example, We will try it out 

-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Burwell, Ed
Sent: Friday, August 10, 2007 9:15 AM
To: u2-users@listserver.u2ug.org
Subject: RE: [U2] How to use LOCATE in an I Descriptor

I use this on UD.

SUBROUTINE DICT.LOCATE(OUT,LOOKER,FN,ITEM,ATT.LOOK,ATT.OUT)
*------------------------
* UCONV.BP DICT.LOCATE
* CALLED BY DICTIONARIES
* ED BURWELL
* 07/23/1999
*------------------------
* OUT      - FILE NAME, SENT BACK TO DICT
* LOOKER   - THING TO LOOK FOR
* FN       - FILE TO OPEN
* ITEM     - ITEM IN FILE TO READ
* ATT.LOOK - ATTRIBUTE TO LOOK IN
* ATT.OUT  - ATTRIBUTE TO RETURN OR "POS" TO RETURN POSITION
*------------------------
   OUT=""
   IF DCOUNT(FN," ")=2 THEN
      D=FIELD(FN," ",1)
      FN=FIELD(FN," ",2)
   END ELSE
      D=""
   END
   OPEN D,FN TO F.FILE ELSE RETURN
   READ REC FROM F.FILE,ITEM ELSE RETURN
   MAX=DCOUNT(LOOKER<1>,@VM)
   FOR I=1 TO MAX
      LOOK=LOOKER<1,I>
      LOCATE LOOK IN REC<ATT.LOOK>,1 SETTING POS THEN
         IF ATT.OUT="POS" THEN
            OUT<1,I>=POS
         END ELSE
            OUT<1,I>=REC<ATT.OUT,POS>
         END
      END ELSE
         IF ATT.OUT="POS" THEN OUT<1,I>=POS
      END
   NEXT I
   RETURN
END

Here is an example of how it's used:

001: V
002:
SUBR('DICT.LOCATE',MISC.CODE,"CARRIER.PARAM","FEDEX_SERVICE.LEVEL",5,13)
003:
004: C
005: 1R
006: S


-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] Behalf Of Richard A.
Wilson
Sent: Friday, August 10, 2007 3:47 AM
To: u2-users@listserver.u2ug.org
Subject: Re: [U2] How to use LOCATE in an I Descriptor


left over from old prime days.

basically a global catalog so voc items dont have to exists in each
account where the subr might be used.

I beliee its still legit for UV but probably not UD,Pick,etc

Rich

Jeff Butera wrote:

>> SUBR('*YOUR.LOCATE.SUBR',VALUE,@RECORD,AM.POS,VM.POS,SVM.POS,LR.JUST)
> 
> 
> Can I ask a naive question: When using SUBR what is the point of the 
> preceding * before the subroutine?
> 
> Jeff Butera, Ph.D.
> Administrative Systems
> Hampshire College
> [EMAIL PROTECTED]
> 413-559-5556
> 
> "Daddy - did you lose your mind?"
>                     Catherine Butera
> -------
> u2-users mailing list
> u2-users@listserver.u2ug.org
> To unsubscribe please visit http://listserver.u2ug.org/
> 
> 

--
Richard A. Wilson
Lakeside Systems
Smithfield, RI, USA
Voice 401-231-3959
Fax   206-202-2064
[EMAIL PROTECTED]
www.lakeside-systems.com
-------
u2-users mailing list
u2-users@listserver.u2ug.org
To unsubscribe please visit http://listserver.u2ug.org/

______________________________________________________________________
This e-mail has been scanned by MCI Managed Email Content Service, using
Skeptic(tm) technology powered by MessageLabs. For more information on
MCI's Managed Email Content Service, visit http://www.mci.com.
______________________________________________________________________

______________________________________________________________________
This e-mail has been scanned by MCI Managed Email Content Service, using
Skeptic(tm) technology powered by MessageLabs. For more information on
MCI's Managed Email  Content Service, visit http://www.mci.com.
______________________________________________________________________
-------
u2-users mailing list
u2-users@listserver.u2ug.org
To unsubscribe please visit http://listserver.u2ug.org/


This e-mail is for the use of the intended recipient(s) only. If you have 
received this e-mail in error, please notify the sender immediately and then 
delete it. If you are not the intended recipient, you must not use, disclose or 
distribute this e-mail without the author's prior permission. We have taken 
precautions to minimize the risk of transmitting software viruses, but we 
advise you to carry out your own virus checks on any attachment to this 
message. We cannot accept liability for any loss or damage caused by software 
viruses.
-------
u2-users mailing list
u2-users@listserver.u2ug.org
To unsubscribe please visit http://listserver.u2ug.org/

Reply via email to