Retreive program atrributes and save information in a file

5 pts.
I need to create a program that will check the activation group for all our ILE programs. I know that using DSPPGM command I can see the activation group for a specific object. Is there a way that I can have similar results but have the information stored in a file? Then I can read the file and determine which objects do not have the Activation Group setup to *DFTACTGRP. I will like to have similar results when I use DSPOBJD library name/*all output(*outfile) etc, etc, etc. I appreciate if you have any ideas that will help accomplish this. Thanks!

Answer Wiki

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

Why don’t you use ‘*print’ value for the ‘Output’ option of the ‘Dsppgm’ command and then copy that output (using CPYSPLF) to a physical file which you can read by a program you will create.

hope that answers your question.

Discuss This Question: 2  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.
  • astradyne
    Hi There are a couple of API's that you can use to retrieve this information directly into your program for a specified ILE program or service program. QCLRPGMI retrieves program information (including the activation group) for non-service programs, while QBNRSPGM retrieves it for service programs. The activation group "name" is held in the Activation Group Attribute field. I have a routine that uses other API's to create a program/module/resource cross reference which could easily be modified to include the activation group using the above API's. It's available for download at if you want to take a look. All the best Jonathan
    370 pointsBadges:
  • TomLiotta
    I'm not clear why you'd want to "have the information stored in a file". That is, you're going to be coding a call to an API (or a spooled file) to extract the attribute from the program object no matter what. Then you're going to write the extracted info to a file just so you can read it back in again. Why not just create a UDF that returns the activation group attribute whenever a library/program name is passed into it? It will just do what you're going to code anyway. The OS is object-based. UDFs provide a fairly natural connection between the objects you manipulate and the files you'll be using. You can run something as direct as DSPOBJD to populate a table with program names, then query that file with your UDF specified and the activation group comes out of the live object. Tom
    125,585 pointsBadges:

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.

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


Share this item with your network: