Using Logical Saved Segments

The following list summarizes what you need to do to access code or data from within a logical saved segment.

  1. Create the code or data that you want to define as a saved segment.
  2. Define the space in CP for the physical saved segment:
    • If you are using VMSES/E to manage your saved segments, see Changing, Adding, and Deleting Saved Segment Definitions.
    • If you are not using VMSES/E, use the CP DEFSEG command to define the saved segment. The DEFSEG command creates a skeleton system data file for the saved segment.
      Note: To use the DEFSEG command to define a saved segment, you need CP class E command privileges.

    For information about the concepts of defining CP saved segments, see Planning and Defining CP Saved Segments.

  3. Build the physical and logical saved segments. See Creating Physical and Logical Saved Segments.
  4. Use the SEGMENT RESERVE command to reserve space within your virtual machine's address space for the saved segment (optional).
  5. Use the SEGMENT LOAD command or SEGMENT LOAD macro to load the logical saved segment into storage.

    For information on how to use the SEGMENT command, see the z/VM: CMS Application Development Guide. For information on how to use the SEGMENT macro, see the z/VM: CMS Application Development Guide for Assembler.

  6. Use predefined interfaces to access the code or data contained in the saved segment.