(pardon me if i'm not 100% on the cycle timing in this..
I beleive lda is read into a pgm when pgm is init.
Even though we can move values to fields in UDS throughout pgm, the actual
data area not updated till LR.

So if PGMA moves new values to lda, then (before ending) calls another pgm which will read that lda - you must do an explicit OUT to force the update of the local data area.

must be a named data structure - here name is "LDA"

D LDA UDS
D LDAC# 400 401 0
D LDADV 402 404 0
D LDALC 405 406 0

This defines it - put this at top of calcs or in *inzsr subroutine
C *DTAARA DEFINE *LDA LDA

This updates it. Do this before calling other pgms needing new lda values.
C OUT *DTAARA UPDATE LDA

*or*

pass parms.... kill the lda.

Jim Franz




----- Original Message ----- From: "James Lampert" <jamesl@xxxxxxxxxxxxxxxxx>
To: <rpg400-l@xxxxxxxxxxxx>
Sent: Tuesday, August 26, 2008 2:31 PM
Subject: Stuck on accessing the LDA -- manuals no help so far


Can somebody point me in the direction of an example of two ILE RPG
programs, neither of which calls the other, communicating with each
other via the Local Data Area?

Preferably without doing an IN on all *DTAARAs known to the program?

When I RTFM on this one, all it does is make me go cross-eyed.

--
James H. H. Lampert
Touchtone Corporation

--
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 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-2019 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].