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



Is there more than one BRDAT1 object in different libraries?
Maybe it's a library list issue.
Just throwing that out there.


On Sun, Apr 16, 2017 at 8:14 PM Steinmetz, Paul <PSteinmetz@xxxxxxxxxx>
wrote:

Roger,

Old and no longer used, but here was are coding.
This was an interactive job.

* NEXT ACCOUNT NUMBER
IBRDAT1 DS
I 1 70NACT#

C *IN59 DOUEQ'0'
C *LOCK IN BRDAT1 59
C END *IN59
C ADD 1 NACT#
C OUT BRDAT1

Paul

-----Original Message-----
From: RPG400-L [mailto:rpg400-l-bounces@xxxxxxxxxxxx] On Behalf Of Roger
Harman
Sent: Sunday, April 16, 2017 7:10 PM
To: RPG programming on the IBM i (AS/400 and iSeries)
Subject: RE: DTAARA Lock Issue?

Nope. The *LOCK is definitely there.

-----Original Message-----
From: RPG400-L [mailto:rpg400-l-bounces@xxxxxxxxxxxx] On Behalf Of Mark S
Waterbury
Sent: Sunday, April 16, 2017 1:41 PM
To: rpg400-l@xxxxxxxxxxxx
Subject: Re: DTAARA Lock Issue?

Roger:

Perhaps someone forgot to specify "*LOCK" on the IN statement, so you
could have something like this example:

D DataArea DS DtaAra(NextNumber)
D NextNbr 15P 0 INZ
...
C IN DataArea
C ADD 1 NextNbr
C OUT DataArea
C MOVE NextNbr Result

and thus, no protection from multiple jobs simultaneously accessing and
updating that data area. This will compile and run "just fine" and it might
even seem to "work" okay most of the time, but,when two jobs run this code
at the same time, you could experience exactly the issue you reported.

What is needed is:

C *LOCK IN DataArea
C ADD 1 NextNbr
C OUT DataArea
C MOVE NextNbr Result

Hope that helps...

Mark S. Waterbury
--
This is the RPG programming on the IBM i (AS/400 and 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.

Please contact support@xxxxxxxxxxxx for any subscription related
questions.

Help support midrange.com by shopping at amazon.com with our affiliate
link: http://amzn.to/2dEadiD
--
This is the RPG programming on the IBM i (AS/400 and 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.

Please contact support@xxxxxxxxxxxx for any subscription related
questions.

Help support midrange.com by shopping at amazon.com with our affiliate
link: http://amzn.to/2dEadiD
--
This is the RPG programming on the IBM i (AS/400 and 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.

Please contact support@xxxxxxxxxxxx for any subscription related
questions.

Help support midrange.com by shopping at amazon.com with our affiliate
link: http://amzn.to/2dEadiD


As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:
Replies:

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.