Linking to a subfile (was Subphyla question)

Rob Lobbe rlobbe@vic.bigpond.net.au
Thu, 2 Mar 2000 22:18:36 +1100


I'll add my 2 cents,

I've followed this tread for a while.
While linking to a record number is the solution (either 1 or 0 depending on
platform)
The main situation that I have see is that this was the last LINK TO in the
list.

This record should always be found, especially after all the effort to
create it, and should be positioned as the second file access in the list

ACCESS primary_record
  LINK TO RECORD x OF parameter_record
  LINK TO other_records
  LINK TO optional_records OPTIONAL

SELECT parameter_record IF item of parameter_record = item of primary_record

The construction of record complexes stops if the parameters do not match (a
big saving on I/O)

If using a database, create a view containing primary_record &
parameter_record otherwise the complete construct will be generated
(virtually) before the SELECT will be processes. The SELECT itself should be
part of the view.

Rob Lobbe
rlobbe@vic.bigpond.net.au
Practice Manager
Praxa Ltd



----- Original Message -----
From: "Merol Newman" <meroln@specialist.co.uk>
To: <matt.ohmes@cognos.com>
Cc: <powerh-l@lists.swau.edu>
Sent: Thursday, March 02, 2000 9:48 PM
Subject: RE: Linking to a subfile (was Subphyla question)


Hello Matt

I only joined yesterday, and I don't think I'll have time to read anything
most
days, let alone reply! And little did I think I would have anything useful
to
say - I joined to pick other people's brains. But somewhere in the flood of
messages I think one programmer said his report took 45 minutes to link to
record 1 of the subfile on Unix. Could it be because Unix can't find record
1,
and so doesn't use the buffer as described?

It should be:-      record 1 on Vax VMS
                    record 0 on HP MPE (HP3000, HP/XL)
                    record 0 on Unix

I've been using this method for years, including at various times all three
platforms, and never found any performance problems.

Merol Newman
E-mail: meroln@specialist.co.uk <mailto:meroln@specialist.co.uk>

I've just found the relevant bit:-

 G'day Matt
>
> I have to challenge you on what you said about "Quiz will read the
> subfile
> record once".  I 'fixed' a report for a client last year on a
> HP/UX box
> where a report was taking 45 minutes to run.  This report was
> reading a
> table and linking to record 1 of a subfile.  It read the subfile for
> each
> occrrence on the primary file.
>
> I replaced the logic using an environment variable and a CHOOSE on the
> primary file instead.  This reduced the run time to only 5 minutes.
>
> Blue


> >
> > Actually you can link to the subfile from your data file. Try this:
> >
> > ACCESS datafile LINK TO RECORD 1 OF *subfile
> >
> > SELECT IF dateitem of subfile = dateitem of datafile
> >
> > Quiz will read the subfile record once and keep it in memory
> > through the
> > entire run, so it should be quite effecient.
> >
> > You didn't say what machine you are on, but the above works
> > for VAX and
> > UNIX
> > (I believe). If you are on an HP3000, substitute a zero for the "1" in
> > the
> > ACCESS statement.
> >
> > Matt
> >


= = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =
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.

= = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =
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.