Tags:
tag this topic
create new tag
view all tags
---+ Using the APPX/Sybase Connection ---++ Introduction: <p align="left">%RED% *NOTE: The Sybase interface is no longer actively supported. This information is provided for historical purposes only.* %ENDCOLOR%</p> <p align="left">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.</p> <p align="left">APPX files are redirected into external storage systems by means of the use of 'File System Groups', 'FMS Numbers', and 'FMS Controls'.</p> <p align="left">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.</p> <p align="left">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.</p> ---++ File System Groups: <p align="left">File System Groups are defined in (starting from the APPX main menu):</p> <p align="left">System Administration | Configuration | File System Groups</p> <p align="left">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.</p> <p align="left">File System Groups are assigned to Databases on the 2nd screen of:</p> <blockquote dir="ltr" style="margin-right: 0px;"> <p align="left">System Admin | Database/Applications | Database/Applications</p> </blockquote> <p align="left">You can override the File System Group assigned to an individual file within:</p> <blockquote dir="ltr" style="margin-right: 0px;"> <p align="left">Database Management | File Specifications</p> <p align="left">... or ...</p> <p align="left">Appl Design | Database Mgmt | File Mgmt | File Specifications</p> </blockquote> <h2 dir="ltr">FMS Numbers:</h2> <p align="left" dir="ltr">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.</p> <p align="left" dir="ltr">FMS Numbers are used in either of two places, in the 'File System Groups' editor, and in the 'File Specifications' editor.</p> <p align="left" dir="ltr">Valid FMS Numbers are:</p> <ol dir="ltr"> <li> !AppxIO (except RMS under VMS) </li> <li> VISION (!AcuCobol) </li> <li> CISAM (Informix) </li> <li> Sybase </li> <li> Oracle </li> <li> ODBC (SQL Server, Access, etc.) </li> <li> APPXNET (!AppxIO Database Server) </li> </ol><p align="left" dir="ltr">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.</p> <p align="left" dir="ltr">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.</p> <p align="left" dir="ltr">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.)</p> <h2 dir="ltr">FMS Overrides</h2> <p align="left" dir="ltr">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.</p> <p align="left" dir="ltr">The APPX/Sybase connection understands the following FMS controls:</p> * <p> </p> <p>server=<expression>; - specifies Sybase server name<br />(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.)</p> * <p> </p> <p>database=<expression>; - specifies Sybase database name</p> * <p> </p> <p>table_name=<expression>; - specifies Sybase table name</p> * <p> </p> <p>login_name=<expression>; - specifies Sybase user name</p> * <p> </p> <p>login_pwd=<expression>; - specifies Sybase user password</p> * <p> </p> <p>proxy_db=LOK; - specifies Proxy Locking Database (note that semi-colons terminate each subexpression)</p> <p align="left" dir="ltr">where <expression> is composed from the following:</p> * <p> </p> <p>$db - maps to 3-character APPX database ID</p> * <p> </p> <p>$appl - maps to 3-character APPX application ID</p> * <p> </p> <p>$version - maps to 2-character APPX version</p> * <p> </p> <p>$file - maps to 8-character APPX file name</p> * <p> </p> <p>$uid - maps to 3-character APPX user id</p> * <p> </p> <p>$pid - maps to Unix process ID</p> * <p> </p> <p>$uname - maps to Unix user name</p> * <p> </p> <p>$ucase( <expression> ) - converts <expression> to upper-case</p> * <p> </p> <p>$lcase( <expression> ) - converts <expression> to lower-case</p> <p align="left" dir="ltr">You can use these FMS control specifications to define a mapping algorithm for file names. For example:</p> <blockquote dir="ltr" style="margin-right: 0px;"> <pre dir="ltr">table_name = $lcase( $appl_$file ); database = master;</pre> </blockquote> <p align="left" dir="ltr">... 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").</p> <p align="left" dir="ltr">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.</p> ---++ FMS Defaults <p align="left" dir="ltr">If you do not override the following specifications (either at the FMS or individual file level), APPX uses these defaults:</p> <blockquote dir="ltr" style="margin-right: 0px;"> <p align="left" dir="ltr">Table Names:</p> <blockquote dir="ltr" style="margin-right: 0px;"> <pre dir="ltr">table_name = $lcase( $file );</pre> </blockquote> </blockquote> <p align="left" dir="ltr">Server Names:</p> <blockquote dir="ltr" style="margin-right: 0px;"> <p align="left" dir="ltr">if $APPX_SYBASE_SERVER is a defined environment variable:</p> <blockquote dir="ltr" style="margin-right: 0px;"> <pre dir="ltr">server = $APPX_SYBASE_SERVER;</pre> </blockquote> </blockquote> <p align="left" dir="ltr">else if $DSQUERY is a defined environment variable:</p> <blockquote dir="ltr" style="margin-right: 0px;"> <pre dir="ltr">server = $DSQUERY;</pre> </blockquote> <p align="left" dir="ltr">else</p> <blockquote dir="ltr" style="margin-right: 0px;"> <pre dir="ltr">server = SYBASE;</pre> </blockquote> <p align="left" dir="ltr">Database Name:</p> <blockquote dir="ltr" style="margin-right: 0px;"> <p align="left" dir="ltr">if $APPX_SYBASE_DATABASE is a define environment variable:</p> <blockquote dir="ltr" style="margin-right: 0px;"> <pre dir="ltr">database = $APPX_SYBASE_DATABASE;</pre> </blockquote> </blockquote> <p align="left" dir="ltr">else</p> <blockquote dir="ltr" style="margin-right: 0px;"> <pre dir="ltr">database = appx;</pre> </blockquote> <h2 dir="ltr">Installation troubleshooting:</h2> <p align="left" dir="ltr">If you have trouble CREATE'ing Sybase tables from APPX on a new installation of APPX and/or Sybase, see the document [[AppxSybaseTroubleshooting][APPX/Sybase Interface Troubleshooting]].</p> <p align="left" dir="ltr"> </p> ---++ Comments: _Read what other users have said about this page or add your own comments._ --- <br />%COMMENT%
E
dit
|
A
ttach
|
Watch
|
P
rint version
|
H
istory
: r2
<
r1
|
B
acklinks
|
V
iew topic
|
Ra
w
edit
|
M
ore topic actions
Topic revision: r2 - 2016-01-08
-
JeanNeron
Home
Site map
Main web
MedicaidBilling web
Sandbox web
TWiki web
Main Web
Users
Groups
Index
Search
Changes
Notifications
RSS Feed
Statistics
Preferences
P
P
View
Raw View
Print version
Find backlinks
History
More topic actions
Edit
Raw edit
Attach file or image
Edit topic preference settings
Set new parent
More topic actions
Account
Log In
E
dit
A
ttach
Copyright © 2008-2025 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki?
Send feedback