MIDRANGE dot COM Mailing List Archive



Home » MIDRANGE-L » November 2012

Re: Service Program or Stand Alone Program



fixed

Thanks Charles.
I did know that the prototype was required, and had designed my app in that
way.
Since I am using /Free, I always use prototypes when calling other
programs/procedures.


On Wed, Nov 28, 2012 at 4:05 PM, Charles Wilt <charles.wilt@xxxxxxxxx>wrote:

First of all, a correction...

*PGM or *SRVPGM doesn't matter, you need (should have) a prototype.

1) Repeated calls to a procedure in a service program are faster
2) You can always easily create a *PGM wrapper for an existing *SRVPGM
procedure if you ever need it.

What you're really asking is does it make sense to have a one procedure
service program? I say yes, if you absolutly can't group it with anything
else. :) And you can always add additional related procs in later.

Charles


On Wed, Nov 28, 2012 at 3:52 PM, Jeff Young <jyoung0950@xxxxxxxxx> wrote:

Rob,
I have created service programs in the past, but most of them have
multiple
procedures or return data via the Prototype.

In this case, I am passing a list of parms, some will be used only as
input, and others only as output.

I just wanted to get an idea as to the advantages/disadvantages of each
method.
It is very unlikely (but not impossible :) ) that this program will be
called via SQL or a WEB program.

Thanks,

On Wed, Nov 28, 2012 at 3:20 PM, <rob@xxxxxxxxx> wrote:

Traditionally I may store more than one exported subprocedure in a
single
service program. The subprocedures may not be related.

If you've never done a service program before it's a good time to get
the
experience.

If you think it would ever be cool to call the SP via sql by making it
a
stored procedure or a UDF then making it a SP is probably a good idea.
Any
questions as to what a stored procedure or a UDF are?


Rob Berendt
--
IBM Certified System Administrator - IBM i 6.1
Group Dekko
Dept 1600
Mail to: 2505 Dekko Drive
Garrett, IN 46738
Ship to: Dock 108
6928N 400E
Kendallville, IN 46755
http://www.dekko.com





From: Jeff Young <jyoung0950@xxxxxxxxx>
To: Midrange Systems Technical Discussion <midrange-l@xxxxxxxxxxxx
,
Date: 11/28/2012 03:08 PM
Subject: Service Program or Stand Alone Program
Sent by: midrange-l-bounces@xxxxxxxxxxxx



All,
I have a new program that I am creating.
This program will be called multiple times from at least 2 different
programs.
The program will accept a number of input parms and return data via
other
parms. It will not return any data via the PR.

What are the advantages/disadvantages of making it a Service Program
or a
Stand Alone Program?

Thanks,

--
Jeff Young
Sr. Programmer Analyst
--
This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing
list
To post a message email: MIDRANGE-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/midrange-l
or email: MIDRANGE-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/midrange-l.


--
This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing
list
To post a message email: MIDRANGE-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/midrange-l
or email: MIDRANGE-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/midrange-l.




--
Jeff Young
Sr. Programmer Analyst
--
This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing
list
To post a message email: MIDRANGE-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/midrange-l
or email: MIDRANGE-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/midrange-l.


--
This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing list
To post a message email: MIDRANGE-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/midrange-l
or email: MIDRANGE-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/midrange-l.









Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2014 by MIDRANGE dot 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 here. If you have questions about this, please contact