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



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
_______________________________________________
 


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.