You are here: Development Standards > OSAS Standards > Environment > Options and Interfaces

# Options and Interfaces

There are two types of interfaces between applications. These interfaces are handled by the OPTxxx records in the xxTB file for each application. Fifty switches are supported in each table. Each application defines its options switches. These switches are not completely consistent between applications, but in general the following switches apply:

Switch Number | Common Usage
1 | General Ledger Interface (" "=off, "1"=on)
2 | Inventory interface
3-5 | Application-specific options
6 | Job Cost Interface
7-70 | Application-specific options

- Verification interfaces are used when a task in one application needs to verify data in another application's data files. The first step is to test the option switch. An option switch must be defined for all cross-application interfaces. If the interface is on, this application can open the file and read it. The interface switch must be tested before every I/O operation involving the file.
- Posting interfaces are used when a task in one application needs to write data to another application's data files.
  The first step is to test the option switch. An option switch must be defined for all cross-application interfaces. If the interface is on, this application can open the file, read a record if needed, and/or write to the file. The interface switch must be tested before every I/O operation involving the file.
  Writing to another application's files usually occurs in a post function. This usually means LOCKing any files to which the program will write data.

Guidelines

Use these guidelines to create or modify the options and interfaces for an application:

- There must be a switch for all data file interface situations between products.
- There must be an option switch for all history files.
- The Resource Manager program RMACOPT, which uses the options and interfaces defined in the xxOI file, asks if the user wants to share option records or to have unique ones for each company installed on the system. This process will automatically create or erase the OPTxxx records based on the user's choice.
- To avoid confusion when testing an option switch (with two possible values), use
  IF O2$(4,1)<>“1” THEN ...
  rather than
  IF O2$(4,1)=“ ” THEN ...