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



Yes, there are both batch and online programs that need the info in the DTAARA.

Joe Giusto <jgiusto@xxxxxxxxxxxxxx> wrote:I am a little behind in reading 
emails, but had to ask:
Why does it matter that you are locking up your local data area? are there
other programs in the stack trying to read it? 


-----Original Message-----
From: Booth Martin [mailto:Booth@xxxxxxxxxxxx] 
Sent: Wednesday, July 02, 2003 7:19 AM
To: rpg400-l@xxxxxxxxxxxx
Subject: Re: Can you use UDS but NOT lock the data area?

Scott, it should work to use the UDS so long as you also use the keyword
DTAARA(*LDA). The line below is copied straight from the manual.


D LDA_DS UDS DTAARA(*LDA) 

Then you can lock and unlock the data area at will.

---------------------------------------------------------
Booth Martin http://www.MartinVT.com
Booth@xxxxxxxxxxxx
---------------------------------------------------------

-------Original Message-------

From: RPG programming on the AS400 / iSeries
Date: Wednesday, July 02, 2003 12:06:26 AM
To: RPG programming on the AS400 / iSeries
Subject: Re: Can you use UDS but NOT lock the data area?


On Tue, 1 Jul 2003, Michael Gottlieb wrote:
>
> It seems when I use "UDS" to define a data area to my program, the data
> area is locked for the duration of the program. Is there a way to
> prevent this? I still want to use UDS but not lock the data area.
>

When you define a data area using UDS, the RPG program will read it
automatically when the program starts, lock it, and update/unlock it
only when the program ends. That's what UDS is for.

If you want to read a data area without doing that, use the IN & OUT
RPG op-codes instead of UDS.

Here's an example of that:

D LDA DS DTAARA(*LDA)
D RptDate 1 8A
D RptType 105 106A

D MyDtaAra DS 200 DTAARA('QGPL/MYDTAARA')
D LastRun 1 8A
D LastRptType 105 106A

** Load the LDA. This does not lock it.
c in LDA
c dsply RptDate
c dsply RptType

** Load My Data Area. This does not lock it.
c in MyDtaAra
c dsply LastRun
c dsply LastRptType

** Load My Data Area again, this time lock it and update it.
c *lock in MyDtaAra
c eval LastRun = RptDate
c eval LastRptType = RptType
c out MyDtaAra

c eval *inlr = *on
_______________________________________________


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



Michael Gottlieb  
gottlm@xxxxxxxxxxxxx
gottlm@xxxxxxxxx
 
Out of every 10 people, one understands binary, the other doesn't.
 



---------------------------------
Do you Yahoo!?
SBC Yahoo! DSL - Now only $29.95 per month!

As an Amazon Associate we earn from qualifying purchases.

This thread ...

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.