Thanks Robert,
I read too quickly , misunderstood the question and misworded the reply ...
I had inferred that the TS wanted to know not how much was
allocated but how much was
used out of the allocated area
so I should have written ( for the original way I saw things )
to keep track of the max indexes values REACHED is up to You
instead of
to keep track of the max indexes values is up to You
anyway the comment about LOC is still valid
here is a snippet according to the revised understanding
( did not even have to write it, it was already there in my set of samples )
****** ***************************** Top of Data ******************************
000001 Alloc:
000002 Proc Options(Main);
000003 dcl pliretc builtin;
000004 dcl (i,j) fixed bin(31);
000005 dcl a(i:j) fixed bin(31) ctl;
000006 i=11; j=23;
000007 allocate a;
000008 put skip list(lbound(a,1));
000009 put skip list(hbound(a,1));
000010 put skip list(cstg(a));
000011 put skip list(dim(a));
000012 call pliretc(0) ;
000013 End;
****** **************************** Bottom of Data ****************************
********************************* TOP OF DATA **********************************
11
23
52
13
******************************** BOTTOM OF DATA ********************************