views:

185

answers:

3

At /questions/2000777/allocation-of-memory-in-variable-length-tables NealB mentioned LE routines to allocate/deallocate memory in a non-CICS COBOL program.

I'd very much like to know how this is done: how the LE routine is called. (I'm familiar with the LINKAGE SECTION and with SET ADDRESS.)

Since I have no access to an IBM mainframe at the moment - meaning no access to online documentation - some code snippets could enlighten me.

A: 
NealB
A: 

Great. That gives me enough to work on. Thanks. (Haven't worked out yet how to just answer the answer.)

HaWe
To "answer the answer" either accept it as the correct answer by clicking on the check mark or, if you need more information, post a comment like this one by clicking on the "comment" link. You can also explore other options by following the FAQ at the top of the page.
NealB
Right. I can see that it works here. Only that this is the _only_ "comment" link I can see here. Cause is probably that I'm not yet registered - so I can only comment my own answers. But never mind.
HaWe
No check mark around either. Same reason Isuppose.
HaWe
No. Reason is a missing cookie: Konqueror died on me and I resumed using Firefox -> different Cookie! Sorry, not able to click the check mark.
HaWe
Don't worry about it, the only thing that is really important is that you got all of the information you were looking for.
NealB
A: 

In an LE environment, you would call CEEGTST and CEEFRST to get and free storage.

They both take a 12-byte result token as the first parameter -- if you pass null, LE will abend for you on a failure.

The second parameter is the address.

In the case of CEEGTST, you also pass a third, length, parameter.

Example to allocate:

Call 'CEEGTST' using
  omitted
  address of some-linkage-item
  length of some-linkage-item
End-Call

Example to free:

Call 'CEEFRST' using
  omitted
  address of some-linkage-item
End-Call
Joe Zitzelberger