To create a directory file, the command is:
CREATE.FILE filename 30
or
CREATE.FILE filename DYNAMIC
(Both these commands have the same effect: the creation of a dynamic file.)
If the last section on static files convinced you that they were likely to prove a pain to set up and maintain well, then you are not alone. For many years, static hashed files were the only kind available with PICK systems, but in the late eighties Prime added a new file type called 'dynamic' files to Prime INFORMATION. VMark adopted these into UniVerse.
Dynamic files are intended to perform the same tasks as static files. Like static files, they are divided into groups, and like static files, they 'hash' records into these groups according to their keys. The vital difference is that as you add data to dynamic files, they increase their own modulo automatically: and as you remove it, they reduce it. Hence 'dynamic'.
They have a wide range of parameters (wider than static files) which you can specify at creation time, or modify after creation, and which allow you to fine tune their performance: but unlike static files (which must be configured well in order to perform), dynamic files perform reasonably well with all of these parameters set to their defaults. When you become involved in the intricate performance tuning of a system which uses dynamic files, you can find the information you'll need in the UniVerse documentation, but it is not necessary to provide it in an introductory course like this one.
If this is all true, why are static files still in use at all?
1. At many sites, they aren't.
2. Dynamic files have a slightly higher write overhead: the processing which normally takes place during a static file RESIZE
is divided amongst thousands on individuals record writes to dynamic files.
3. A well sized static file will slightly outperform a dynamic file. If your file is extremely stable (and therefore can be well-sized once and left like that), or your resizing process extremely efficient, you may benefit from this.
4. Basic on some very old anecdotes, some users seem to fear that dynamic files are prone to corruption. While files do sometimes corrupt, I have found dynamic files no more likely to do so that static ones.
My own advice, in short, is that unless you have a good reason not to, use dynamic files.