Topic
  • No replies
PavankumarM
PavankumarM
6 Posts

Pinned topic COBOL API to request for Memory

‏2012-02-10T13:52:57Z |
Wanted to check with you on the availability of COBOL API’s which can be used in zOS Batch / Online(CICS) to directly request for memory . We want to load this memory area with Data and have multiple IMS tasks refer to the same

We are exploring this for a performance-related design option

regards
Pavan
Updated on 2012-03-28T00:08:55Z at 2012-03-28T00:08:55Z by SystemAdmin
  • SystemAdmin
    SystemAdmin
    403 Posts

    Re: COBOL API to request for Memory

    ‏2012-02-10T15:01:08Z  
    Probably the best way to do what you want is to use the LE Callable Services for storage management. Without going into all the details, because there are several services, you should check the LE Programming Reference manual for details. There is a list of all of the Callable Services; the "Dynamic storage callable services" list is Table 11, starting on Page 106 of the z/OS V1.13 version of the manual.

    The advantage to using the Callable Services is that you can use the same service from any LE Conforming language using the same syntax, etc.
  • brataj
    brataj
    40 Posts

    Re: COBOL API to request for Memory

    ‏2012-02-12T21:43:31Z  
    While LE Callable Services can be used to allocate memory for the duration of an application, they don't allow you to share memory across address spaces. I get the impression that's your intention.

    You'd have to go with the shared memory implementation provided by the C run-time under Unix System Services. And of course would have to manage the shared memory access though the appropriate locks etc.
  • SairamR
    SairamR
    1 Post

    Re: COBOL API to request for Memory

    ‏2012-02-16T08:53:32Z  
    Probably the best way to do what you want is to use the LE Callable Services for storage management. Without going into all the details, because there are several services, you should check the LE Programming Reference manual for details. There is a list of all of the Callable Services; the "Dynamic storage callable services" list is Table 11, starting on Page 106 of the z/OS V1.13 version of the manual.

    The advantage to using the Callable Services is that you can use the same service from any LE Conforming language using the same syntax, etc.
    I tried looking at CEEGTST to allocate from a heap of memory. Can you please advise if the below plan will be feasible ?

    Module X will run initially and create/load a heap with an array. The address of the memory allocated will be stored in a table. If there are any transactions (IMS DC transactions in this case) that want to read this array, they have to call X which will load the address from the table and point to the address (and hence to the array).
  • SystemAdmin
    SystemAdmin
    403 Posts

    Re: COBOL API to request for Memory

    ‏2012-03-28T00:08:55Z  
    • SairamR
    • ‏2012-02-16T08:53:32Z
    I tried looking at CEEGTST to allocate from a heap of memory. Can you please advise if the below plan will be feasible ?

    Module X will run initially and create/load a heap with an array. The address of the memory allocated will be stored in a table. If there are any transactions (IMS DC transactions in this case) that want to read this array, they have to call X which will load the address from the table and point to the address (and hence to the array).
    When Module X terminates, the storage acquired by it will be freed.
    So, either Module X must stay active or you must use a different solution.
    Couldn't you use database storage for this purpose?

    COBOL is the Language of the Future!