QUICK PreUpdate Procedure

Ray Bailey Ray.Bailey@lightsout.co.uk
Wed, 4 Oct 2000 12:13:52 +0100


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



Hope this helps you out.




-----Original Message-----
From: GGrimm@pcc-structurals.com [mailto:GGrimm@pcc-structurals.com]
Sent: 03 October 2000 22:29
To: powerh-l@sphere.swau.edu
Subject: QUICK PreUpdate Procedure


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