|
ahhhhh!!! thanks Scott. Good point! I learned another new thing today. :) --------------------------------------------------------- Booth Martin http://www.MartinVT.com Booth@xxxxxxxxxxxx --------------------------------------------------------- -------Original Message------- From: RPG programming on the AS400 / iSeries Date: Wednesday, July 02, 2003 11:03:26 AM To: RPG programming on the AS400 / iSeries Subject: Re: Can you use UDS but NOT lock the data area? On Wed, 2 Jul 2003, Booth Martin wrote: > > 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. > Booth, I thought the original poster wanted to read the data area without locking it?! If you code UDS, the compiler will automagically lock the data area when the program starts. If you also code DTAARA, then you can unlock it if you wish -- but that's not the same thing as never locking it. A common mistake that I've seen people make time & time again, is thinking that in order to read a data area, you must code UDS. So, they code it with UDS, then do an IN (which is unnecessary, since the data has already been read) then don't understand why it's locked... If a different job has a lock on the data area, and then their program is started up, it sits and waits for the lock... which is often not what was intended. Therefore, I always tell people not to mix & match the DTAARA keyword and UDS. Use one or the other, your code is clear and your programs work as expected.
As an Amazon Associate we earn from qualifying purchases.
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.