An original version of this article contained a huge table of directories known to exist on various systems that should not be used, but a key observation simplified the whole process, almost to the point of making the whole process trivial.
As a rule-of-thumb, you should not use a pre-existing directory for $INFORMIXDIR.
- You should create the directory specifically to contain IDS.
The default value assumed for $INFORMIXDIR is /usr/informix. Note that IDS does not prohibit you from using a symbolic link as the directory identified by $INFORMIXDIR. It will follow that link – after making sure that it is safe to do so. So, /usr/informix could be a symbolic link to somewhere more obscure.
The value of $INFORMIXDIR should not contain blanks. This applies on all platforms, not just MacOS X or Windows, though those are the platforms where users most readily use blanks in pathnames. The restriction might be removed in a future version of IDS (and CSDK), but there a numerous places where it will not work with current versions of IDS. When the restriction on names with blanks is removed (currently scheduled for a fix-pack of IDS 11.50), further directories on Windows and MacOS X could be listed; currently, they are excluded because the name contains blanks. However, the overriding principle ('you create $INFORMIXDIR') still applies, and means that the names containing blanks do not need to be listed separately
The total length of $INFORMIXDIR must be short enough to allow two names to fit into a character buffer of length 256 bytes, including the terminal null. The names are:
The first of those names limits $INFORMIXDIR to 238 characters; if the value of $ONCONFIG is longer than 'onconfig.std', then the maximum length of $INFORMIXDIR is that much shorter. In practice, this limitation is seldom a problem. Given that you can set $INFORMIXDIR to point to a symbolic link to a longer name, it is unlikely that this limit will be increased.
In general, it is a good idea to avoid approaching the limit too closely. The names and lengths cited are checked during the start-up; there could be other names that cause problems if you use a path to INFORMIXDIR approaching, say, 200 bytes. This is seldom a practical problem.