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



Hi Peter,

Not sure if I understood your question correctly, but I DOUBT there is any way 
to call any API which makes no distinction between ILE programs and OPM 
programs.  The QTERTVPV API will do just what you want, but only for OPM 
programs (Cobol, RPG/3, MI, and CL) which are running in a job which is in 
debug mode (service mode lets you debug other jobs).  It is fairly easy to call 
and works great, although I have only used it to retrieve variable information 
from MI programs.  (for the others, there are the normal system debuggers, so 
why re-invent the wheel?).  

For ILE programs, the system debugger APIs should allow you to programmatically 
inspect variable information for ILE programs, but they are complex to use (I 
have no experience with it; again, not desiring to reinvent the wheel).  On 
second thought, since you can debug OPM programs when in the ILE debugger IF 
the program had been compiled with the option SRCDBG(*YES), it may be that you 
could, in fact, get data from OPM programs this way too.  A "simple" test will 
show whether it works.  

Another possibility is, seemingly (according to the documentation, if I read it 
correctly), the QteDumpModuleVariables API can be used to dump all the 
variables in a module, even if it is NOT in debug mode.  Again, it may work 
only for ILE.  

Finally, Leif Svalgaard has an MI memory exploration program that may do what 
you want (documented in his E-book), but I have not gotten far enough yet in 
said book to know for sure.  

Anyway:  good luck.  In my opinion, QTERTVPV is the easiest way to implement 
what you want, with the restrictions of having to be in debug mode and OPM 
only.  I don't see that MATACTAT (Materialize Activation Attributes) gives you 
the current value of variables in storage, only the activation attributes of 
OPM and ILE programs.  You can also materialize the Object Definition Table 
with the MATPGM instruction, but again, my understanding is that you only get 
the DEFINITIONS of variables, not their values at run time.  

rich hart

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.