|
I am trying to use a byte in the LDA to tell a CL program (type CLP; i.e.,was
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
at V5R3 and R4. This program is at V5R1.list
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
--
This is the RPG programming on the IBM i / System i (RPG400-L) mailing
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.
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.