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



Barbara,
Regarding the performance of using data areas.

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.

Peter

-----Original Message-----
From: Barbara Morris [mailto:bmorris@xxxxxxxxxx]
Sent: Thursday, May 29, 2003 11:31 AM
To: rpg400-l@xxxxxxxxxxxx
Subject: Re: data area question


"Shrader, Patrick" wrote:
> ...
> Code (V4R5):
> D period         uds                  dtaara(PROCYR)
> D  cmonth                        6s 0
> ...
> Data area definition:
>                                Display Data Area
>                                                              System:
>  Data area . . . . . . . :   PROCYR
>    Library . . . . . . . :     FILLIB
>  Type  . . . . . . . . . :   *DEC
>  Length  . . . . . . . . :   6 0
>  Text  . . . . . . . . . :   Processing Year and Month
>  Value . . . . . . . . . :   200312
> 

Patrick, by putting the DTAARA keyword on the DS line, you've defined it
as a character type.  Put the dtaara keyword on the numeric variable
itself.  You can't code the U since it's not a DS, so you'll have to
read and write it yourself using IN and OUT.

D  cmonth          s             6s 0 dtaara(PROCYR)

 * If you just want to read the value:
c                  IN     cmonth

 * If you also want to change the value:
c     *LOCK        IN     cmonth
   ....
c                  OUT    cmonth

_______________________________________________
This is the RPG programming on the AS400 / iSeries (RPG400-L) mailing list
To post a message email: RPG400-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/rpg400-l
or email: RPG400-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/rpg400-l.

This correspondence is for the named person's use only.  It may contain 
confidential or legally privileged information, or both. No confidentiality or 
privilege is waived or lost by any mistransmission. If you receive this 
correspondence in error, please immediately delete it from your system and 
notify the sender. You must not disclose, copy or rely on any part of this 
correspondence if you are not the intended recipient. Any views expressed in 
this message are those of the individual sender, except where the sender 
expressly, and with authority, states them to be the views of Baycorp 
Advantage.If you need assistance, please contact Baycorp Advantage on either :- 
        Australia 133124 or New Zealand +64 9 356 5800


As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:

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.