powerh-l Digest, Vol 86, Issue 4
vical1 at eastlink.ca
vical1 at eastlink.ca
Fri Aug 24 12:15:23 CDT 2012
What type of file type is declared for the various "occurs" files, especially suppla and its alias. PH behaves differently for file types when they "occur". Also, are there any initial statements on the files?
You may need a separate "open" on the alias -- I suspect that could be the issue. I would probably make the alias a designer file and give it an open 1 -- don't think it even needs to occur if you're doing a forced get (but memory is fading on these details).
I wonder if there is a more elegant way to write this code but without seeing all of it, it would be difficult to say, and perhaps not worth the effort if it's a small change. I will add, thought, that doing a "get" in an update procedure is not generally advised. Best done in preupdate.
Hope this helps!
Vicki
Sent on the TELUS Mobility network with BlackBerry
-----Original Message-----
From: powerh-l-request at lists.sowder.com
Sender: powerh-l-bounces+vical1=eastlink.ca at lists.sowder.com
Date: Fri, 24 Aug 2012 12:00:03
To: <powerh-l at lists.sowder.com>
Reply-to: powerh-l at lists.sowder.com
Subject: powerh-l Digest, Vol 86, Issue 4
Send powerh-l mailing list submissions to
powerh-l at lists.sowder.com
To subscribe or unsubscribe via the World Wide Web, visit
http://lists.sowder.com/mailman/listinfo/powerh-l
or, via email, send a message with subject or body 'help' to
powerh-l-request at lists.sowder.com
You can reach the person managing the list at
powerh-l-owner at lists.sowder.com
When replying, please edit your Subject line so it is more specific
than "Re: Contents of powerh-l digest..."
Today's Topics:
1. trying to update file but not get message for other displayed
items on screen (Helen Wellcome)
----------------------------------------------------------------------
Message: 1
Date: Fri, 24 Aug 2012 08:25:42 -0400
From: Helen Wellcome <HWellcom at wsboces.org>
Subject: trying to update file but not get message for other displayed
items on screen
To: "powerh-l at lists.sowder.com" <powerh-l at lists.sowder.com>
Message-ID:
<FD8987665FAA2B4FB100A26FFA809E34552ED0A38F at WSBMS2007.WSBoces2.org>
Content-Type: text/plain; charset="us-ascii"
I have an old program with occurs. It wasn't reading existing suppla so when the screen comes up for entry, abscode is always displayed blank.
Date Dow absCode
07 09/03/12 Mon
08 09/04/12 Tue
09 09/05/12 Wed
The old code for update is as follows; it works but if a user mistakenly keys on a line record that exists, they get duplicate message and nothing updates in that session.
Procedure preupdate
Begin
For suppla
Begin
If abscode of suppla = " "
Then begin
Delete suppla
End
End
End
Procedure update
Begin
For suppla
Begin
Lock suppla
If abscode of suppla <> " "
Then begin
(Bunch of let statements)
Let ....fields of suppla = xfields
End
Put suppla
Unlock suppla
End
End
So I added an alias file of suppla, and displayed if any absent records existed.
Date Dow absCode
07 09/03/12 Mon
08 09/04/12 Tue A
09 09/05/12 Wed
so the user would know what dates existed and only key in new.
Date Dow absCode
07 09/03/12 Mon
08 09/04/12 Tue A
09 09/05/12 Wed A
I left the preupdate alone , I had previously tried doing extra checks for existing absent records , but got "the limit for backup movements (/) has been reached" which I looked up and I am deleting a deleted record or something.
I changed the update to
Procedure update
Begin
For suppla
Begin
Get xsupp(alias of suppla) optional
If not accessok (meaning new record on this screen)
Then begin
Lock suppla
If abscode of suppla <> " "
Then begin
Let statements
End
Put suppla
Unlock suppla
End
End
End
When updated , the new 9/5/12 record gets added but I get an error on existing records as in 9/4/12.
*d* not all changed records have been updated
I thought "if not accessok" would only run the lock if the record was new this session and so not found on the alias file
I want to only run the lock for new items added this session.
Helen wellcome
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.sowder.com/pipermail/powerh-l/attachments/20120824/75644218/attachment.html>
------------------------------
--
= = = = = = = = = = = = = = = = = = = = = = = = = = = =
Mailing list: powerh-l at lists.sowder.com
Subscribe: "subscribe" in message body to powerh-l-request at lists.sowder.com
Unsubscribe: "unsubscribe <password>" in message body to powerh-l-request at lists.sowder.com
http://lists.sowder.com/mailman/listinfo/powerh-l
This list is closed, thus to post to the list you must be a subscriber.
Add 'site:lists.sowder.com powerh-l' to your search terms to search the list archive at Google.
End of powerh-l Digest, Vol 86, Issue 4
***************************************
More information about the powerh-l
mailing list