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



There is no requirement ever to use UDS on a data area, as just saying *DTAARA is all you need, and the UDS means you are updating it when you don't want to.It's like using Update primary with a file. Frequently, you just want it as input. If you leave off the U, and code the IN's and OUT's, you can lock only when you want to. '


I started at a place where people had put the company name in a data area when the company was sold so it would be soft coded. They used UDS and wound up with locks all over the place that they didn't really understand. I was surprised it had gotten as far along as it had; I had to fix about 30 programs. People often don't find lock problems in testing as they test alone.


________________________________
From: RPG400-L <rpg400-l-bounces@xxxxxxxxxxxx> on behalf of Barbara Morris <bmorris@xxxxxxxxxx>
Sent: Monday, March 12, 2018 7:41 PM
To: rpg400-l@xxxxxxxxxxxx
Subject: Re: DataArea in a no cycle rpg

On 2018-03-12 5:56 PM, dlclark@xxxxxxxxxxxxxxxx
wrote:


The automatic handling I was referring to is the reading of and
writing of the *LDA. Am I not correct that this is done automatically by
a cycle program but is not done for a non-cycle program? Am I not correct
that a non-cycle program would have to use both the DTAARA keyword and the
IN and OUT keywords with the *DTAARA parameter in order to read and write
the *LDA?

To write the *LDA (or any other data area) in a non-cycle program, yes,
it would need the DTAARA keyword.

But the *LDA is automatically read in any type of module. And a non-UDS
data area is automatically locked in any type of module.

I was reading too literally when you said you have use the DTAARA
keyword to explicitly tell RPG that a UDS in a non-cycle module is a
data area. You meant that you have to explicitly tell RPG that you want
to use the data-area opcodes, so you can use OUT to write and unlock the
data area.

--
Barbara

--
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: https://lists.midrange.com/mailman/listinfo/rpg400-l
or email: RPG400-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at https://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 ...

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.