× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



Peter:

Consider using a user space rather than a data area.

In your programs, grab the pointer to the *usrspc at initialization time. Use 
this as a basing pointer for a data structure or element that defines your 
counter.

When you want to get the next number and increment, use perhaps the _LOCK 
builtin to set a lock, do the get/increment, then use _UNLOCK so the next 
process will work. Be aware that the lock won't necessarily prevent another 
process from updating the value, but it can prevent another process from 
obtaining a lock at the same time.

Perhaps put all this into a service program procedure. Ought to be fast enough 
for you.

Tom Liotta

rpg400-l-request@xxxxxxxxxxxx wrote:

>   9. RE: data area question - performance (Peter Connell)
>
>We still use data areas to increment unique numbers (I know that V5R2 identity 
>columns a now worth a serious look).
>However, when the iSeries is under heavy load (90% up) because of poor 
>performance in certain applications, it appears that we get problems with 
>completely separate jobs because they cannot get a lock on a data area. Since 
>the data areas are often not related to each other from an application 
>perspective this may be just a consequence of too much CPU load where there is 
>some low level code that cannot grab an release a data area fast enough.
>
>I have always been under the impression that data areas are objects designed 
>to be so simple that they lend themselves readily to processes that require 
>the rapid update of a value such as a counter by multple processes. It has 
>been suggested to me that using a file would eliminate such a locking issue 
>but am very suspect of the overhead (for system data management processes) and 
>struggle to believe that anything can be faster than a data area especially if 
>the input/output statements are consecutive lines of code.

-- 
Tom Liotta
The PowerTech Group, Inc.
19426 68th Avenue South
Kent, WA 98032
Phone  253-872-7788 x313
Fax    253-872-7904
http://www.powertechgroup.com


__________________________________________________________________
McAfee VirusScan Online from the Netscape Network.
Comprehensive protection for your entire computer. Get your free trial today!
http://channels.netscape.com/ns/computing/mcafee/index.jsp?promo=393397

Get AOL Instant Messenger 5.1 free of charge.  Download Now!
http://aim.aol.com/aimnew/Aim/register.adp?promo=380455

As an Amazon Associate we earn from qualifying purchases.

This thread ...


Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.