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



I'm trying to obtain source information from a program ILE, on OUTFILE.

If you make these step via DSPOBJD on FILE, of an RPG/DDS/CLP and so on
you will obtain, on the designed outfile the "source" field properly
filled:
[SNIP]

Every ILE module can be built from a separate source member. And an ILE program can consist of thousands of different modules. Therefore, there isn't a one-to-one relationship between an ILE program and a source member.

Back in the dark ages when we still used OPM, this wasn't true. The OPM compilers were extremely limited, and one of those limitations was that everything had to come from one source member. In that world, it made sense to include the source member info on the DSPOBJD output. After all, there was only one source member per object. Why not list it?

But now that there's the potential for thousands of source members per object, it doesn't make sense anymore.

This info is somehow available, if you use WRKPGM, option 5, on the 3
screen you can have that:
[SNIP]

That's because there's one source member per module. The DSPPGM command (which is what WRKPGM opt 3 calls) is able to show you the detail of each module that was used to create the program. Since it shows each module, it can show you each source member used to create those modules. If you have 1000 modules, it'll list them all and you can use option 5 to display the source member for all 1000 modules (if you're so inclined)


Now, how these info can be obtained into an OUTFILE?


Unfortunately, DSPPGM doesn't output to an outfile, so you can't do it that way. Instead, write a program that uses the QBNLPGMI API to get the listing of modules and the source members they were created with.

I suppose if you really like outfiles, your program could write the info to an outfile -- but personally, I'd just use the source member info straight out of the user space, it's faster than an outfile, and I can't see the disadvantage.

Search the web for info on QBNLPGMI, this question has been answered many times, and I'm sure you'll have no problem finding code examples.

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.