in idcams step..my input file has 2 gb records..so my output file is vsam file which has cataloged in production with 4 gb space..is there any parameter can we code to free the space after idcams utility run as it will occupy only 2 gb space,rest 2 gb space will be empty..
in normal files we can give rlse or free but vsam i dont know..can you please help me to get thi info if above scenario is poossible.
Joined: 06 Jun 2008 Posts: 8211 Location: Dubuque, Iowa, USA
Why is the file created with 4 GB of space if you're only using 2 GB? Change the IDCAMS DEFINE would be my first choice, although there's a lot to be understood still -- could the file have been defined as 4 GB to allow for expansion? What's the usage pattern (read only after load, inserts throughout the file, inserts only at the end)? What does the LISTCAT look like? Is there free space specified?
In general, unless you unload, delete, define, and reload the VSAM file you're not going to decrease the space used. Once a VSAM file is defined, it may get bigger but you can't make it get smaller without redefining it.
what is the usage pattern for the dataset ??
when defining a dataset there are many things to be taken into account
but the most important for vsam at least is the insert pattern,
and the distribution of the keys
there are insert key patterns that cause a ci split almost at every insert
but then even with lots of inserts with clustered keys it is sometimes better
to defines the ci free space percentage as 0
the first insert of a group of keys will cause a CI split and for a while there will be no more CI splits,
lots od dasd space can be saved in this way
but the issue must be closely watched and tuned