I have scoured the API section of the IBM i Knowledge Center, and I can't find an API that returns the program references for OPM programs. The QBNLMODI API apparently does for modules, but only ones that are bound into ILE programs. This omission seems so unbelievable, I have to think I'm
just missing it - possibly hidden in plain sight.
Does anyone have any ideas?
I have written numerous table functions that retrieve various kinds of data via calls to APIs, typically for data items for which IBM hasn't (yet) supplied a view or UDTF in QSYS2. One example is a table function to
return all the journal receivers in a journal's current receiver chain.
This allows me to summarize the receivers information by detach date. Over time, IBM has made some of the functions I've developed obsolete by
including a new view or UDTF in a technology refresh. Another example is I earlier wrote a UDTF similar to OBJECT_STATISTICS, because prior to 7.3, IBM's function doesn't return any journaling info on the objects.
On Friday, November 29, 2019 at 1:51:16 PM UTC-5, Jonathan Ball wrote:
I have scoured the API section of the IBM i Knowledge Center, and I can't
find an API that returns the program references for OPM programs. The
QBNLMODI API apparently does for modules, but only ones that are bound into >> ILE programs. This omission seems so unbelievable, I have to think I'm
just missing it - possibly hidden in plain sight.
Does anyone have any ideas?
I could have sworn there was an API equivalent but I'm danged if I can find it either. Any reason you can't use DSPPGMREF? At least you could use SQL against the results.
call qcmdexc ('dsppgmref pgmlib1/*all output(*outfile) objtype(*all)For such a function, i would call tmpnam() to get a temporary file name
outfile(qtemp/refs) outmbr(*first *replace)');
I have scoured the API section of the IBM i Knowledge Center, and I can't find an API that returns the program references for OPM programs. The QBNLMODI API apparently does for modules, but only ones that are bound into ILE programs. This omission seems so unbelievable, I have to think I'm
just missing it - possibly hidden in plain sight.
Does anyone have any ideas?
Is this even possible? AFAIK OPM programs can't be linked in but just called. And OPM certainly knows only about calls but not about binding.
Sysop: | Keyop |
---|---|
Location: | Huddersfield, West Yorkshire, UK |
Users: | 300 |
Nodes: | 16 (2 / 14) |
Uptime: | 88:08:15 |
Calls: | 6,697 |
Calls today: | 2 |
Files: | 12,232 |
Messages: | 5,348,236 |