Ron Turull answers your ILE questions

  1. Is there anyway to trace only those programs that run in a specific activation group?
      To the best of my knowledge, this, unfortunately, cannot be done. However, you can specify which specific ILE programs you want to trace using the TRCJOB command.
  2. Say you have a number of programs that make up a single application and they all run in the same activation group, what would be the ramifications if one of the programs has its activation group attribute changed, accidentally or otherwise?
      The repercussions of this depend on the interaction and dependence between the program that was changed and the other programs that use the original activation group. For example, if the programs share an ODP (open data path) and that ODP is scoped to the activation group level, then the app won't function properly - the changed program will not be able to share the ODP. If the programs are not sharing any resources, or if the resources are all scoped to the job level, then the repercussions are probably limited to a very slight loss of performance.
  3. Is there any way, given a specific activation group name, to determine which programs will run in that activation group?
      The only way to tell what activation group a program uses is to use the DSPPGM command. But this is only half the battle. Remember, a program can have an activation group attribute of *CALLER. When this is the case, you won't be able to determine which activation group it will run in until run-time - it will run in whatever activation group the program that calls it is running in.
      For those programs that use *CALLER, I suppose you could cross-reference them to an outfile produced by the DSPPGMREF command. But even this won't produce 100-percent accurate results if, for example, you use C or you activate a program dynamically. Also, there is no equivalent to the DSPPGMREF command for service programs, so you won't be able to account for any service programs that call the programs.
  4. Can you determine which programs use (i.e., import) data items exported from a specific service program?
      Not directly, but you could build a utility using system APIs to cross reference service program exports to the programs that import them.
  5. When you make a change to procedure in a service program and you use the binder language to maintain compatibility between the new service program and any programs already using (bound to) the service program, can you still use the old version of the procedure?
      There is no "old version" of the procedure. Service programs can have many signatures but only one copy of the procedures. This is a common misconception about the binder language. If you want to keep the original procedure, then you will need to create a new procedure with a different name instead of modifying the original. Then, you can use whichever one you want.
  6. What is the difference between exported data items and procedure parameters?
      Don't confuse these two completely different concepts. Exported data items are essentially global variables that any other module can access if it imports them. In addition, any number of modules can concurrently share an exported data item. Procedure parameters are passed on the call stack from a calling procedure to a called procedure and are private to (i.e., known only to) the calling procedure and the called procedure.
      Think of exported data items as OPM RPG variables; they could be accessed by any subroutine in the program (although you didn't have to explicitly import them in the subroutines). You can also make a loose analogy by noting that exports are to modules (and service programs) what parameters are to procedures; they are a way of sharing data among modules, whereas parameters are a way to share data between two procedures.
  7. If you use the UPDSRVPGM command to update a service program with a new version of a module, will that have any effect on programs that already use (are bound to) the service program?
      Any time you use the UPDSRVPGM command - just like any time you use the CRTSRVPGM command - a new signature is generated for the updated service program. If the new signature is the same as the old one, then you're OK. This happens when you don't add any new procedures to the module and you don't change the interfaces of the existing procedures (a procedure interface is made up of the number of parameters, the type and length of each parameter, and the return value).
      If you do add a procedure or change an existing procedure's interface, then a different signature will be generated and any programs already linked to the service program will get a "signature mismatch" error the next time they are run. To avoid this problem, you must use the binder language to maintain signatures manually and use the Export and Export source file parameters on the UPDSRVPGM command to specify the name of your binder language source member (just as you would when using the CRTSRVPGM command).
Note: when you don't use the binder language, the service program contains only a single signature. The binder language allows you to specify as many signatures as you like for a service program in order to maintain compatibility with programs previously bound to the service program.

This was first published in August 1999

There are Comments. Add yours.

TIP: Want to include a code block in your comment? Use <pre> or <code> tags around the desired text. Ex: <code>insert code</code>

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
Sort by: OldestNewest

Forgot Password?

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

Your password has been sent to:

Disclaimer: Our Tips Exchange is a forum for you to share technical advice and expertise with your peers and to learn from other enterprise IT professionals. TechTarget provides the infrastructure to facilitate this sharing of information. However, we cannot guarantee the accuracy or validity of the material submitted. You agree that your use of the Ask The Expert services and your reliance on any questions, answers, information or other materials received through this Web site is at your own risk.