GET-statement with or without VIA option.

Merol Newman merol.newman@ramesys.com
Wed, 13 Feb 2002 11:28:47 -0000


Hello Martie

GET will only get one record - the first that qualifies. I notice that the second item in your
VIA/USING link has different names in the two files, so the VIAINDEX syntax will only be linking on
the first item, ENUPLC, I think. Even though you specify the name of the second item in USING, I
don't think Powerhouse will recognise that it is supposed to link that to the second item in the
key.

VIA/USING, with all items specified for both files, is always safer than VIAINDEX, which can involve
some defaulting. You don't need to use VIAINDEX in a link that has VIA/USING.

I was going to ask for a QSHOW listing, but Chris Sharman beat me to it!

regards
Merol

merol.newman@ramesys.com
Ramesys, Eldon Way, Crick, Northamptonshire, UK. NN6 7SL
phone 01788 822133/823831, fax 01788 823601


> -----Original Message-----
> From: powerh-l-admin@cube.swau.edu
> [mailto:powerh-l-admin@cube.swau.edu]On Behalf Of RessingM@unive.nl
> Sent: 13 February 2002 09:04
> To: powerh-l@lists.swau.edu
> Subject: GET-statement with or without VIA option.
>
>
> Hello,
>
> I have a question about using the VIA option on a GET-statement in Quick. In
> most cases I use only the VIAINDEX and the USING options to define a get
> statement. For example:
>
> GET DES1_GEDD037Z &
>   VIAINDEX GEDD037A &
>   USING    ENUPLC OF GEDD037Z, &
>            TNUENDRMNT &
>   OPTIONAL
>
> But this statement doesn't always retrieve the correct record and the
> problem is solved by adding the VIA option:
>
> GET DES1_GEDD037Z &
>   VIAINDEX GEDD037A &
>   VIA      ENUPLC, ENUENDRMNT &
>   USING    ENUPLC OF GEDD037Z, &
>            TNUENDRMNT &
>   OPTIONAL
>
> In my opinion both constructions should work identical (both using the same
> index-fields), but they don't, according to my test results.
> Does anyone have a suggestion what causes the difference ?
>
> Additional information:
> PowerHouse version 7.10.F2
> Platform: OpenVMS 7.1 (DEC-Alpha)
> File-type: RMS, indexed
>
> Greetings,
>
> Martie Ressing
> Univé Verzekeringen
> Zwolle, The Netherlands
>
> = = = = = = = = = = = = = = = = = = = = = = = = = = = =
> Mailing list: powerh-l@lists.swau.edu
> Subscribe: "subscribe" in message body to powerh-l-request@lists.swau.edu
> Unsubscribe: "unsubscribe" in message body to powerh-l-request@lists.swau.edu
> http://lists.swau.edu/mailman/listinfo/powerh-l
> This list is closed, thus to post to the list you must be a subscriber.
>