LE provides a callable service precisely for this -- getting page-aligned
HEAP storage.  There is even an example for COBOL though the callable
service was originally created for C/C++.  So quite easy to do :)
See
https://www.ibm.com/docs/en/zos/2.4.0?topic=services-ceecrhpcreate-new-additional-heap
and note you also need to delete the storage eventually.  Option setting 77
and 78 gives page aligned storage.
Much more efficient than any of the mentioned alternatives.
Also illustrates the mess that LE is, with hundreds of great services that
nobody knows exist or use when needed.  C'est la vie in LE land.

On Fri, May 30, 2025 at 6:27 AM Paul Gilmartin <
[email protected]> wrote:

> On Thu, 29 May 2025 18:43:57 +0000, Kurt Quackenbush wrote:
>
> >> From assembly services reference manual for the CSRCMPSC macro: "Note
> that the expansion dictionary must immediately follow the compression
> dictionary, and both must be aligned on page boundaries."
> >
> >Are you building the dictionary dynamically in memory, or is it static
> and are you loading it into memory from a load module in a data set?  If
> the latter you can tell the binder to place the dictionary CSECT on a page
> boundary using the ORDER statement with the (P) option.  Like this:
> >
> >  ORDER MYDICT(P)
> >  INCLUDE ddname(MYDICT)
> >
> >Then when you LOAD the load module, the dictionary will be properly page
> aligned.
> >https://www.ibm.com/docs/en/zos/3.1.0?topic=reference-order-statement
> >
> Would LOADing such an object marked NOREUSE be a way of obtaining
> aligned writable storage?
>
> --
> gil
>
> ----------------------------------------------------------------------
> For IBM-MAIN subscribe / signoff / archive access instructions,
> send email to [email protected] with the message: INFO IBM-MAIN
>

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [email protected] with the message: INFO IBM-MAIN

Reply via email to