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