If you have a small assembler program to get main.. you also need one to
free it .. or have assembler program do get main cstcmpsc, free main

On Thu, May 29, 2025, 18:31 Bernd Oppolzer <[email protected]>
wrote:

> you wrote:
>
> Calculate p + 4096 / 4096 * 4096.  Should give you he page aligned storage
>
> not sure, how COBOL does this, if you put this into a COMPUTE statement.
> What needs to be done, is this:
>
> convert the address to a PIC S9(9) COMP field, say P
> then:
> COMPUTE P = P + 4096
> COMPUTE P = P / 4096    (ignoring the remainder)
> COMPUTE P = P * 4096    (now you have a multiple of 4k)
> then:
> convert P back to an address
>
> the original size of the obtained area must be the really required size
> plus 4096,
> to make sure that the area after the logic above is still large enough.
>
> Much easier IMO would it be to call a small ASSEMBLER routine to do the
> allocation;
> with GETMAIN etc. it is possible to require that the areas returned start
> on page boundaries.
> Such a routine could be made available globally for other users in the
> company.
> The requirement (page boundary or not) and the needed size could be passed
> as parameters,
> maybe also a subpool number.
>
> HTH, kind regards
>
> Bernd
>
>
> Am 29.05.2025 um 19:13 schrieb Colin Paice:
> > Allocate a big buffer. Address p
> > Calculate p + 4096
> > / 4096 * 4096.  Should give you he page aligned storage
> >
> > On Thu, May 29, 2025, 16:57 Richard Zierdt <
> > [email protected]> 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."   OK, cool.
> >>
> >> But if a Cobol program calls an (assembly) program that calls CSRCMPSC,
> it
> >> (Cobol) must provide a dictionary on a page boundary.
> >>
> >> How can Cobol obtain page-aligned storage?  LE service CEEGTST gets heap
> >> storage, but not necessarily on a page boundary.   Writing a
> >> quick-and-dirty utility program in assembler would work.  Just
> wondering if
> >> I'm missing some LE, Cobol function, or equivalent service.
> >>
> >> Thanks
> >> Richard Zierdt
> >>
> >> Confidentiality Warning/Avertissement de confidentialité:
> >>
> >> This message is intended only for the named recipients. This message may
> >> contain information that is privileged or confidential. If you are not
> the
> >> named recipient, its employee or its agent, please notify us immediately
> >> and permanently destroy this message and any copies you may have. Ce
> >> message est destiné uniquement aux destinataires dûment nommés. Il peut
> >> contenir de l'information privilégiée ou confidentielle. Si vous n'êtes
> pas
> >> le destinataire dûment nommé, son employé ou son mandataire, veuillez
> nous
> >> aviser sans tarder et supprimer ce message ainsi que toute copie qui
> peut
> >> en avoir été faite.
> >>
> >> ----------------------------------------------------------------------
> >> 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
>
> ----------------------------------------------------------------------
> 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