If I have an array with DIM(*AUTO) how can I see the number of elements in debug?
dcl-s elmRtex like(elmRte_fixed) dim(*auto : 60000) ascend;
For example elmRtex is loaded with a lot of values but how many elements are there?
And yes, I know, I could put a statement in the source like this:
nbrElmRtex = %elem(elmRtex);
But this shouldn't be necessary or not allways a possibility.
Regards
Peder
Number of elements for an array with DIM(*AUTO) in debug
-
peder udesen
- Posts: 35
- Joined: Thu Jul 29, 2021 8:00 am
Re: Number of elements for an array with DIM(*AUTO) in debug
This should really be in the RPG forum but ...
In debug simply use _QRNU_VARDIM_ELEMS_arrayname to see the number of active elements. It cannot be changed - only viewed.
In debug simply use _QRNU_VARDIM_ELEMS_arrayname to see the number of active elements. It cannot be changed - only viewed.
-
peder udesen
- Posts: 35
- Joined: Thu Jul 29, 2021 8:00 am
Re: Number of elements for an array with DIM(*AUTO) in debug
Thank you very much.
I used it immediately and it worked like a charm.
Well I was not sure where to put my question.
The question was about the debugger and not directly about RPG even though
it was related to a RPG program.
Regards
Peder
I used it immediately and it worked like a charm.
Well I was not sure where to put my question.
The question was about the debugger and not directly about RPG even though
it was related to a RPG program.
Regards
Peder