Re[2]: QUICK PreUpdate Procedure
GGrimm@pcc-structurals.com
GGrimm@pcc-structurals.com
Wed, 04 Oct 2000 13:39:36 -0700
I've used the technique Ray so eloquently presents and find it solves
my requirement nicely. What especially appeals to me is that it's
isolated in the place that the needs it rather than scattered all over
the program.
______________________________ Reply Separator _________________________________
Subject: RE: QUICK PreUpdate Procedure
Author: Ray Bailey <Ray.Bailey@lightsout.co.uk> at RDM-PO1
Date: 10/04/2000 12:13 PM
You can use temporary items and a for loop to get the required results.
Temporary T_SHOP_COUNT numeric*2 reset at startup
Temporary T_SHOP_NEW numeric*2 reset at startup
Temporary T_SHOP_ALTERED numeric*2 reset at startup
Temporary T_SHOP_DELETED numeric*2 reset at startup
~~~
~~~
Procedure PreUpdate
Begin
Let T_SHOP_COUNT = 0
Let T_SHOP_NEW = 0
Let T_SHOP_ALTERED = 0
Let T_SHOP_DELETED = 0
For SHOP_SECTION
Begin
Let T_SHOP_COUNT = T_SHOP_COUNT + 1
If NEWRECORD of SHOP_SECTION
Then Let T_SHOP_NEW = T_SHOP_NEW + 1
If ALTEREDRECORD of SHOP_SECTION
Then Let T_SHOP_ALTERED = T_SHOP_ALTERED + 1
If DELETEDRECORD of SHOP_SECTION
Then Let T_SHOP_DELETED = T_SHOP_DELETED + 1
End
If T_SHOP_COUNT = T_SHOP_DELETED
Then all records on the screen have been deleted
End
-----Original Message-----
From: GGrimm@pcc-structurals.com [mailto:GGrimm@pcc-structurals.com]
Sent: 03 October 2000 22:29
Has anyone an idea how to check in the PREUPDATE Procedure for how
many OCCURANCES exist for a file defined as
FILE SHOP_SECTION PRIMARY OCCURS 11 NOITEMS ; etc. etc.?
Where I get messed up is where all the occurences are deleted - in
this special case, I need to perform some special edits before the
UPDATE is allowed. When 1 or more occurences exist, a different
special edit is used before the UPDATE is allowed.
The screen allows FIND, ENTRY, APPEND, DELETE (one, some, or all of
the occurences).
= = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =
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.