|
On 10/31/2013 3:37 PM, CRPence wrote:
On 10/30/13 7:21 AM, Charles MARTIN wrote:
I wish i could do some reflection using RPGLe.
By reflection, I mean :
'The process or mechanism of determining the capabilities of an
object at run-time.'
-snip-
Have you looked at what of that the Dump Module Variables
(QteDumpModuleVariables) API could provide?
http://pic.dhe.ibm.com/infocenter/iseries/v7r1m0/topic/apis/QTEDMPMV.htm
I just finished a proof of concept. I developed and tested it when NOT
in debug mode. That is, the sole debugger API I used was
QteDumpModuleVariables. Using that, I was able to get a list of the
variable names and types for both *PGM and *SRVPGM objects.
The variable definition is elusive. Some variables are reported fine:
Indicators, floats, integers and unsigned integers all implicitly return
their sizes. For example, there is a variable type for 64 bit float.
Alpha, zoned and packed only return their type, not their size or
precision. The API has space set aside to report decimal positions,
precision and scale, but they are always zero. So I can infer the size
of a 64 bit float or 128 bit pointer from the variable type, but I can't
do the same for alpha, etc.
I need to see if the situation changes if I combine this API with other
debugger APIs. Maybe if I get the program in active debug the API will
return more information about the variables.
A very interesting suggestion Chuck. Thanks for posting. I was always
fixated on getting the entire symbol table, cross reference included,
and so totally disregarded the debugger APIs. Lesson learnt!
--buck
--
This is the RPG programming on the IBM i (AS/400 and iSeries) (RPG400-L) mailing list
To post a message email: RPG400-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/rpg400-l
or email: RPG400-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/rpg400-l.
As an Amazon Associate we earn from qualifying purchases.
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.