ILE Binding Directories

0 pts.
Tags:
Programming Languages
The company I work for uses ILE binding directories extensively. The problem we have is when we are creating a ILE program (CRTPGM) we do not know if a binding directory exist or not. We have to do quite a bit of searching before we create a program. Is their some command , API etc that will provide the name of the binding director, if one was used the last time the ILE program was created.
ASKED: August 4, 2005  6:33 AM
UPDATED: August 8, 2005  10:24 AM

Answer Wiki

Thanks. We'll let you know when a new response is added.

I’m not aware of any command that tells you the binding directory used, the DSPPGM and DSPSRVPGM only tell you what’s bound to the program.

You could create a utility that determines what modules and service programs are currently bound to an existing program and create a temporary binding directory that could be used automatically.

Alternatively, you could do what I do which is to always have a binding directory with the same name as the program being created. I then have a home grown command which submits the compiles for *PGM and *SRVPGM objects with the appropriate name of the binding directory and entry procedure. It forces you to use standards, but that’s not a bad thing.

All the best

Jonathan

Discuss This Question: 3  Replies

 
There was an error processing your information. Please try again later.
Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy
  • TheQuigs
    The simplest way is to put the CRTPGM information in a comment at the top of the program. Then from this you can re-create the program. I've often seen the entire CRTxxxx command in the comments at the top of the program. Then it's a simple cut-and-paste to enter the command. I believe that years ago an iSeries (System/38 at the time) publication had a utility to retrieve compile command parameters from the source and then string together the compile command. We've modified it extensively over the years and now have a single custom compile command which retrieves the compile parameters and executes the proper CRTxxxx command. Here's an example of the command parameters in the program source: *PARMS DFTACTGRP(*NO) ACTGRP(ORDENT) BNDDIR(OPXUTIL) USRPRF(*OWNER) This information is then appended to the defaults for the CRTxxxx command. We've also set up our command to do some string scanning and replace any defaults that we generally *always* want to use in the CRTxxxx command. If the *PARMS line has an override, our compile command will replace our default parameters with those provided in the *PARMS line.
    0 pointsBadges:
    report
  • WaltZ400
    If you are concerned that the program is always created with the same binding directory, add an H-spec to your source code for the program with the BNDDIR keyword. The format of this is BNDDIR(dir1). If you have more than one binding directory, you can add multiple directory names to the keyword. For example BNDDIR(dir1:dir2). Just separate each directory name with a colon. This way every time you recreate this program, the binding directory information is overlayed by what is in the H-spec. This also works well for setting activation group, date format, etc. The ILE RPG Reference manual expalins all of the available H-spec compile directive keywords.
    655 pointsBadges:
    report
  • Aglauser
    I second the suggestion about using the BNDDIR H-spec. One thing to be aware of when using H-specs: BNDDIR works either with CRTRPGMOD/CRTRPGPGM or CRTBNDRPG, but the H-specs DFTACTGRP and ACTGRP do not work with CRTRPGMOD/CRTRPGPGM. Hope this helps, Adam
    0 pointsBadges:
    report

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to:

To follow this tag...

There was an error processing your information. Please try again later.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Thanks! We'll email you when relevant content is added and updated.

Following