No-optional access to secondary file (Quick)
Markus Grossrieder
markus.grossrieder@alba-systems.com
Fri, 24 Mar 2000 13:29:46 +0100
Hi Ken,
Great, works fine ! Just what I was looking for (besides of an integrated
option in FILE or ACCESS; hey Cognos people, suggestion ?). Why I didn't
think myself about that ¦:-?
(Mark: no, I will not be fired, and the question was mainly of my own
interest, but thanks anyway)
Thanks to eyerybody who tried to help
Markus
----- Original Message -----
From: "Ken Wong" <kwong@piranhainc.com>
To: "Markus Grossrieder" <markus.grossrieder@alba-systems.com>
Cc: <powerh-l@lists.swau.edu>
Sent: Friday, March 24, 2000 10:09 AM
Subject: Re: No-optional access to secondary file (Quick)
> Hi Markus,
>
> I believe there was a technique published some time ago that does what
> you are looking for.
>
> IIRC, it requires a reference file be added before your primary file
> and the primary file's selection based on the new file. The trick was
> to define the access to the reference file later in your code.
>
> ** the following code has not been tested **
>
> ; New reference file alias for secondary file
> ; Note that there is no access statement here.
> ; The selection criteria is identical to that of the secondary file.
> FILE B ALIAS B_REF REFERENCE
> SELECT IF ITEMX OF B_REF = "X"
>
> ; Copy the selection criteria from reference file
> FILE A PRIM OCCURS 15
> SELECT IF ITEMX OF B_REF = "X"
>
> FILE B SECOND OCCURS WITH A
> ACCESS VIA KEY1 USING KEY1 OF A
> SELECT IF ITEMX OF B = "X"
>
> ; Eventually, PowerHouse needs to know how B_REF is going to be
> ; accessed. One approach is to use 'lookup on ... optional' on a
> ; field. Another is to put it somewhere in your procedural code.
> ; Just be sure that 'optional' is specified.
>
> procedure INITIALIZE
> begin
> get B_REF optional &
> via KEY1 &
> using KEY1 of A
> end
>
>
> Hope that helps.
>
> Ken Wong
> PCG Inc.
>
>
>
>
= = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =
Subscribe: "subscribe powerh-l" in message body to majordomo@lists.swau.edu
Unsubscribe: "unsubscribe powerh-l" in message to majordomo@lists.swau.edu
This list is closed, thus to post to the list, you must be a subscriber.