Syntax

FDSTART facsname '<path>+<database table definition name>'

Meaning

FDSTART starts a FACS definition. The facsname we define here, is a logical name (alias) that refers to a database table. Besides the name, you need to provide the (relative) path plus the name of the database definition file (the .inf file without extension) to enable the ADAPL compiler to make the link to the actual database table. When you use a relative path, make sure it is relative to your Collections application folder containing the .pbk file. The file name is given as a character string between single quotation marks, starting with the path to the \data folder of the database file in the file system, then a ‘plus’ sign, then the name of the database defnition (without extension), possibly followed by a 'greater than' sign and the dataset name if you want to target that dataset only.

Example 1

Example of a FACS declaration if you don't want to assign database variables because you're only using one database in this adapl:

FDSTART DOCS '../data+document'

au

ti

%0

FDEND

Result

Each declared tag here, from the FACS buffer DOCS, can now be accessed in this adapl directly after reading a record into this buffer. (If you use tags in the adapl that are not declared in an FDSTART ... FDEND block then those tags must reside in the local record buffer instead of the FACS buffer that you declare. This buffer is implicitly declared and has the name adlib_lite. The buffer contains the currently opened/processed record in Collections, and is therefore not available for stand-alone adapls.)

Example 2

To declare the book dataset in the document database definition in the ../data folder, under the alias BOOKS with the definition of three database variables, is coded as follows (although you can choose different aliases):

FDSTART BOOKS '../data+document>book'

au IS BOOK_Author

ti IS BOOK_Title

%0 IS BOOK_Priref

FDEND

Result

BOOK_Author for example, is now an alias for the field tag au in the FACS buffer BOOKS, which in turn refers to field tag au in the book dataset in the document database definition..

All current model application adapls use this declaration type.

See also

Click here for general information about FACS.