Connecting Applications to Caché
Depending on the nature of your application, you might be using a variety of tools to connect your user interface to the database.
MSM-SQL, KB-SQL, and M/SQL
MSM-Activate provides the means to call M functions, run XECUTE commands, or perform low-level operations on an MSM Server from any of the following methods:
A Windows DLL callable from C
An ActiveX control or a COM object
A C library from various UNIX® platforms
A set of Java classes and an associated Java Bean
Regardless of the connection method you choose, the clients all connect to a listening process on the MSM server via TCP/IP.
MSM-Activate’s server code has been ported to Caché, enabling you to run your MSM-Activate applications against Caché servers without any client-side application changes.
InterSystems recommends that, as a long-term goal, you convert your MSM-Activate based applications to native Caché technology. Depending on the tool you have used to build your client interface, you will have different Caché options available.
Caché objects allow you to use a number of different approaches, including C++, any Active X client (such as Visual Basic, PowerBuilder, or Delphi), or any Java-based tool (such as J++, Visual Café, or JBuilder). See the various Caché Binding books for details.
Caché Direct, which is conceptually quite similar to MSM-Activate’s Active X component, allows you to use any tool that can manage an OCX. See Using Caché Direct for detailed information.
Caché Callin interface is very similar to MSM-Activate’s Call-In Interface, and allows you to access Caché from C programs on all platforms. See Using the Caché Callin API for detailed information.
MSM-SQL, KB-SQL, and M/SQL
For relational access, you have probably chosen one of two relational environments for MSM:
MSM-SQL (which is just a badged version of older versions of KB-SQL)
InterSystems M/SQL (also known as the FDBMS)
Since the globals containing your data dictionaries will have been already migrated from MSM to Caché, you will be able to convert the relational environment from MSM to either Caché SQL or version F.17 of M/SQL for Caché directly on your Caché system.
For the KB-SQL contact your InterSystems Account Manager for access to the latest version of the data dictionary converter. This will take the ^SQL dictionary global and convert the table mappings into Caché objects class definitions. These definitions automatically expose your data as relational tables.
For the M/SQL FDBMS, you will need to do two steps to convert to Caché’s DBMS. These steps must be run from any namespace that contains the FDBMS objects.
Use the Conversion Manager, found under the System Management menu option of the ^%msql utility, to run any necessary DBMS conversion steps.
Recompile all DBMS objects by running the command:
Do all^%mcompilCopy code to clipboard
Run the F to CDL Export Utility/
Once your data dictionaries have been converted to F.17 or greater of Caché, you may still convert these F data dictionaries to the latest Caché SQL, which is highly integrated with Caché objects.
For ODBC connectivity, MSM and Caché function in a similar fashion, though you will typically benefit from much-improved overall relational performance and lower running costs. See the Using Caché SQL guide for more information on ODBC.
For information on converting your MSM-SQL and KB-SQL data dictionaries, contact your InterSystems Account Manager.
If you have implemented your application using M/SQL for MSM, contact your Account Manager or the WRC for further information on migrating M/SQL Forms to Caché.
MSM-PDQWeb connects web servers with MSM servers. It enables processing requests to be sent from the web to MSM, which replies in the form of static or dynamically generated HTML. MSM-PDQWeb is quite similar, in both purpose and implementation, to InterSystems WebLink technology, which in turn has been superseded by Caché Server Pages (CSP). WebLink is no longer being actively enhanced by InterSystems.
PDQWeb and WebLink are converged in Caché, enabling applications written for either technology to run unchanged or with only minor changes. This convergence delivers the two most frequently requested PDQWeb enhancements to MSM customers:
Support for state-aware connections (in addition to the currently available stateless connections).
Support for a wider variety of web servers.
There are some important steps you should follow for running your PDQWeb application in Caché. Depending on your web server platform, the steps will vary. See the Caché WebLink Guide for detailed information on this conversion process.
CSP is recommended as the preferred approach to building browser-based applications, and should be used instead of WebLink if at all possible.
In the area of GUI development tools, InterSystems and Micronetics strategies differed greatly. Where Micronetics focused on developing its own interactive development environment, InterSystems focused on leveraging mass market GUI development tools such as Visual Basic and Delphi.
We strongly recommend the use of Caché Object technology, in place of your current MSM-Workstation applications. With Caché objects, any industry-standard GUI or web development tool can be used for all of your GUI development projects. We believe that through use of Caché objects, in conjunction with industry-standard tools, you will be able to more effectively keep up with the rapidly changing industry.
Caché currently offers some of MSM-Workstations main features:
A graphical debugging environment
A graphical routine editor
Royalty-free licensing for single user systems
Caché does not support the M/WAPI standard defined by the MDC.
For more information, contact your InterSystems Sales Representative.
TELNET and LAT Terminal Servers
Caché supports terminal servers as a method of connecting terminals to your application. These terminals can connect via TELNET or LAT using Caché’s built-in terminal capabilities. To configure TELNET and LAT connectivity, use [Home] > [Configuration] > [Advanced Settings] page of the Management Portal. (Note that Caché Telnet settings apply only to Windows configurations in which InterSystems supplies the Telnet servers. )
Under Windows, there does not appear to be a standard way to tie a certain physical terminal server port to a particular terminal device. This means that MSM applications using $IO to identify a specific user or device may need to be modified. There are several solutions to this problem:
Tie individual or groups of terminals to a particular value of the special variable $ZIO. For a terminal device, $ZIO will contain the TELNET port number and host IP address, or LAT server name and port name.
Identify a specific terminal by creating a Caché user account whose name is made up of the terminal’s corresponding server or domain name and port (taken from the $ZIO special variable). From within the application, many references to the $IO special variable will then need to be changed to either the $ZIO variable or another application defined variable.
You can also tie this terminal device to a particular routine via the User Accounts utility.
Use the dumb terminal’s answerback feature to get a unique ID. For example, on a DEC VT420, set answerback in Setup|Comm|Answerback, and retrieve the string with $character(5).
If available on your terminal server, you can use telnet to report session and port information. There may be a need to do some scripting, either at the NT or Caché levels, which queries the terminal server for this information and parses the data that the terminal server returns.
Caché’s TELNET and LAT services do not run on Windows 95 or 98 platforms. For this functionality, you must use another Windows platform such as NT, 2000 or XP. LAT is only supported directly by Caché on these Windows platforms. For LAT support on non-Windows platforms, a third-party product would need to be used.
The load balancing algorithms differ between MSM and Caché. The MSM LAT Service Rating (LATSR) is calculated based upon current process load and maximum process load on a given server. The Caché LATSR is calculated by taking a specific figure defined by the system manager and multiplying that by the current CPU load on the system, thus producing a figure that is higher or lower than the figure set by the system manager.
The Caché LATSR is set to a value of one by default. Thus, connecting an MSM and Caché application/compute server side by side with both advertising the same LAT service will almost certainly result in every user logging into the MSM server!
To avoid this, simply increase the Caché LATSR level to something more appropriate based upon the known range of the MSM server’s LATSR.
Serial Port Expander Boards
Caché for Windows fully supports the use of any intelligent serial port expander board produced by Digi International, provided the board has a supported driver for Windows NT. Prior to using your Digi board with Caché, you must make sure the Auto-Start COM Ports box is checked. This option is found on the Terminal tab of the System Configuration Utilities. You will need to restart Caché after enabling this option. This launches COM port listener routines on the specified ports that will listen on specified ports allowing user login.
Unlike MSM, most Caché devices can be used dynamically and do not need to be predefined in the system setup.
Conversion of MSM Terminal Device Characteristics
The following table lists the equivalent Caché OPEN/USE protocols for MSM terminal device characteristics:
|Bit Pos||Decimal Value||MSM Name||Cache Equivalent (name)|
|31-28||n/a||Reserved||*** n/a ***|
|27||1.3E+08||Pass-All Flow||Enabled in image mode if supported by device.|
|26||6.7E+07||Prompted Read||Part of /FLUSH or "F" protocol (Flush).|
|25||3.4E+07||Type Ahead||See /FLUSH or "F" protocol (Flush).|
|24||1.7E+07||ZUSE||No ZUSE available in Cache.|
|23||8388608||Pass All||See /IMAGE or "I" protocol (Image Mode).|
|22||4194304||No <XOFF>||Cache uses OS settings.|
|21||2097152||<CTRL_O>||Controlled by OS.|
|20||1048576||Control Character||No direct correlation.|
|19||524288||Empty Line Delete||Not supported in Cache.|
|18||262144||Data Length||Controlled by OS.|
|17||131072||$X and $Y Update||Controlled through /XYTABLE or "Y\name\" protocol ($X/$Y Action Mode).|
|16||65536||Type of CRT||See /CRT or "C" and "P" protocol (CRT Terminal / Printer Device).|
|15||32768||Interrupt||Not supported in Cache.|
|14||16384||Lowercase||Controlled through /TRANSLATE or "K" protocol (I/O Translation Mode).|
|13||8192||Line Feed||Controlled in configuration for device subtype.|
|12||4096||<TAB> Control||Controlled in configuration for device subtype.|
|11||2048||Line Carrier||Supported in Windows only, see $ZA and COMMCTRL.|
|10||1024||Printer||See /CRT or "C" and "P" protocol (CRT Terminal / Printer Device).|
|9||512||Connect||Supported in Windows only, see COMMCTRL.|
|8||256||Logon||Supported in Windows only, see COMMCTRL.|
|7||128||Cursor Position||Not supported in Cache.|
|6||64||Escape||Not supported in Cache.|
|5||32||<CTRL_S>||Controlled by OS.|
|4||16||<CTRL_O>||Controlled by OS.|
|3||8||Modem Control||Supported in Windows only, see COMMCTRL.|
|2||4||CRT||See /CRT or "C" and "P" protocol (CRT Terminal / Printer Device).|
|1||2||Output Only||Not directly supported in Cache, in Windows see COMMCTRL.|
|0||1||Echo||See /ECHO or "S" protocol (Secret Input).|