Product Documentation

FairCom ISAM for C

Previous Topic

Next Topic

Application Name List Restrictions

The text string used in APP_NAME_LIST entries have the following restrictions:

  1. The text string cannot contain a vertical bar (|) character; and
  2. The string cannot exceed the maximum file name length (255 characters, or 512 characters when multi-byte characters are enabled).

While any delimiter can be used in the APP_NAME_LIST text string, except for the vertical bar character (|), FairCom recommends the pound character (#). Also, if the server is likely to be used by applications from multiple vendors, FairCom further recommends that the first parameter of an APP_NAME_LIST text string be considered a sub-list name so that different applications can select only the items that are relevant to them. For example:

APP_NAME_LIST first.dat#LIST_1#parm12#parm13

APP_NAME_LIST second.dat#LIST_1#parm22#parm23#parm24

APP_NAME_LIST first.dat#LIST_2#parm32

Use the c-tree function GetSymbolicNames() to retrieve the APP_NAME_LIST strings. The first APP_NAME_LIST text string is retrieved with the following call:

GetSymbolicNames(-1, buffer, buflen, FIRST_ITEM);

If GetSymbolicNames() is successful, it returns NO_ERROR and the first APP_NAME_LIST in the server’s configuration file is placed in buffer. If buflen is too small, GetSymbolicNames() returns error VBSZ_ERR (153). If no APP_NAME_LIST entry is found, GetSymbolicNames() returns error INOT_ERR (101).

The second and any subsequent APP_NAME_LIST text strings are returned by consecutive calls of the form:

GetSymbolicNames(-1, buffer, buflen, NEXT_ITEM);

When APP_NAME_LIST strings in the server's configuration file are exhausted, GetSymbolicNames() returns INOT_ERR (101). There is no way, without repeated calls to GetSymbolicNames(), to know in advance how many APP_NAME_LIST entries exist. Calling GetSymbolicNames() with the FIRST_ITEM mode always attempts to return the first item in the list, resetting the client position to the beginning of the list.