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



Why not just use a parm vs. *LDA? Not sure because I don't use the LDA so
this might not even be a possibly...but is the RPG running in a different
AG? And are you doing an OUT *LDA prior to returning to the CLP?

Thanks,
Tommy Holden



From: "Jerry C. Adams" <midrange@xxxxxxxx>
To: "RPG400-L" <rpg400-L@xxxxxxxxxxxx>
Date: 02/28/2011 09:28 AM
Subject: LDA Not Getting Retrieved
Sent by: rpg400-l-bounces@xxxxxxxxxxxx



I am trying to use a byte in the LDA to tell a CL program (type CLP; i.e.,
OPM) that the RPG IV program, which the CL called, told it to abort the
rest
of the CL. Inside of the RPG IV program the LDA is defined via a /copy
statement as:



D DS DtaAra(*LDA)

D L$CNCL 482 482a



The relevant parts of the CL program are:



CALL PGM(IVS002)



RTVDTAARA DTAARA(*LDA (482 1)) RTNVAR(&CANCEL)

IF COND(&CANCEL *EQ 'Y') THEN(DO)

SNDPGMMSG MSGID(GEN9999) MSGF(ANKLIB/ANKMSGS)

TOPGMQ(*EXT) MSGTYPE(*STATUS)

DLYJOB DLY(3)

RETURN

ENDDO



I have debugged IVS002 and verified that, when F3 is pressed, the function
key is recognized and that L$CNCL does, indeed, equal Y. I have, also,
debugged the CL program and verified that after the RTVDTAARA command that
&CANCEL equals *Blanks.



I have done this numerous times in the past without a problem. The only
difference, that I can put my finger on right now, is that previously I
was
at V5R3 and R4. This program is at V5R1.



The purpose for using the LDA is to be able to allow the CL to ascertain
that the user wanted to abort the rest of the CL (in this case a simple
select [IVS002] and, if F3 is not pressed, a report [IVR002]). A named
data
area will not do, because the report could be invoked simultaneously by
more
than one [1] user; at least I don't think so.



If anyone has a better method for making the determination that F3 was
pressed in IVS002 before proceeding to IVR002, I'd certainly be willing to
hear about it. In the meantime, is there some reason that the CL cannot
retrieve the value of L$CNCL as set by IVS002? I did check the RPG
Reference manual, and it did not yield anything. I compared the steps and
code that I used to a similar process that I know worked in V5R4; no
differences.



Jerry C. Adams

IBM i Programmer/Analyst

When two men agree on everything, one is unnecessary. -Sign in Philip
Wrigley's office

--

A&K Wholesale

Murfreesboro, TN

615-867-5070




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.