Clipper on Unix or FlagShip: An Overview Clipper developers know and understand Clipper and DOS but, a large number are ignorant of or even afraid of Unix and what it provides. The purpose of this article is to introduce Unix and FlagShip. It will outline the steps required to port an existing Clipper product to Unix with FlagShip, and comment on why you might want to do so. This article will also point out differences between FlagShip/Unix and Clipper/DOS, and finally provide input on potential roadblocks in porting with a methodology for overcoming them. I am often asked, "What is FlagShip?" I like to answer that question with another question, "What is CA/Clipper?" The answer in both cases is the same, with only minor differences. CA/Clipper is a productive and powerful XBase programming language with which to quickly write and maintain useful data oriented applications. CA/Clipper has its own data engine, and is capable of using other data engines. All of this applies to FlagShip as well. If you have existing Clipper code, here's what you have to do to get it running under Unix. First overcome your fears, come to realize that UNIX really is easy, and then just do it. Before discussing how easy UNIX really is, you need to agree that the potential benefits of UNIX are worth your time. Take a quick look at the top 12 reasons why UNIX makes sense for DOS developers. 1) No more memory limitations. You can build executables up to 2 Gigabytes in size! 2) Multi-user and Multitasking and Multiprocessing. UNIX will allow many people to use it at the same time, with each doing many things simultaneously, and toggling between them. With FlagShip, you can even emulate an entire PC LAN on a single computer. As such, it may be practical to use FlagShip on a single machine to develop Clipper software for entire PC LANs! 3) No More Speed Limitations. Speed limits are no longer an issue under Unix due to its scalability and file access speeds. Scalability is one of the promises that NT has been holding out, and UNIX has had for years. Unlike DOS or MS-Windows that is for only one type of hardware platform, UNIX is available for nearly every hardware platform in existence. You can start with a 386/SX and SCO UNIX, and whatever you create will work on a 386/40, a 486/33 or 50 or 66, or Pentium, or a Multiple Pentium box for that matter. You need never change the binary you created to run the full scale of hardware. If you use standard Intel/PC hardware, you can even re- deploy it of other DOS/Windows or Unix purposes when replaced with larger hardware. 4) File access speed. When you use a PC on a typical PC LAN, it stores its files on a file server. The PC does the sifting, sorting, indexing, etc. in the files. As a result, far more data is transferred across the LAN than just the data with which the program is supposed to work. This is impractical, and can really bog down everything on the network. In a UNIX configuration, you share the power of a host machine between users, and relieve the network of all the extraneous data transfer. This is the Client/Server promise but using a Unix server is far less expensive in many cases. 5) Larger file systems. DOS does not handle large file systems very well. UNIX systems can easily be configured for one to hundreds of Gigabytes if you wish using RAID (redundant array of inexpensive drives) and other techniques. 6) Lower cost per seat (overall cost). Use inexpensive terminals rather than high cost PCs. If the applications run on the UNIX machine and you connect inexpensive terminals costing $200-400, you have a system that can be MUCH less expensive than a PC LAN. The need for higher cost PCs at each station is eliminated except for those stations needing specialized DOS or Windows programs. For these stations, the UNIX machine also acts as a file server, just as a normal Novell or other PC LAN Server would. Shared peripherals and centralized maintenance also results in lower overall costs than ordinary PC LANs. 7) Centralized maintenance. Maintaining of one machine is often far more practical than maintaining separate software on a lot of PC's. On a UNIX system, maintenance, software updates, and backups are done in only one place. 8) Unparalleled communications capabilities. UNIX was designed and used by AT&T for many years to support the International Telephone network. Every time you make a phone call you are using one or more UNIX systems. UNIX communicates to other machines with TCP/IP, NFS, Net BIOS, IPX, SPX, 3270, Token Ring, Ethernet, RS232 and any other method you can think of. Unix has a large library of functions and routines that can be used with your programs to add these capabilities. 9) Excellent Network Server. UNIX can be used as a File Server, Print Server, as well as an Application Server and other kinds of servers. It can serve both terminals and existing DOS networks simultaneously. Most DOS LANS servers are only a File Server and Print Server. 10) Excellent data security. UNIX brings complete and well- tested security mechanisms with it. You can choose to make your data as available, or as protected as you like. Plus, UNIX's design almost eliminates the possibility of a serious virus. Unlike in DOS, only by getting super user privileges from a system administrator can someone have the system access they need to do real damage. 11) Superb application development system. Utilities, tools, source code control, make, linking, etc. are readily available in the UNIX development environment. In fact, most of the aids that you have to buy separately for DOS, already come with your UNIX system. If you have a utility in DOS that you absolutely need, generally there are UNIX versions of them or similar add-ons available. 12) UNIX is very stable. UNIX has been around for many years. The smooth integration of UNIX's features and its advanced capabilities (i.e., true multithreading) simply overshadow the "not there yet" growing pains of NT and OS/2. Destroying the Myth: Isn't UNIX Hard? Do not be deceived by the common perception that UNIX is hard. If you have learned to use DOS, then you know almost everything you need to know to use UNIX. The reasons that people have traditionally thought that UNIX is hard have very little basis in fact. We will dispel 5 of these myths right here. 1) Aren't there a hundred different UNIX's? No. Among the 100 or so versions of UNIX, there are actually only 3 major versions. Most are merely name changes of one of the 3 major ones with a few minor additions. Even the 3 major ones are so alike that moving from one to the other is rather trivial from a user's perspective (not really much different from one another than MS-DOS, IBM DOS, Compaq DOS, and DR DOS). 2) Aren't there hundreds of new commands I'll have to learn? Yes, and no. There are hundreds of UNIX commands which is one of the things that makes it so powerful. UNIX could be hard if you tried to learn everything it has to offer all at once. But then so can DOS. Keep in mind that when you first learned DOS, there were about 20 basic commands that you needed to understand, and the rest could be looked up and learned as needed. It is the same with UNIX. In fact, each command that you learned in DOS actually has a direct parallel in UNIX. Using FlagShip should not require more than these 20 commands. You could even write a very short batch file to enable you to use the same DOS commands you are already familiar with (a reasonably priced utility on the market already does this). It is comforting when you think about it ... if you need the power it's there; and if not, then you can just safely ignore it. 3) Doesn't UNIX Require expensive machines or workstations? No. UNIX is available to run very well on machines of all levels. For example, SCO UNIX does fine on an Intel or AMD 386/40 with 4MB of RAM, and 120MB of hard disk. As the requirements grow, you can add additional hardware or upgrade machines without changing your code. 4) Do I really need to know UNIX inside and out to get started? Installation usually involves copying software from tape, establishing a few user logins, and a system name. Depending on the UNIX vendor you choose, installation may be entirely menu-driven. SCO is a good one, and is the reference system on which we do our writing, testing, and beta testing. FlagShip documentation provides very clear guidelines on what you have to do to get your CA-Clipper applications running effectively on UNIX. 5) Does moving Clipper applications to FlagShip running under UNIX take a lot of time, effort, and education? The move is quick and painless. Just follow these 5 easy steps: Step 1: Install FlagShip on your UNIX machine. This could be the same 386 or 486 you use for your DOS development. Step 2: Copy your Clipper or other XBase source files to floppies (Another way is simply to have the Unix box connected via LAN or Serial port and copy the files to a directory on the Unix box). Step 3: Run the FlagShip supplied FSload utility. FSload imports the files into the current directory and adapts them to the UNIX environment for processing (Replaces CR/LF at ends of lines with LF, and Ctrl-Z from end of files this is true of .prg, and .frm files only, the remainder stay as is). Step 4) Compile the code in a single step with the FlagShip command main.prg (where main.prg, or any name you give it, is the main entry routine to your programs). Step 5) Run the Executable and your program is converted. You now have a UNIX XBase application. Continue developing in DOS in Clipper or save conversion time and increase productivity by developing in UNIX on FlagShip. You may still move your files back to DOS, or even maintain common source code for both environments. IMPORTANT FACT: We're not saying throw away your investment in DOS and become a UNIX guru. On the contrary, we're saying you can continue to work in DOS and add UNIX to your repertoire. This gives you cross- platform compatibility, and a whole new group of potential customers. "Ok," you say, "there must be more to it than that. What are the pitfalls that I am likely to run into?" In answer to this question, let's focus on the differences between FlagShip and Clipper. 1) FlagShip runs on Unix, about 50 different versions. Clipper runs on DOS and Microsoft Windows in character mode, and with the appropriate add on libraries under Microsoft Windows in Graphical mode. What this means is that applications and products that you have already created with, or for Clipper, may now be made available to a much wider audience. In the Unix arena there is demand for FlagShip for the same reasons that the DOS world had such a demand for Clipper a few years back. It is a software machine that allows you to crank out royalty-free code quite easily. Unix owners will pay more for your product than DOS people would have, and still end up with a better price per seat. Often you can ask as much as ten times the price you sold for in the DOS arena for the same multi-user capable product. The buyer will still be getting a good deal because he installs it on one machine, and then connects a large number of users on very inexpensive terminals. A Unix box supporting 20 users can be set up for a fraction of the price that an equivalent sized Novell network would cost. A 486/33 with $250 terminals can easily support 20 or more users with SCO or other Intel based Unix. Am I saying this will replace MS-Windows machines and DOS networks? No, Way! It integrates with them. But what it does do, is allow the approximately 75% of computer users that have no need for a Windows based machine to still have computer support inexpensively on dumb terminals with nice character based user interfaces. The users in the same company that do need Windows applications can have them while simultaneously being attached to the same UNIX machine using it as a network server. Mix & Match; use the best tool for the job in each specific case. Data Bases are best run on a server, not on an individual station. FlagShip allows connecting a Unix box to a DOS network as an applications server, and for each PC to have a window open to the application running on the Unix box. This allows for substantial performance increases for your Clipper applications. It also allows scalability of the applications server from small hardware to large powerful hardware without software changes. Unix already allows Multi-processing, Multi-tasking, Multi- threading, Multi-user and a 2GB RAM memory limit. Unix boxes (on a standard PC) can have a single 386/sx in them. Without changing your applications (not even recompiling) you can scale to multiple pentiums with super fast disk access.... all you have to do is change out the hardware, and re-deploy the old hardware somewhere else (as a Windows or DOS machine?). There is no wasting of valuable hardware. This takes the idea of Advantage XBase server a step further!! Please feel free to grill me on this when I come present to your user Group. 2) FlagShip is a full implementation of Clipper 5.2. However, it's API, ErrorSys, and RDD interfaces differ a little. Programs that make use of these areas of Clipper may require some changes to work with FlagShip. The FlagShip Source code debugger, and FlagShip indexes are also different, but this has no effect on your program. All other areas of FlagShip are virtually identical to Clipper. So much so that people use Clipper manuals with FlagShip, and vica-versa. The Precompiler, TBrowse, TBcolumn, code blocks, macros, and everything else you expect from Clipper are here, and identical in function. This includes royalty free distribution. You use FlagShip just the same way that you have always used Clipper, whether you have Clipper or not. Here are a couple of quotes from users supporting this statement. One of them is from a member of the New Jersey Clipper User's Group. "We learned a lot in the past 6 months about porting our Clipper software package to Unix, but we had been unable to get a version ready for our client until now. We are thrilled with FlagShip. We have had FlagShip for less than a week, and we have a Unix 'beta' ready to deliver to our client" Steve Rosenstein, Figtree Consulting about a Bell Atlantic project. "I had been putting in 120 hour weeks for the past 14 weeks using another product with great difficulty. We received FlagShip on Thursday, and by Friday of the same week we had completed the compiling of two major applications without any trouble at all!! FlagShip is a great product" Mark Blomberg, C.R. Anthony's. There are more testimonials, but I will not go into them here. Note that in both these cases FlagShip was viewed as a porting tool for an existing project. FlagShip can certainly be used this way, and there are continually more and larger clients insisting that the code you sell them should run on Unix. But FlagShip is much more than this. Porting is only a by-product of what FlagShip really is. FlagShip is a productive language that allows YOU to leverage your skills in an otherwise unfamiliar but profitable environment. FlagShip is also a great 4GL which will soon begin to be adopted by the Unix community (currently not Clipper programmers). 3) FlagShip compiled code on SCO Unix on a 486/66 DX2, benchmarked against Clipper 5.2c/DOS 5.0 on the exact same hardware is from 2 to 80 times faster than Clipper in multi-user mode (Using ansi.sys screen driver, and opening files in sharable mode). The main reasons for this is the true 32 bit nature of Unix, and the fact that FlagShip creates a true Executable rather than using "p" code. 4) FlagShip creates "C" code from your Clipper code instead of creating "p" code. We recommend that you NOT touch the created intermediate code, although it IS possible for you to get at it, and modify it. Modifying the intermediate code is not a good idea because, unless you take special steps, you may then no longer maintain the Clipper source code without wiping out your "C" code changes. We have two better ways of handling this. a) FlagShip allows you to use the Clipper Extend System to add "C" code objects as you do in Clipper itself, and b) FlagShip allows you to use two new precompiler statements that allow embedding of C code within your Clipper/FlagShip code. #BeginInlineC, and #EndInlineC. Use these, and put "C" code in between them. These ways you can maintain Clipper/FlagShip code, and use "C" code when and where you want it without fear of it being overwritten by a compile. 6) FlagShip is a product of multisoft GmbH, Germany, and is independently developed from CA/Clipper. There are no copyright or patent infringements. Computer Associates helps WorkGroup Solutions, Inc., the exclusive North American distributor to promote and market FlagShip, and WGS in turn helps CA to promote and market Clipper. 7) FlagShip is NOT a replacement or upgrade to CA/Clipper. It is effectively a cross-platform version of it. It gains the strengths of the Unix platform and market, without losing cross-platform source compatibility. When VO gets here you will still want to seriously consider FlagShip. VO has no bearing on the market you can address with FlagShip for some time to come, if ever. You will want to consider, and probably be involved in both markets VO/Windows & FlagShip/Unix. 8) FlagShip has added a number of commands to take advantage of the new Unix environment, and make it easy to create DOS/Unix portable source code. Among them is a variable that is defined for the precompiler. You may use #ifdef FlagShip [Unix/FlagShip specific code] else [DOS/Clipper Specific code] #endif. There are not very many areas where this is needed; however, it is sure handy when you do need it. 9) FlagShip can do anything that Clipper can; however, you can sometimes inadvertently limit yourself by the hardware that you choose. Terminals for Unix, or terminal emulation software packages do not implement the ALT key. Many have very few Function keys, or do not allow shifted or control function key combinations. Many terminals have 24 display lines rather than 25. Most terminals do not display color. Unix needs some of the control key combinations for it's own purposes. All of these things may or may not affect how you have written your software. We like the SCO ANSI color console emulation, it supports all function keys, color, 25 line display, ANSI line draw characters and is very well standardized. It can be used on any kind of Unix system. You can buy terminals, and terminal emulation software for PCs that do a good job of SCO ANSI. FlagShip also has included terminal description tables (with many predefined terminals) so that your software will automatically adapt to work with any kind of terminal without case statements, or if/then clauses. It supports many kinds of terminals simultaneously (Within the limits of what the hardware can do) based on an environment variable that is set before starting your application. You may even modify existing or add new types of terminals to these tables. 10) The Clipper market as we have known it is ending; sales have slowed down dramatically in the US. FlagShip, however, is at the beginning of its market and can bring new life to the Clipper market as it grows. As new people adopt FlagShip for Unix (Creating a market for your applications and tools), they also buy Clipper for DOS because they can send people home with inexpensive PC's to create code. This code can then be moved to the character oriented UNIX systems. Many FlagShip buyers have been Unix people looking for a good Character oriented development environment. They sometimes first buy CA/Clipper to check out the language, and then buy FlagShip. Often they buy FlagShip first, either way they continue to use the language on both platforms. 11) I have left the biggest issue for last. FlagShip's biggest stumbling block in the eyes of existing Clipper programmers, is the lack a particular third-party tool they rely on. There are a number of solutions to this TEMPORARY delimma. If you have an urgent need to convert a Clipper product to Unix, we have developed a recommended methodology to implement missing third party functionality. It has been successfully used by many people, including WGS' own porting labs with products such as the "Champion Accounting System", "SBT Accounting Software", "Accounting for Clipper", "Bandit" and others. This methodology is presented in the following steps A through L A) Call the Third Party Library manufacturer to ask if they have a FlagShip/Unix version ready. If they do not, ask when they will, and insist on being put on a list to be notified when they do. Also tell them that WorkGroup Solutions is helping Third party People port their products. We, together with the Zac catalog, will help with both porting and marketing of the converted product, to our existing user base, and the FlagShip market as a whole. B) If they do have a FlagShip/Unix version available, buy it. Many already have FlagShip versions; more are working on it. C) If they do not have a FlagShip/Unix version, call WorkGroup Solutions, and the Zac Catalog. Give both of us the name of the manufacturer, and what they said. We maintain a list of who we need to encourage. If demand for a particular product is very high, and the manufacturer refuses to co-operate.... We will find a way to provide equivalent functionality. If the above actions do not work, you still have not lost anything. It will just take a little more work. At first thought, it seems like you have to have all those fancy third party libraries to move your Clipper program to Unix. This is only partially true. We have ported a number of applications that used Third party libraries, without having the libraries for Unix. Here are some more steps we take in this case D) Compile the Code with FlagShip. It will not link, but it will tell you what the missing symbols are when it tries to link. Create UDF (User Defined Functions) for each of the missing functions. These UDF's contain nothing useful, but fool the linker into thinking that the missing function in fact exists. Link again; it may now find more missing functions. Again add UDF's; continue this cycle until your entire program compiles, and links (An Executable is created.). The program obviously won't run at this point, but... E) With your UDF's you now have a complete list of all third party functions that you used. Look each of them up and know what they do. Most people own many libraries, and thousands of functions. Very few people however use more than a handful of those functions. F) Is Clipper source available for these functions? If so, no problem, FlagShip should handle it fine. Put the appropriate source in the UDFs. Grumpfish works, as do other Clipper Source third party libraries. G) Look at Clipper Tools. (You got it with your 5.2 upgrade didn't you?) Find out if those functions have equivalents there (most do); if they are there, order a copy of FS2 Tools which is compatible to Clipper Tools in the same way that FlagShip is compatible to Clipper. (This includes many string manipulations, Window commands, Serial Interface utilities and much more. H) Look in the NanForum libraries and see if the functionality you want appears there. If so, call WorkGroup Solutions about the FlagShip conversions for the NanForum Libraries I) The function may simply be something cosmetic that can easily be abandoned, and will not materially affect your program by being missing. If so, abandon it. Mouse functions, and Shadow box are examples of this, as neither applies on a character based, monochrome terminal. Most people have most of their third party issues covered already by the time they get to this stage in the process. However, there are a few more issues; they get a little more difficult at this point. J) If the Third party function is written in "C" and source code is available, it may be easy to use it in Unix or hard. What makes the difference is whether or not they use DOS Specific "C", or ANSI "C". Unix "C" is a superset of ANSI "C". DOS specific "C" uses directly Hardware expected on a PC, such as Video Memory, I/O Addresses, BIOS Calls and other such issues. These would have to be fixed before it could be expected to work on Unix. K) A problem may occur when the Third Party function is written in Assembler whether source is available or not, or in "C" with the source being unavailable. If one of the above steps does not resolve the issue, then it becomes more difficult. However all is not lost. Since very few issues get to this stage, WorkGroup Solutions is willing to help. L) Forward a copy of the manual pages for the functions you must have. WGS will quote a price to reproduce this function for you if we cannot get the third party vendor's co-operation in porting their function. Soon the whole methodology presented here to replace third party libraries will no longer be necessary. Why? Let me quote from a letter recently mailed by Len Dozois of the Zac Catalog encouraging the porting of third party tools. Len sells more Clipper product than anyone else; he knows a good thing when he sees it. He also pulls a lot of weight with the manufacturers of these products. Len and I have just concluded a contract that allows a Zac Tools catalog for FlagShip to be created. If you are a third party product developer, and want your products to listed in this catalog, I recommend you move quickly. There are more Unix programmers likely to adopt FlagShip/Clipper in North America alone than Clipper programmers presently in the entire world. FlagShip could easily become their 4GL of choice for exactly the same reasons that Clipper became yours a number of years ago. Those who do not move to adapt to Unix/FlagShip will not only miss out on the wild profitability of this market, but are likely see their niche taken by someone else who does move. Quote from Len: "But there's a problem, No Third party tools. Yep, as rich and powerful as FlagShip is, it still lacks the very same features that allowed us to make a fortune when Clipper was King. With very little effort on your part, you can sell your tools to the Unix market at many times your current price. We'll help you all the way. If you are already into Unix, you can do the conversion yourself. If not, we'll step in. Zachary software has two Unix/Clipper specialists, and the folks at WorkGroup Solutions have several more. One of your companies will handle the conversion for a reasonable fee, and give you documentation changes for your manuals, if any are needed. How hard is this? Well, the Grumpfish Library converted in 4 minutes! Zachary - The Software machine took 2 days. Is it worth the effort? Yes! We'll be selling Zachary to the Unix world for $800 more than our current price and they'll think it is cheap! Unix developers are used to spending thousands of dollars for their tools and that's not including expensive run-time and licensing fees which you shouldn't have (It'll make you unique in the marketplace). A ready made Market for YOU. Don't even worry about how you are going to sell your products into the Unix world. The ZAC Catalog Of FlagShip Only Tools will do that for you. Yes -- everything that makes the Clipper version of the ZAC Catalog so powerful is being ported over to UNIX along with your tools. Entering this lucrative and huge market will be a no-brainer for you. We'll handle all of the marketing. No other reseller will be able to respond to this opportunity as quickly or as effectively as the ZAC Catalog." With all of the advantages of Unix & FlagShip, an entirely new market, and major players jumping in with both feet... What are you waiting for??? Jump on board... or be left standing at the dock wishing that you had. For further information about FlagShip, or more information on how easy and profitable UNIX can be for you, please contact: WorkGroup Solutions, Inc. P.O. Box 460190 Aurora, CO 80046-0190 CompuServe 71324,3134 Internet wgs@gcs.com Tel:303-699-7470 Fax:303-699-2793