Hi Eric,

We get around this by using an optimistic locking strategy if and only
if there must be user input between the original record read and final
record write. Depending on the usage of your system, this might prove to
be a better solution?

Regards,
Dan

-----Original Message-----
From: [email protected]
[mailto:[email protected]] On Behalf Of Eric
Rosenzweig
Sent: Wednesday, 27 October 2010 5:58 AM
To: U2 Users List
Subject: [U2] INPUTIF statement in Universe

We are on an IBM AIX 5.3 box with 32 CPU and 32GB of memory running
Universe 10.2.4  As we've increased our user count I'm noticing several
applications that use the INPUTIF statement coming to the top of CPU
usage.  We have users that go into a product record, lock it, and then
leave their desk or go onto something else leaving the lock and
therefore keeping other people out of updating that record.  We use the
INPUTIF with a timer loop to gracefully exit the program and release the
record if there hasn't been activity in 10 minutes.

In testing, it's the INPUTIF statement that's utilizing the CPU, not the
timer calculation.

Is there a better, less CPU intensive way to do this? 

Thanks in advance.

Here's the code we currently employ:

OK = 0 ; START.DT = DATE() ; START.TM = TIME(); TIME.OUT = 900  LOOP
    INPUTIF PSN THEN OK = @TRUE ELSE
       OK = ((DATE()-START.DT)*86400)+TIME()-START.TM > TIME.OUT

       IF OK THEN
          IF EDIT.FLG THEN PSN = '' ELSE PSN = 'Q'
       END
    END
 UNTIL OK DO
 REPEAT

Eric Rosenzweig
[email protected]
_______________________________________________
U2-Users mailing list
[email protected]
http://listserver.u2ug.org/mailman/listinfo/u2-users

______________________________________________________________________
This email has been scanned by the MessageLabs Email Security System.
For more information please visit http://www.messagelabs.com/email
______________________________________________________________________
###########################################################################################
The information transmitted in this message and attachments (if any) is 
intended only
for the person or entity to which it is addressed. The message may contain 
confidential
and/or privileged material.  Any review, retransmission, dissemination or other 
use of
or taking of any action in reliance upon this information by persons or 
entities other
than the intended recipient is prohibited.  If you received this in error, 
please
contact the sender and delete the material from any computer.

The intended recipient of this e-mail may only use, reproduce, disclose or 
distribute
the information contained in this e-mail and any attached files with the 
permission of IMB.
###########################################################################################
_______________________________________________
U2-Users mailing list
[email protected]
http://listserver.u2ug.org/mailman/listinfo/u2-users

Reply via email to