Coded Record Structures
Hamilton, Allison
Allison.Hamilton@Cognos.COM
Wed, 20 Jun 2001 15:22:40 -0400
Paul,
Hmmm... Coded records - well, to truly understand their usage it helps if
you've programmed in Cobol, which frequently uses them, and is probably why
PowerHouse supports them. Yes, you could program the selection yourself.
Putting it in the dictionary just ensures that the selection values are
always the same. PowerHouse looks after putting the correct selection value
in the record and retrieving only those records. It allows you to overlay
multiple kinds of data in the same file where they share a common first
part. You don't have to know what the selection value is to use the record,
you just have to know the name.
Yes, the performance of coded records isn't always the greatest, since it
can mean a sequential read unless you've added indexed support around the
selection criteria, which you are free to do. RMS doesn't know about coded
records - it is purely an application thing. It would be quite happy for
you to put whatever you want in a record, especially if you are using
variable length records. However - you would need something to tell you
what's in the records that you are reading so that you know what data is
where. PowerHouse, however isn't that forgiving, and if you want to combine
record types in one file, you would have to use coded records, which do
require select values so that each record structure can be identified and
the correct formats applied. Otherwise, you would have to manipulate the
data yourself to see it in the correct format - and then why use PowerHouse
since you'd be writing 3gl code pretty much anyway. Using the Select Values
allows PowerHouse to do the thinking and a lot of the work for you... which
is why we use it, isn't it?
I would suggest that most currently developed applications with good data
design would have little use for coded records. They are there for
interfacing with Cobol and other older applications which were designed with
different criteria and constraints than are mostly (hopefully) in practice
today.
I've seen some quite neat uses for coded records in the past, but usually
they could have been implemented using several files a bit more clearly,
using 'normalized' data structures.
Allison Hamilton
Senior Software Engineer,
Cognos Incorporated
Ottawa, ON
(613) 738-1440
As always - my comments and opinions are mine alone, and don't necessarily
reflect that of the company I work for.
-----Original Message-----
From: pablo grim [mailto:pablow666@gorge.net]
Sent: Wednesday, June 20, 2001 3:09 PM
To: powerhouse
Subject: Coded Record Structures
VMS 7.1
Powerhouse 7.4f4
I'm curious about the purpose of these coded record structures.
Specifically the "select item" in the record structure. Why is this
functionality in the dictionary rather than in the code? Isn't this a
function that the programmer could control in code. It's kind of hidden
away there in the dictionary.
Also, I was wondering about the efficiency of this technique. When
retrieving data, is it a sequential read using the code value? Since the
coded item is common to each variant record in the file, couldn't
(shouldn't) it be defined as an index for faster reads? Can this element
be defined both as a "select value" AND as an index?
Are select values REQUIRED for coded record structures or will Powerhouse
(or RMS) allow the user to create a file with more than one variant record
structure and NO coded values? Such that the programmer could control
update and retrieval directly via the code.
I guess I'm quite lost as to the nature and purpose of the select value item
in this interesting data structure.
thanks
Paul Grim
Progressive Computing
= = = = = = = = = = = = = = = = = = = = = = = = = = = =
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.