Vectoring (is 'vector' a verb?) is built into TRANS already.  
No need to abandon in favour of OCONVS T-correlative.
You can specify a dynamic array of IDs for the target file to read.

> I have used the Translate code with OCONVS() function when it 
> is stylistically in keeping with the use of vector functions 
> around it and only because there isn't a vector version of 
> TRANS(), but personally I wouldn't use it outside of that situation.
> 
>       custProductIDs = splice(reuse(custId),'*',productIds)

instead of / as well as this:

>       prices = oconvs(custProductIDs,'TCUST.PRODUCT;X;;99')

this works fine (even better I think):

        prices = TRANS( 'CUST.PRODUCT', custProductIDs, 99, 'X' )


But a caution:

If CUST.PRODUCT <99> is multivalued &/or sub-valued:
 
 * T-correlative converts all delimiters to spaces when OCONVS returns.
     (consistent with PICK.)

 * TRANS will lower the returned delimiters. 
    (almost consistent with PI.)
    - if called from Retrieve, the delimiters are lowered enough to
        keep the association with the dict equivalent of custProductIDs
        which might be multi-SUB-valued or even have TMs or lower.
    - if called from Basic, not that smart, just lowered once,
        so you might lose the association with custProductIDs.


The above for UV. Mileage for UD may vary.

cds
-------
u2-users mailing list
[email protected]
To unsubscribe please visit http://listserver.u2ug.org/

Reply via email to