UPDATE Procedure Generation (was OpenVMS Differences Document )

Bill D Michael Bill.Michael@ipaper.com
Thu, 10 Aug 2000 16:52:06 -0500


Since my name was used in vain here... :-) I'm not too concerned with the
order for relational tables, since the thought process is similar to that
for Image masters; you must update the primary before the details or you
hit foreign-key constrants. I will give Cognos the benefit of the doubt
that the default in this case will not be "details then primary" for
relational, but I have NOT tried any of these cases yet. Plus cursors are
likely to be used instead of PUTs.

However, we're already seeing problems with 8.20 on RMS files because of
the PUT order. "Bottomup" or _whatever_ you call it, simply doesn't work
MOST of the time, at least it doesn't work as you'd expect and as the
manual implies. (When describing the order you should put your FILE
statements for initialization purposes.)  "Topdown" SHOULD be the default!
Simple example;

FILE myprimary PRIMARY
   ITEM someitem FINAL SYSDATE
FILE mysecondary SECONDARY
   ITEM someitem FINAL someitem OF myprimary

Build the screen, enter some data, and update. In 7.10, "someitem" is
correctly set (SYSDATE in both the primary and the secondary). In 8.20
however, someitem of primary is SYSDATE - but someitem of secondary is
blank, or yesterday, or last week... Run it in debug and you'll see that
the secondary is written before the primary field is set. I can't believe
it's been this way on other platforms without having users scream - but
then any HP folks would likely be using Image, so the special-case there
would make it work right, and no VMS folks are on 8.20 yet, I would hope.

I suggest your two words be your initial thought "TOPDOWN" and "BOTTOMUP",
as those do reflect the structure-direction; but if you _really_ want a
couple that are more descriptive, you can always use "RIGHT" and "WRONG"...

Bill






"Deskin, Bob" <Bob.Deskin@Cognos.COM>@sphere.swau.edu on 08/10/2000
04:16:35 PM

Sent by:  owner-powerh-l@sphere.swau.edu



To:   "'Powerhouse List'" <powerh-l@sphere.swau.edu>
cc:   "'PICKERIJ@norbord.com'" <PICKERIJ@norbord.com>, "Hamilton, Allison"
      <Allison.Hamilton@Cognos.COM>
Subject:  RE: UPDATE Procedure Generation (was OpenVMS Differences Document
      )


So my choice of program parameter keywords was too simplistic. Wouldn't be
the first time.

I did some additional playing (or testing if you're talking to my boss).
First off, the 8.xx approach is the same throughout the 8 series and is
also
the same as 7.29/7.23/7.33. 7.10 is different. There is additional logic
for
IMAGE databases but there is none for relational databases. Unfortunately
due to lack of time, 8.30 and 8.39 will not have anything changed for
relational (sorry Bill). We will keep that in mind for 8.4x.

What we need to do for the 8.30 project is provide the ability for 7.10
users to retain that approach to UPDATE procedure generation if they so
desire. If I have my way, that approach will not be available to any other
platforms because we don't want to confuse things. So in fact, this
discussion is only relevant to OpenVMS customers (sorry John, but feel free
to comment anyway).

I grant you that the words TOPDOWN and BOTTOMUP are too simplistic. They
weren't necessarily aimed at the declared file order, but at the implied
QUICK transaction structure. If we look only at indexed files, in 7.10 the
PUT verb sequence in most cases is in the order of the FILE statements. At
least for MASTER, PRIMARY, DETAIL, and SECONDARY. If you put a SECONDARY
before the PRIMARY, the PRIMARY is first. So really the order is MASTER,
PRIMARY, DETAIL/SECONDARY, DELETE. I didn't test any others. If you look at
the implied QUICK transaction structure with the MASTER or PRIMARY at the
top, then this is TOPDOWN or at least TOPOFSTRUCTUREFIRST (which is much
too
long).

In 8.10 and 8.20 (and 7.29, 8.19, 8.29, 8.39 etc), the order is reversed.
However, within one type of file (like SECONDARY) the order is the sequence
of FILE statements (top down). So the overall order is DETAIL, SECONDARY
(in
top-down order), DELETE, PRIMARY, MASTER. This is what I meant by BOTTOMUP
or at least TOPOFSTRUCTURELAST.

I have not tested SECONDARY OCCURS WITH DETAIL or DELETE OCCURS WITH and so
on.

So I need two words to describe the way we generate UPDATE procedures. They
must make sense to the OpenVMS folks and hopefully will not be used by the
rest of you.

Any ideas?

Bob Deskin
PowerHouse Web Product Manager and Senior Product Advisor
Application Development Tools, Cognos Inc.
bob.deskin@cognos.com (613) 738-1338 ext 7268 FAX: (613) 727-1178
3755 Riverside Drive P.O. Box 9707 Stn. T, Ottawa ON K1G 4K9 CANADA



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