+ Reply to Thread
Results 1 to 2 of 2

QUESTION ON V/CORR DICTIONARY ITEM IN D3

  1. QUESTION ON V/CORR DICTIONARY ITEM IN D3

    Good evening,

    I was wondering if someone could tell me if this is even possible. I
    used to do multiple translates using in-line EVAL statements for
    JBase. Is something like this possible in an A or F type correlative?

    EVAL
    "OCONV(TRANS(PAYPLAN,TRANS(DEBTOR,@RECORD<5>,'48','X'),'11','X'),'D2-')"

    I know I can translate from B to A below. Can a D3 dictionary item
    translate from A to B even though the attribute I'm hoping to
    translate to isn't the key of the table? File B has multiple instances
    of the account number so I guess my next question is if I could only
    translate to the first or first match.

    FILE A
    ACCOUNT # IS IN ATTRIBUTE 0 (UNIQUE KEY)

    FILE B
    ACCOUNT # IS IN ATTRIBUTE 4 (NON-UNIQUE)

    F;4(TFILE A;X;;3)

  2. Re: QUESTION ON V/CORR DICTIONARY ITEM IN D3

    Bishop wrote:

    >Good evening,
    >
    >I was wondering if someone could tell me if this is even possible. I
    >used to do multiple translates using in-line EVAL statements for
    >JBase. Is something like this possible in an A or F type correlative?
    >
    >EVAL
    >"OCONV(TRANS(PAYPLAN,TRANS(DEBTOR,@RECORD<5>,'48','X'),'11','X'),'D2-')"


    I believe the answer to this is:

    A;5(TDEBTOR;X;;48)(TPAYPLAN;X;;11)(D2-)

    (Looks like CUBS?)

    I know you didn't ask this specifically, but with the information at
    the following two links you can get D3 to do a query EVAL like other
    platforms. See the the Comparative.AQL program here:
    removepleaseNebula-RnD.com/freeware/
    And here is an alternative method:
    removepleaseNebula-RnD.com/blog/tech/mv/2008/03/d3shell1.html



    >I know I can translate from B to A below. Can a D3 dictionary item
    >translate from A to B even though the attribute I'm hoping to
    >translate to isn't the key of the table? File B has multiple instances
    >of the account number so I guess my next question is if I could only
    >translate to the first or first match.
    >
    >FILE A
    >ACCOUNT # IS IN ATTRIBUTE 0 (UNIQUE KEY)
    >
    >FILE B
    >ACCOUNT # IS IN ATTRIBUTE 4 (NON-UNIQUE)
    >
    >F;4(TFILE A;X;;3)


    You can't do that with the default query processor, but using the
    techniques documented at the above links you can certainly do this.

    The first problem with going from A to B is of course that A doesn't
    know what the key to B is. Another problem is that even if you did
    have a key, translating to a multivalued set in D3 returns a single
    space-delimited value, not multiple values.

    However, these issues can be solved with the information above, and
    for those who want a packaged solution, I'll be happy to provide it as
    part of a service engagement.

    Tony Gravagno
    Nebula Research and Development
    TG@ remove.pleaseNebula-RnD.com

+ Reply to Thread