• Can a dictionary do a TRANS to another file, and then a DCount on the s

    From sueglo@21:1/5 to All on Wed Jun 1 11:59:24 2016
    Hello Group,

    I have an I-Descriptor Dictionary that works going from one file to another and picks up attribute 1 in the other file, works great. It is a Multivalued Field.

    I don't know if this is possible or not, and am hoping that one of you might have an idea for me.

    Here is the Dictionary -

    Pa.Cov is the file name, POLKEY IS <4> In PA.COV,
    Polkey is the Recid for the Policies.Vehicles file, Multivalued, which I need to get a count of how many there are.

    Veh.Ct

    1 I

    2 TRANS('POLICIES.VEHICLES',POLKEY,1,'C')


    3

    4 VEHCT

    5 50L

    6 SM

    I get the results I want for this - takes me to the right place -

    LIST PA.COV VEH.CT 02:53:36
    PA.COVERAGES VehCt.........

    179356 623713
    623714

    182840 637952
    637951

    179360 623719

    175644 610255
    610256

    186264 650926

    177237 615841
    615842

    186919 653303
    653304

    172588 597821
    629263
    597822

    175324 609181

    179735 625290
    628839

    182954 638157
    183896 642215


    What I would like to get for this info, take the first item for example - 179356 should show me the number 2 because there are 2 items in the attribute <1>

    I tried to add this DCOUNT on to line 2 of the dictionary above, it only gave me the number 1 - even if there were 7 items on line 1.

    TRANS('POLICIES.VEHICLES',POLKEY,1,'C');DCOUNT(@RECORD<1>,@VM)

    Is there any way any of you can think of that I can get the result I would like? I am all ears!

    Thanks,
    Susan

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From brac5301@gmail.com@21:1/5 to sueglo on Thu Jun 2 08:54:07 2016
    On Wednesday, June 1, 2016 at 2:59:25 PM UTC-4, sueglo wrote:
    Hello Group,

    I have an I-Descriptor Dictionary that works going from one file to another and picks up attribute 1 in the other file, works great. It is a Multivalued Field.

    I don't know if this is possible or not, and am hoping that one of you might have an idea for me.

    Here is the Dictionary -

    Pa.Cov is the file name, POLKEY IS <4> In PA.COV,
    Polkey is the Recid for the Policies.Vehicles file, Multivalued, which I need to get a count of how many there are.

    Veh.Ct

    1 I

    2 TRANS('POLICIES.VEHICLES',POLKEY,1,'C')


    3

    4 VEHCT

    5 50L

    6 SM

    I get the results I want for this - takes me to the right place -

    LIST PA.COV VEH.CT 02:53:36
    PA.COVERAGES VehCt.........

    179356 623713
    623714

    182840 637952
    637951

    179360 623719

    175644 610255
    610256

    186264 650926

    177237 615841
    615842

    186919 653303
    653304

    172588 597821
    629263
    597822

    175324 609181

    179735 625290
    628839

    182954 638157
    183896 642215


    What I would like to get for this info, take the first item for example - 179356 should show me the number 2 because there are 2 items in the attribute <1>

    I tried to add this DCOUNT on to line 2 of the dictionary above, it only gave me the number 1 - even if there were 7 items on line 1.

    TRANS('POLICIES.VEHICLES',POLKEY,1,'C');DCOUNT(@RECORD<1>,@VM)

    Is there any way any of you can think of that I can get the result I would like? I am all ears!

    Thanks,
    Susan

    I find that sometimes is easier to CALL a subroutine than to figure out a way to make it work using F's, I's, T's etc.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Ross Ferris@21:1/5 to All on Sun Jun 5 16:47:24 2016
    +1 for the CALL approach

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From sueglo@21:1/5 to Ross Ferris on Mon Jun 6 09:31:23 2016
    On Sunday, June 5, 2016 at 7:47:25 PM UTC-4, Ross Ferris wrote:
    +1 for the CALL approach

    ok, thank you!

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From kpowick@gmail.com@21:1/5 to All on Wed Jun 1 13:54:53 2016
    This group has essentially been replaced by the following Google group

    https://groups.google.com/forum/#!forum/mvdbms

    Post your question there for a better chance of getting help.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From wjhonson@21:1/5 to sueglo on Tue Jun 7 10:03:35 2016
    On Wednesday, June 1, 2016 at 11:59:25 AM UTC-7, sueglo wrote:
    Hello Group,

    I have an I-Descriptor Dictionary that works going from one file to another and picks up attribute 1 in the other file, works great. It is a Multivalued Field.

    I don't know if this is possible or not, and am hoping that one of you might have an idea for me.

    Here is the Dictionary -

    Pa.Cov is the file name, POLKEY IS <4> In PA.COV,
    Polkey is the Recid for the Policies.Vehicles file, Multivalued, which I need to get a count of how many there are.

    Veh.Ct

    1 I

    2 TRANS('POLICIES.VEHICLES',POLKEY,1,'C')


    3

    4 VEHCT

    5 50L

    6 SM

    I get the results I want for this - takes me to the right place -

    LIST PA.COV VEH.CT 02:53:36
    PA.COVERAGES VehCt.........

    179356 623713
    623714

    182840 637952
    637951

    179360 623719

    175644 610255
    610256

    186264 650926

    177237 615841
    615842

    186919 653303
    653304

    172588 597821
    629263
    597822

    175324 609181

    179735 625290
    628839

    182954 638157
    183896 642215


    What I would like to get for this info, take the first item for example - 179356 should show me the number 2 because there are 2 items in the attribute <1>

    I tried to add this DCOUNT on to line 2 of the dictionary above, it only gave me the number 1 - even if there were 7 items on line 1.

    TRANS('POLICIES.VEHICLES',POLKEY,1,'C');DCOUNT(@RECORD<1>,@VM)

    Is there any way any of you can think of that I can get the result I would like? I am all ears!

    Thanks,
    Susan

    When you do a TRANS, by requirement, the result is *lowered* (see the LOWER function) otherwise it would cause system instability.

    You have to RAISE the result of the TRANS in order to get it back into it's native form.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From sueglo@21:1/5 to brac...@gmail.com on Mon Jun 6 09:31:39 2016
    On Thursday, June 2, 2016 at 11:54:08 AM UTC-4, brac...@gmail.com wrote:
    On Wednesday, June 1, 2016 at 2:59:25 PM UTC-4, sueglo wrote:
    Hello Group,

    I have an I-Descriptor Dictionary that works going from one file to another and picks up attribute 1 in the other file, works great. It is a Multivalued Field.

    I don't know if this is possible or not, and am hoping that one of you might have an idea for me.

    Here is the Dictionary -

    Pa.Cov is the file name, POLKEY IS <4> In PA.COV,
    Polkey is the Recid for the Policies.Vehicles file, Multivalued, which I need to get a count of how many there are.

    Veh.Ct

    1 I

    2 TRANS('POLICIES.VEHICLES',POLKEY,1,'C')


    3

    4 VEHCT

    5 50L

    6 SM

    I get the results I want for this - takes me to the right place -

    LIST PA.COV VEH.CT 02:53:36
    PA.COVERAGES VehCt.........

    179356 623713
    623714

    182840 637952
    637951

    179360 623719

    175644 610255
    610256

    186264 650926

    177237 615841
    615842

    186919 653303
    653304

    172588 597821
    629263
    597822

    175324 609181

    179735 625290
    628839

    182954 638157
    183896 642215


    What I would like to get for this info, take the first item for example - 179356 should show me the number 2 because there are 2 items in the attribute <1>

    I tried to add this DCOUNT on to line 2 of the dictionary above, it only gave me the number 1 - even if there were 7 items on line 1.

    TRANS('POLICIES.VEHICLES',POLKEY,1,'C');DCOUNT(@RECORD<1>,@VM)

    Is there any way any of you can think of that I can get the result I would like? I am all ears!

    Thanks,
    Susan

    I find that sometimes is easier to CALL a subroutine than to figure out a way to make it work using F's, I's, T's etc.

    ok, thank you!

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)