Re: Accessing INFORMIX ONLINE DB from a PC
Posted in 1994
Jeff Posner asked: >Can someone tell me which strategies are available for access data >in INFORMIX ONLINE on UNIX from a PC workstation. The simplest >requirement would be to extract the data accross a TCP/IP net >and put it in an EXCEL spreadsheet. I'll describe our experience which might provide you with some ideas. We have been accessing Informix databases on a Sequent system from networked PCs for over six years. Sun's PC-NFS provides the TCP/IP capability on the PCs. There are a number of ways to access data. The first two work with your Excel spreadsheet requirement; the last two when developing your own programs on the PC. 1) DBLink - I-Net (or at least the ancient version I'm using) comes with a utility that allows you to unload a database table to a file on your PC in either delimited ASCII or Lotus 123. Once the file is on the PC, import the data into Excel or whatever. The TCP/IP network connection and I-Net are, of course, required. This works for the occasional need but is cumbersome for regular use. It also doesn't provide flexibility; it is all columns and rows or none. 2) Custom extract - Similar to DBLink only you write an isql or ESQL/C program on the Unix box to extract the data you want and place in a delimited ASCII file. Use an NFS mounted file system to make the file available for import but watch out for those CR/LF and LF differences. (An amusing or horrifying digression: I know of only one production use of this method in my organization. The U.S. Treasury has gone to great lengths to substitute electronic payment submission for paper or tape. They provide fancy PCs with security devices and permit the PCs to be used only for the purpose of submitting payment information. Where does the payment information come from? It is extracted from Informix and placed in a file in an NFS exported file system. The file is copied from the NFS file system to a PC and then copied to a floppy disk which is then carried to the Treasury PC where is tranmitted to the Treasury who dutifully issues checks. Anyone see any flaws in this scheme?) 3) ESQL/C - Write C programs executing on the PC with embedded SQL statements. Informix Net (remsql) provides the mechanism for passing data to/from the PC. We have a number of client-server programs that use this method. A tough squeeze in a 640K DOS machine but doable. 4) Sockets - Forget I-Net and roll your own connection. This requires a daemon running on the Unix server which does all the database accesses via ESQL/C. Works well when you have a limited set of data retrievals/updates. Our PC E-Mail front end to SMTP/UNIX mail works this way. The daemon gets information from our name and group databases in Informix as well as moving the mail between the PCs and the Sequent. We're just beginning to make the (very painful) transition to Windows on our PCs so I can't speak to the products that I'm sure exist that might provide a more direct connection from the database to Excel. -Jim Frison