How to resize a native VSAM file which is used in IDMS.

Document ID : KB000023678
Last Modified Date : 14/02/2018
Show Technical Document Details

Introduction:

We are resizing the IDMS files to use the minimum number of pages to reduce the disk space usage. 

As part of this resizing approach we would like to know the steps involved in resizing the IDMS Native VSAM Files.  

Can you please let us know the steps to resize the IDMS Native VSAM files.  

 

Instructions

A native VSAM area, even in IDMS, is first and foremost a native VSAM file.

All we do to IDMS is define a segment/area/file set up to tell IDMS the physical attributes of the native VSAM file.

At least one record needs to be in the dataset.

Don't change the CISIZE of the VSAM-files during this process, since its size corresponds to the page size of the IDMS buffer for that file.

 

 

The complete way to resize (enlarge the file) is the following:

 

1. Change the number of pages in the IDMS area definitions for the native VSAM files so that the number of pages relates to the number of records in the new VSAM file definitions.

2. Re-compile the DMCL.

3. Take the CV down.

4. DELETE/(re-)DEFINE the native VSAM file(s).

5. Copy the records into the native VSAM file. You may have to put at least one record in the native VSAM files to allow IDMS to open them properly (REPRO).

6. Bring the CV up.

7. Issue the DCMT DISPLAY AREA area-name command to confirm that the file is in UPDate mode to the CV and that the new page range is correct according to what you changed it to.

 

In case you don't want to enlarge the file, but make it smaller and do it with CV up, the following steps are sufficient:

 

DCMT VARY AREA area-name OFFLINE

DCMT VARY FILE file-name DEALLOCATE

..

perform the necessary VSAM steps (DELETE/DEFINE/REPRO)

..

DCMT VARY FILE file-name ALLOCATE

DCMT VARY AREA area-name ONLINE

 

 

Additional Information:

There are guidelines for the number of pages in the area definition for a native VSAM file in the Database Administration manual

chapter “Physical Database DDL Statements”,

Section "AREA Statements" under "Usage".