NOTE: The Sybase interface is no longer actively supported. This information is provided for historical purposes only.
APPX allows data storage in numerous storage systems, including AppxIO disk and APPX memory files, 3rd party relational systems such as the Oracle, Sybase, and SQL Server, and 3rd party DBMS systems CISAM, Vision, and VMS/RMS.
APPX files are redirected into external storage systems by means of the use of 'File System Groups', 'FMS Numbers', and 'FMS Controls'.
A File System Group defines a set of specifications unique to each storage system. For example, the CISAM storage system allows you to define key/index mapping options unique to CISAM. All storage systems allow you to override the default locations in which data is stored.
IMPORTANT: To use the APPX/Sybase Connection in APPX 3.3 and higher, you must use the "appx.prelinked" engine, in place of the usual "appx" engine.
File System Groups are defined in (starting from the APPX main menu):
System Administration | Configuration | File System Groups
Databases, Applications, and individual files can be assigned to File System Groups. When you assign a Database to a File System Group, all that Database's files by default share its specifications.
File System Groups are assigned to Databases on the 2nd screen of:
System Admin | Database/Applications | Database/Applications
You can override the File System Group assigned to an individual file within:
Database Management | File Specifications
... or ...
Appl Design | Database Mgmt | File Mgmt | File Specifications
File System Groups are assigned an FMS (File Management System) number. The FMS Number indicates the storage system to be used to maintain this datafiles.
FMS Numbers are used in either of two places, in the 'File System Groups' editor, and in the 'File Specifications' editor.
Valid FMS Numbers are:
To store an individual file in Sybase, change the "FMS" specification from its default of 1 to 4 (Sybase). When you create the file, it will be created in a Sybase database.
To move an existing type 1 (AppxIO) file into Sybase, Export the file, change the file to FMS type 4 (Sybase) and import the file. You can move the file back into AppxIO by changing the FMS type back to 1 and importing again.
You can also define an individual file to be part of an FMS group if you want to override the Sybase default specifications. (In fact, with the current release of APPX, you must explicitly define a file to be part of an FMS group in order to override defaults.)
When you define an FMS group, you can specify FMS controls which will be interpreted by the storage system whenever you access a file associated with that FMS group.
The APPX/Sybase connection understands the following FMS controls:
server=<expression>; - specifies Sybase server name
(Note: the "server=" command is not implemented as of APPX release 3.3. You must use the environment variable "APPX_SYBASE_SERVER" instead, for now.)
database=<expression>; - specifies Sybase database name
table_name=<expression>; - specifies Sybase table name
login_name=<expression>; - specifies Sybase user name
login_pwd=<expression>; - specifies Sybase user password
proxy_db=LOK; - specifies Proxy Locking Database (note that semi-colons terminate each subexpression)
where <expression> is composed from the following:
$db - maps to 3-character APPX database ID
$appl - maps to 3-character APPX application ID
$version - maps to 2-character APPX version
$file - maps to 8-character APPX file name
$uid - maps to 3-character APPX user id
$pid - maps to Unix process ID
$uname - maps to Unix user name
$ucase( <expression> ) - converts <expression> to upper-case
$lcase( <expression> ) - converts <expression> to lower-case
You can use these FMS control specifications to define a mapping algorithm for file names. For example:
table_name = $lcase( $appl_$file ); database = master;
... will cause us to convert APPX file names to lower-case and prepend the 3-character application ID and an underscore (for example TGL BALANCE1 will be converted tgl_balance1). Also, the tgl_balance1 file will be created in the "master" database (rather than the default of "appx").
The current release of APPX has a very picky FMS control parser. If your FMS control specifications are not syntactically correct, APPX will hang when you try to create a data file in that FMS group.
If you do not override the following specifications (either at the FMS or individual file level), APPX uses these defaults:
Table Names:
table_name = $lcase( $file );
Server Names:
if $APPX_SYBASE_SERVER is a defined environment variable:
server = $APPX_SYBASE_SERVER;
else if $DSQUERY is a defined environment variable:
server = $DSQUERY;
else
server = SYBASE;
Database Name:
if $APPX_SYBASE_DATABASE is a define environment variable:
database = $APPX_SYBASE_DATABASE;
else
database = appx;
If you have trouble CREATE'ing Sybase tables from APPX on a new installation of APPX and/or Sybase, see the document APPX/Sybase Interface Troubleshooting.