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



Enough people have mentioned the good things about sub procedures that I
don't have to point out that most of the good far out ways the bad.

However, I felt the need to point out that one of the bigger differences
between subroutines and sub-procedures is error handling.

A sub-procedure can contain its own PSSR subroutine. That is good
because then the sub-procedure can attempt to handle its own errors.

The bad part: if an error occurs in a subroutine, that error is passed
to the program. There are a few levels here, but the main point is that
a RPG program gets the error, then if that error is canceled then the CL
generally has an option for retry. (Assuming you don't monitor for the
errors inside the CL program.)

With sub-procedures the error is returned differently. It still
progresses back up the stack, however you may receive more than one
error on the way back to the calling CL. Also, the error returned by a
sub-procedure may be different than the error it received itself.

This has the effect of making some error recovery harder for that same
program, when using sub-procedures instead of subroutines. This type of
occurrence could generate a lot of "I told you so" comments from your
main opponents.

Also, I've found that if you do not handle an error of this kind from
within the PSSR of a Service program, then sometimes the activation
group the Service program is running in can become unusable. I've seen
instances (on V5R4) where later calls the Service program return the
error "Tried to refer to one or more objects that no longer exist".

I'm pointing this out so you have less surprises later. If you add the
needed error checking into important sub-procedures, and into all
exported service program sub-procedures, then you shouldn't have any
issues.

Chris Hiebert
Programmer/Analyst
Disclaimer: Any views or opinions presented are solely those of the
author and do not necessarily represent those of the company.
-----Original Message-----
From: rpg400-l-bounces@xxxxxxxxxxxx
[mailto:rpg400-l-bounces@xxxxxxxxxxxx] On Behalf Of RPGLIST
Sent: Friday, December 27, 2013 9:00 AM
To: rpg400-l@xxxxxxxxxxxx
Subject: Need some ammunition (Procedures vs. Sub-routines)

I won't go into the entire lengthy and boring conversation I just had
with upper management, but I was basically told that under no
circumstances am
I to add procedures to certain applications. The justification is that
by doing so, we will be required to re-test the entire system, payroll,
dispatch, load balancing, AP, AR, etc.

I however was provided an opportunity to make my case, and I have a list
of reasons, but I need every bit of ammunition I can come up, so any
help from ya'll would be cool.

Dutch

As an Amazon Associate we earn from qualifying purchases.

This thread ...


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.