On 2018-10-21 5:35 AM, Stuart Rowe wrote:
THe OP program specified UDS -- that's an auto IN data structure. Yes the
OP was doing an IN, but for no reason.

Oops, you're right. (I thought I had checked for UDS, but I guess not.)

So Brian's code is correct; add DTAARA(*AUTO) to the DS definition.

And now I see why the UNLOCK might make sense. The data area gets locked during module initialization because of the 'U' in UDS. The UNLOCK unlocks it and then the IN reads it again, maybe in case some other job was waiting to get the lock so it could update it.

I was thinking that the same thing could be accomplished with just an ordinary DTAARA keyword without *AUTO, plus an IN operation at the beginning of calculations.

But it's possible that Shane's code also needs the additional feature of UDS, where it will create the data area in QTEMP if it doesn't find it in the library list.

This thread ...


Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2020 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].