cobolmainframecics

In CICS where is the data in the Linkage Section of COBOL stored?


In CICS on z/OS I have some questions:


Solution

  • There's quite some confusion here concerning the different storage types. From a COBOL perspective you won't ever be worrying about main storage or auxiliary storage. Your COBOL-data lives in an address space made up of virtual storage which in turn is backed by main or auxiliary storage as the system sees fit.

    While your program will automatically allocate memory for items defined in WORKING STORAGE or LOCAL STORAGE sections, it will not do so for anything defined in the LINKAGE SECTION. For a LINKAGE SECTION item to be usable, two things are required:

    1. Some memory must be allocated
    2. The LINKAGE SECTION item must be associated with the address of that memory region.

    These two things can happen in different ways:

    As for your last question: passing parameters BY REFERENCE from one program to another will not create extra copies of that data. Passing BY VALUE or BY CONTENT will duplicate the data.