"STRANGE" BEHAIVIOR

Arthur Kogan akogan@westpac.com.au
Fri, 26 Feb 1999 17:40:36 +1100


Hi Bob,

I think this one requires your "deep" knowledge of PH to explain.

I am working on a quite complex screen and have hit a problem, which I can not
readily explain (which is concerning in it self!!!). I am using PH710F4 on
Alpha VMS with RMS files.

In my screen after "finding" a primary record, I run a designer procedure. The
designer procedure:

1. sets a system variable with the name of my temporary data file, using
setsystemvalue function.
2. runs command to create the empty file, using "create/fdl=..." command. This
is an indexed RMS file.
3. writes some records to this file, using "put <filename> reset". It writes
new records only.
4. reads this file during further processing and displays some values on the
screen.
5. closes the temporary file.

I have been careful to put close file statement just before flagging any error
messages occurring after the first write to the file, within this designer
procedure, as in this case the execution of the procedure stops at the error
message and does not continue to step 5.

The problem occurs when after running the designer procedure once, I run it
again without re-finding the primary record or updating (if I do either of
those, there is no problem). The original error message I was receiving was an
RMS error about "bucket format check failed". After digging dipper, I got the
Powerhouse error "record has changed since you last found it" on the first
write to the new temporary file.

This has got me thinking, that although I am trying to write "new" records to
the "new" empty file, because I have not done a find or update, PH thinks that
I am writing an updated version of the last read record. To test this, I
changed my "put <filename> reset" command to "put NEW <filename> reset". This
time I got no error, but NO records were written to the file. Note also that
the error only occurs every second time, i.e. if after finding the primary
record, I run the designer procedure 6 times, the error will occur only the
second, fourth and sixth time.

Now, I think I can guess that the problem here is that the record status flag
does not get reset, so the screen thinks I want to update instead of adding a
new record. The question is how can I force this to happen? If I can not get
this to work this way, I guess, I can change the screen to run the designer
procedure from POSTFIND, so it can only be run after the user does a find, but
I would really like to get this to work according to the original design.

Please help/explain/confirm my guess.

Regards,

Arthur Kogan
Westpac Financial Services
Sydney, Australia

= = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =
Subscribe: "subscribe powerh-l" in message body to majordomo@lists.swau.edu
Unsubscribe: "unsubscribe powerh-l" in message to majordomo@lists.swau.edu
powerh-l@lists.swau.edu is gatewayed one-way to bit.listserv.powerh-l
This list is closed, thus to post to the list, you must be a subscriber.