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



You can put the service programs in a binding directory.

***Important*** What you don't want is the modules that make up SP1 in the same binding directory as
SP1. When you create SP2, SP2 may be bound to the modules instead of the service program, depends on
which one the linker finds first.

I've seen many recommendations to have one or more binding directories containing your *SRVPGMs; used
when creating *PGM or other *SRVPGM objects the make use of your service program procedures. Then
have a unique binding directory for each service program that contains the modules that make it up.

So, given M1A, M1B, M1C, M2A, M2B, M2C.

And you want to create two *SRVPGMs, SP1 and SP2...

BNDDIR SP1
M1A, M1B, M1C

BNDDIR SP2
M2A, M2B, M2C

BNDDIR MYSRVPGMS
SRVPRGREF, SP1 (SP2 will be added after it's created)

CRTSRVPGM SP1 BNDDIR(SP1 MYSRVPGMS)
CRTSRVPGM SP2 BNDDIR(SP2 MYSRVPGMS)

Don't forget that instead of using the compile time option you can use the H-SPEC BNDDIR option.

Since we have a change management system, the way I do things is to skip having a unique BNDDIR for
the SRVPGM. Instead, I explicitly specify the modules to be bound into the service program via the
CMS. Also, I just use the H-Spec to include the MYSRVPGMS binding directory.


HTH,

Charles Wilt
--
Software Engineer
CINTAS Corporation - IT 92B
513.701.1307

wiltc@xxxxxxxxxx


-----Original Message-----
From: rpg400-l-bounces@xxxxxxxxxxxx [mailto:rpg400-l-bounces@xxxxxxxxxxxx]
On Behalf Of David FOXWELL
Sent: Friday, May 23, 2008 10:16 AM
To: RPG programming on the AS400 / iSeries
Subject: Help with my first SRVPGM

I've just created my first SRVPGM. As I had to create a new file, I wrote
a module to manage all the operations on that file and created a SRVPGM
SP1 on that module.
Like this CRTSRVPGM P1 BNDSRVPGM(SRVPGMREF) where SRVPGMREF has error
handling functions.

Now, I have another module M2 that uses this SP1.
A programe P1 has to call functions in M2.

I wanted to create SP2, a SRVPGM with M2. How should I be doing this ?
At the moment I did CRTSRVPGM P2 BNDSRVPGM(SRVPGMREF CLTFSC)

That way I add to the list of service programs each time. I don't know how
to automate this process.

As up till now we never used service programs, all the modules just got
thrown in to huge BNDDIRs and then the same compile command could be used
for all the programs :

CRTPGM PGM(&IOBJLIB/&IPGM) MODULE(&IOBJLIB/&IPGM) +

ENTMOD(*PGM) BNDDIR(&IOBJLIB/&IPGM) +

ACTGRP(&WACTGRP)


--
This is the RPG programming on the AS400 / iSeries (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 e-mail transmission contains information that is intended to be confidential and privileged. If you receive this e-mail and you are not a named addressee you are hereby notified that you are not authorized to read, print, retain, copy or disseminate this communication without the consent of the sender and that doing so is prohibited and may be unlawful. Please reply to the message immediately by informing the sender that the message was misdirected. After replying, please delete and otherwise erase it and any attachments from your computer system. Your assistance in correcting this error is appreciated.

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.