IDMS

Expand all | Collapse all

Need to remove a file from buffer and include the file into a new buffer, what would the DMCL command be?

  • 1.  Need to remove a file from buffer and include the file into a new buffer, what would the DMCL command be?

    Posted Dec 24, 2018 12:34 PM

    Making a one for one with a files and buffers, I know that the INCLUDE will add a file to a buffer in the DMCL, what would the command be to remove a file from an existing buffer (DROP) for the DMCL.



  • 2.  Re: Need to remove a file from buffer and include the file into a new buffer, what would the DMCL command be?

    Broadcom Employee
    Posted Dec 26, 2018 09:26 AM

    There are three ways to associate a file with a buffer. 

    1 By naming the buffer in a file override added to the DMCL definition

    2 By naming the buffer when adding a segment to the DMCL definition

    3 By using the default buffer defined to the DMCL

     

    #1 Allows multiple files per segment. To break the assiociation between the file and the buffer in this case  you would need to EXCLUDE the file from the segment then INCLUDE with the new buffer name. For #2 you would need to EXCLUDE the segment from the DMCL. 

     

    For #1 the buffers are specified after the file statement:

    INCLUDE SEGMENT SEG1
    ON STARTUP SET STATUS TO RETRIEVAL
    ON WARMSTART MAINTAIN CURRENT STATUS
    DATA SHARING NO
    DEFAULT SHARED CACHE NULL
    INCLUDE FILE SEG1.FILE1

    BUFFER NSR_BUFFER
    SHARED CACHE DEFAULT
    INCLUDE FILE SEG1.FILE2

    BUFFER NSR_BUFFER
    SHARED CACHE DEFAULT

    ►►─┬───────────────┬─ FILE segment-name.file-name ────────────────────────────►

     ├─┬─ ADD ◄────┬─┤

     │ └─ INClude ─┘ │

    └─┬─ DROP ────┬─┘

    └─ EXClude ─┘ ───────────────────────────────────────────────────────────────────────── └─ BUFFER ─ database-buffer-name ─┘ └─ DEFAULT ─────────────┘
    ;

    For #2 the buffer is specified after the segment name: 

    INCLUDE SEGMENT EMPDEMO
    DEFAULT BUFFER A
    ON STARTUP SET STATUS TO UPDATE
    ON WARMSTART MAINTAIN CURRENT STATUS
    DATA SHARING YES
    DEFAULT SHARED CACHE IDMSLEVEL1CACHE1
    INCLUDE FILE EMPDEMO.EMPDEMO
    SHARED CACHE DEFAULT
    MEMORY CACHE NO

     

    ►►─┬───────────────┬─ SEGMENT segment-name ─────────────────────────────────►

    ├─┬─ ADD ◄────┬─┤

    │ └─ INClude ─┘ │

    └─┬─ DROP ────┬─┘

    └─ EXClude ─┘ ►─┬─────────────────────────────────────────────┬───────────────────────      └─ DEFAULT BUFFER ─┬─ database-buffer-name ─┬─┘ └─ NULL ─────────────────

     

    Randy