LINKING TABLES

brian_matthewsbrian matthews brian_matthews_bmw@hotmail.com
Wed, 17 Nov 2004 02:48:44 +0000


Assuming that your file is not a table in an RDB, and that the item 
DOCUMENT_NUM of DTL is not an indexed segment there is another, but 
potentially very slow option, and that is to use the linkage below.

ACC  DTL LINK DOCUMENT_NUM TO DOCUMENT_NUM OF * DKF1:[DW]DWDTL

In order to do this you will need to make your subfile indexed on the item 
DOCUMENT_NUM.

As long as you don't use optional on the access statement it will return 
data only where a link was made to the subfile.

The other option is to make the item DOCUMENT_NUM of DTL an indexed segment 
of the file and rebuild your file.

I am pretty sure that only applications which wish to use the new segment 
need to be recompiled once the new index is added.

Bri,

>From: "Deskin, Bob" <Bob.Deskin@cognos.com>
>To: <powerh-l@lists.sowder.com>
>Subject: RE: LINKING TABLES Date: Tue, 16 Nov 2004 21:02:13 -0500
>
>That's correct. You can link to any column of a relational table by 
>specifying the name of the column as a TO in the ACCESS. However, that only 
>applies to relational tables. To link to a non-relational indexed file or 
>IMAGE (on MPE/iX), you must link to a segment of a key or index.
>Bob Deskin
>Senior Product Manager, Application Development Tools
>Cognos Inc. 3755 Riverside Drive, Ottawa ON K1G 4K9 CANADA
>bob.deskin@cognos.com (613) 738-1338 ext 7268
>
>-----Original Message-----
>From: powerh-l-admin@lists.sowder.com 
>[mailto:powerh-l-admin@lists.sowder.com]On Behalf Of Jonbickel@aol.com
>Sent: November 16, 2004 4:57 PM
>To: powerh-l@lists.sowder.com
>Subject: Re: LINKING TABLES
>
>
>Kristina,
>
>By dictionary file, I assume that you mean an RMS file.  IIRC, you cannot 
>link on a non-indexed field to anything other than a relational table.
>
>jb
>
>In a message dated 11/16/2004 3:41:51 PM Central Standard Time, 
>Kristina.Carlton@JICompanies.com writes:
>
>Hi List,
>
>I am using OpenVMS v7.3-2 and Quiz V7.10.G4.
>
>A while back I had trouble linking tables and got some help from this list. 
>Everything has been working great, but today I ran into a problem again. My 
>attempt is to access a subfile, then link it to a dictionary file via one 
>field, which is not indexed.
>
>This is my access statement:
>
>ACC *DKF1:[DW]DWDTL ALIAS DWDTL LINK DOCUMENT_NUM OF DWDTL  TO DOCUMENT_NUM 
>OF DTL
>
>And the resulting error message:
>
>*E* Item(s) DOCUMENT_NUM not defined as an index of DTL.
>
>Can someone point out what I am doing wrong?
>
>
>
>Thanks,
>
>Kristina Carlton
>
>Senior Programmer/Analyst
>
>The JI Companies
>
>512.427.2459
>
>kristina.carlton@jicompanies.com
>
>        This message may contain privileged and/or confidential 
>information.  If you have received this e-mail in error or are not the 
>intended recipient, you may not use, copy, disseminate or distribute it; do 
>not open any attachments, delete it immediately from your system and notify 
>the sender promptly by e-mail that you have done so.  Thank you.
>

_________________________________________________________________
It's fast, it's easy and it's free. Get MSN Messenger today! 
http://www.msn.co.uk/messenger