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



THarteau@xxxxxxxxxxxxxxxxxx wrote:

I created modules.
I created a binding directory.
I bound them together into a service program. CRTSRVPGM SRVPGM(V64BPCSUSR/SRVINV) MODULE(V64BPCSUSR/SRVINV) BNDDIR(V64BPCSUSR/SRVINV) I have a binder language source
I have this as the header in my ILE program:
H BNDDIR('SRVINV') H Option(*srcstmt : *nodebugio) /If Defined(*CRTBNDRPG) H DftActGrp(*NO) ActGrp('qiqe') /EndIf I compile using option 14(Compile)

What is the correct sequence to create all this stuff? The above is my best guess.
If I want to add another module to SRVINV, do I create the new module, add it to the binding directory, recreate the service program, add to the top of the binder language, then use it in the program?


Terri, there are two purposes for using binding directories. Any given binding directory should ideally only be used for one of these two purposes.

1. To list the service programs that are used by programs or service programs. This is the most common way that binding directories are used.
2. To list the modules necessary to create one program or program. This is a less common way to use binding directories; it's ok to do this, but if the binding directory is misused, it can lead to problems.

For your service program SRVINV, you only really need a binding directory that simply lists SRVINV *SRVPGM. You specify this binding directory on your H spec BNDDIR for programs that want to _use_ this service program.

If you want, you could also have a different binding directory that lists the _modules_ necessary to create SRVINV. You would not code that binding directory on any H spec. You would use it in your CRTSRVPGM command. But you could just list the modules directly in the MODULE parameter of your CRTSRVPGM command, especially if you have a CL program that builds it. This is the binding directory you would add your new modules to.

_A rule of thumb_: Any binding directory containing modules should be used to create only one object.

If you use a binding directory containing modules to create more than one object, you will have the situation where you have a module that is part of more than one object. That is considered to be A Bad Thing; it makes it hard to change the module because you have to rebind all the programs it was bound to.

Here's how I think your process should have looked.

1. I created modules.
2. I created a binding directory.
moved 3. I created a binder language source.
4. I bound them together into a service program.
change1 CRTSRVPGM SRVPGM(V64BPCSUSR/SRVINV) MODULE(V64BPCSUSR/SRVINV)
SRCFILE(BNDSRCFILE) SRCMBR(SRVINV)
added 5. I added the service program to the binding directory
6. I have this as the header in my ILE program:
H BNDDIR('SRVINV')
H Option(*srcstmt : *nodebugio)
/If Defined(*CRTBNDRPG)
change2 H DftActGrp(*NO) ActGrp('QIQE')
/EndIf
7. I compile using option 14(Compile)

_change1_: The CRTSRVPGM command is changed to not have the BNDDIR keyword, and to have the SRCFILE and SRCMBR keywords (to pick up the binder language source).

_change2_: The ActGrp keyword is changed to use upper case for the activation group (for historical reasons, the compiler allows 'qiqe', but it is not a good idea to use lower case for the activation group name).


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.