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



From everything I've gathered from the thread, no, you can't use Monitor. She's checking for a status code, not an error code.

-----Original Message-----
From: rpg400-l-bounces@xxxxxxxxxxxx [mailto:rpg400-l-bounces@xxxxxxxxxxxx] On Behalf Of Jerry Adams
Sent: Wednesday, April 15, 2009 3:42 PM
To: RPG programming on the IBM i / System i
Subject: RE: How to Handle LR Indicator Return Situation In Free-Format CALLP

Plus the CALLP means "Call with Prototype". Since this is a separate program, not a subprocedure, my guess (boy will I get in trouble for that!) is that it'll return the same status code(s) as a CALL with Parms.

Also, the MONITOR can be used for this. Depends upon your preference, I suppose. I often use the PSDS, but for this kind of thing I prefer MONITOR.

Thanks.

Jerry C. Adams
IBM System i Programmer/Analyst
--
B&W Wholesale
office: 615-995-7024
email: jerry@xxxxxxxxxxxxxxx


-----Original Message-----
From: rpg400-l-bounces@xxxxxxxxxxxx [mailto:rpg400-l-bounces@xxxxxxxxxxxx] On Behalf Of Jeff Young
Sent: Wednesday, April 15, 2009 3:28 PM
To: RPG programming on the IBM i / System i
Subject: Re: How to Handle LR Indicator Return Situation In Free-Format CALLP

Sharon,
Those status codes are for Error conditions.
The status code of  '00001' is not an error condition and will be returned regardless of the (E) extender.

 
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: Sharon Cannon <scannon@xxxxxxxxxxx>
To: RPG programming on the IBM i / System i <rpg400-l@xxxxxxxxxxxx>
Sent: Wednesday, April 15, 2009 3:53:44 PM
Subject: RE: How to Handle LR Indicator Return Situation In Free-Format CALLP

Charles,

Yes, I did.  From what I had read in the FAQ at the RPG World web site, it didn't look like that wouldn't work with CALLP like it does with CALL.  I guess I just need to come up with a test to see if it will. 

The only status codes the ILE RPG manual mentions that you can check for with CALLP using the E extender are 00202, 00211, and 00231.  That's what led me to believe that you can't check for 00001.

Thank you.


-----Original Message-----
From: rpg400-l-bounces@xxxxxxxxxxxx [mailto:rpg400-l-bounces@xxxxxxxxxxxx] On Behalf Of Charles Wilt
Sent: Wednesday, April 15, 2009 3:35 PM
To: RPG programming on the IBM i / System i
Subject: Re: How to Handle LR Indicator Return Situation In Free-Format CALLP

Sharon,

Did you did see Michael Ryan's post about %status returning '00001' if
the called program returned with LR = *ON?

Charles

On Wed, Apr 15, 2009 at 3:17 PM, Sharon Cannon <scannon@xxxxxxxxxxx> wrote:
Scott,

A valid question.  It looks like this program that I'm trying to convert
calls the other program (which is a MAPICS user exit program, by the
way) multiple times, and the other program usually returns without
setting on LR.  So it looks like, the last time it calls it, it checks
to make sure that the user exit program set on the LR indicator before
this calling program sets on LR and ends.

I agree, I could probably accomplish the same thing another way,
especially since the reason I'm converting this program to free-format
is that I want to make some major modifications to it.  The existing
code is EXTREMELY hard to follow, so I'm trying to make it more readable
before I start changing the existing logic.

Mainly it just irks me that IBM didn't provide a simple way to convert
the existing logic directly to free-format -- that I would HAVE to find
a work-around.

No big deal -- if I have to, I have to.  It's just an irritation.  I
hate resulting indicators (and numbered indicators in general).  This is
old, old RPG code -- I suspect that it was originally written in RPG II
because it also has a ton of GOTO and TAG combinations that I've been
trying to rewrite in structured code.

I appreciate all the suggestions from everyone (though I don't want to
have to modify the parameters in the MAPICS user exit program because
it's called from about a jillion other programs).

-----Original Message-----
From: rpg400-l-bounces@xxxxxxxxxxxx
[mailto:rpg400-l-bounces@xxxxxxxxxxxx] On Behalf Of Scott Klement
Sent: Wednesday, April 15, 2009 2:38 PM
To: RPG programming on the IBM i / System i
Subject: Re: How to Handle LR Indicator Return Situation In Free-Format
CALLP

Hi Sharon,

Can I ask a silly question?   Why does it matter whether LR is on in the

called program?  What will you do differently?

Perhaps you need to make it more abstract.  Instead of relying on LR,
you could pass a parameter that signals, err... whatever it is that
you're trying to signal :)

In other words, you should try to focus on what your programs are trying

to say to each other, instead of focusing on whether they ended with
some arbitrary indicator turned on.  Just my opinion.




Sharon Cannon wrote:
I'm trying to convert a fixed-format RPG program to ILE free-format.
Unfortunately, it has a CALL with an indicator in positions 75 and 76
to
check if the program returned with the LR indicator on.  I want to
convert that CALL to a free-format CALLP, but I'm not sure how to
handle
that LR indicator situation.



Is there some way to use the program status data structure and check
for
a status of 00001?



It just irks me no end to have to leave that one section of the
program
in fixed format with a /end-free and a /free.  Thanks in advance for
any
help you can give.




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

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

Follow-Ups:
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.