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



And this was the least of my FUBARs for today!

Jerry C. Adams
IBM i Programmer/Analyst
--
A&K Wholesale
Murfreesboro, TN
615-867-5070


-----Original Message-----
From: rpg400-l-bounces@xxxxxxxxxxxx [mailto:rpg400-l-bounces@xxxxxxxxxxxx]
On Behalf Of Jerry C. Adams
Sent: Monday, February 28, 2011 3:47 PM
To: 'RPG programming on the IBM i / System i'
Subject: RE: LDA Not Getting Retrieved

True. Which is what I was trying to say in my second paragraph. I just
FUBARed it.

Jerry C. Adams
IBM i Programmer/Analyst
There are only so many ulcers in the world, and I make certain that other
people get them. -George Steinbrenner
--
A&K Wholesale
Murfreesboro, TN
615-867-5070

-----Original Message-----
From: rpg400-l-bounces@xxxxxxxxxxxx [mailto:rpg400-l-bounces@xxxxxxxxxxxx]
On Behalf Of Jeff Young
Sent: Monday, February 28, 2011 1:57 PM
To: RPG programming on the IBM i / System i
Subject: Re: LDA Not Getting Retrieved

Jerry,
If you are going to use the LDA and not define as UDS, you need to lock the
data
area on you IN command in order to update it on the OUT.
ie;
*LOCK  IN LDA
OUT   LDA

 
Jeff Young
Sr. Programmer Analyst
IBM -e(logo) server Certified Systems Exper - iSeries Technical Solutions
V5R2 
IBM  Certified Specialist- e(logo) server i5Series Technical Solutions
Designer V5R3
IBM  Certified Specialist- e(logo)server i5Series Technical
Solutions Implementer V5R3

  
 






________________________________
From: Jerry C. Adams <midrange@xxxxxxxx>
To: RPG programming on the IBM i / System i <rpg400-l@xxxxxxxxxxxx>
Sent: Mon, February 28, 2011 1:49:07 PM
Subject: RE: LDA Not Getting Retrieved

Yeah, I guess I should change my ways and use parms more (if only so I can
quite imagining Barbara going "Tsk, tsk" somewhere).

Further testing, as well as a deeper reading of the RPG ILE Reference
manual, exposed the fact that Terry, who suggested using UDS on the D-spec,
was correct.  With just a DS and DtaAra(*LDA), one needs the IN and OUT
op-codes to handle the data area.

Jerry C. Adams
IBM i Programmer/Analyst
Well, there was the Battle of the Bulge. -Warren Spahn when asked if he had
ever felt more pressure than pitching in the World Series
--
A&K Wholesale
Murfreesboro, TN
615-867-5070      


-----Original Message-----
From: rpg400-l-bounces@xxxxxxxxxxxx [mailto:rpg400-l-bounces@xxxxxxxxxxxx]
On Behalf Of Jeff Young
Sent: Monday, February 28, 2011 10:13 AM
To: RPG programming on the IBM i / System i
Subject: Re: LDA Not Getting Retrieved

Just a suggestion, but why not pass the value of  L$CNCL as a parm from your
CL
to the RPG.
When you set the value in your RPG program, it will be returned to the CL
and
you can test it the same way.
This removes the need for the LDA in both programs.                
 
Jeff Young
Sr. Programmer Analyst
IBM -e(logo) server Certified Systems Exper - iSeries Technical Solutions
V5R2 
IBM  Certified Specialist- e(logo) server i5Series Technical Solutions
Designer V5R3
IBM  Certified Specialist- e(logo)server i5Series Technical
Solutions Implementer V5R3

  
 






________________________________
From: Robert Rogerson <rogersonra@xxxxxxxxx>
To: RPG programming on the IBM i / System i <rpg400-l@xxxxxxxxxxxx>
Sent: Mon, February 28, 2011 10:50:58 AM
Subject: Re: LDA Not Getting Retrieved

Hi Jerry,

Perhaps, just an oversight, but are you sure you do an OUT *LDA after
setting L$CNCL and prior to calling IVS002?

Robert Rogerson

On Mon, Feb 28, 2011 at 10:26 AM, Jerry C. Adams <midrange@xxxxxxxx> wrote:

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            



--
This is the RPG programming on the IBM i / System i (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.



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.