Topic
4 replies Latest Post - ‏2012-03-28T00:08:55Z by SystemAdmin
PavankumarM
PavankumarM
6 Posts
ACCEPTED ANSWER

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
    ACCEPTED ANSWER

    Re: COBOL API to request for Memory

    ‏2012-02-10T15:01:08Z  in response to PavankumarM
    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.
    • SairamR
      SairamR
      1 Post
      ACCEPTED ANSWER

      Re: COBOL API to request for Memory

      ‏2012-02-16T08:53:32Z  in response to SystemAdmin
      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
        ACCEPTED ANSWER

        Re: COBOL API to request for Memory

        ‏2012-03-28T00:08:55Z  in response to SairamR
        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!
  • brataj
    brataj
    40 Posts
    ACCEPTED ANSWER

    Re: COBOL API to request for Memory

    ‏2012-02-12T21:43:31Z  in response to PavankumarM
    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.