Btrieve® Spring April-June 1994 Developer’s Journal Vol. II No. 2 THE INDEPENDENT SOURCE OF NEWS AND INFORMATION FOR DEVELOPERS AND USERS

partners to fulfill complementary needs -BTI Agreement Finalized defined by our customers. New Products Already Under Development “We are excited about the Austin, Texas On May 9, 1994, Btrieve is fully equipped to support opportunity to work with Novell and to Technologies, Inc. announced that it has customers by providing powerful data unlock the full potential of these finalized the agreement with Novell, Inc. management tools. Our strong leadership products,” said Ron Harris, to acquire Novell’s database product line, commitment to this partnership and this president and chief executive officer, including Btrieve, NetWare SQL, XQL, technology ensures a win-win situation for Btrieve Technologies, Inc. “The many and Xtrieve PLUS. Under the terms of the Novell, Btrieve Technologies, and the thousands of Btrieve and NetWare SQL agreement, the transfer of all customers and partners relying on the developers can be assured that this development, support, and marketing Btrieve standard.” partnership will aggressively deliver rights for the Btrieve database product line Btrieve Technologies has improved products and services to ensure will take place immediately. The recruited the key personnel representing our customers’ continued success.” agreement defines a strategic partnership engineering, support, marketing, and sales Btrieve Technologies offers between the two companies, with Novell and is dedicated to aggressively enhancing leading edge information management retaining an equity interest in Btrieve the existing Btrieve and NetWare SQL products, each founded upon the core Technologies, occupying a seat on the database software, as well as adding new database technologies of Btrieve and Btrieve Technologies Board of Directors, products to that offering. With a strategic NetWare SQL. Btrieve, the most widely bundling and shipping the Btrieve emphasis on performance, reliability, used data management system in the database software as a part of NetWare scalability, and multi-platform support, world, provides professional programmers and future Novell products, offering Btrieve Technologies will pursue the ability to write business-critical NetWare SQL and related products on the development, channel, and business SEE AGREEMENT ON PAGE 17 Novell product price list, as well as the commitment to work closely together to ensure Novell’s Processor Independent BDJ Chosen to Replace PDS Bullets NetWare (PIN) group, UNIX OEM’s, and New Technical Corner Section Introduced others are provided with compatible database technology. Nashville, Tenn. Btrieve Developer’s coordinate the new “Technical Corner” “The transfer of the Btrieve data Journal and Btrieve Technologies, Inc. section of BDJ. This new section will management product line from Novell to jointly announced that BDJ will replace include lists of all current versions of their Btrieve Technologies and the related the Novell PDS Bullets publication to database products, the availability and strategic alliance is a significant step in keep Btrieve and NetWare SQL location of all product patches, answers to providing enhanced data management developers and users informed about the most commonly asked technical capabilities to our customers,” said technical issues surrounding Btrieve questions, and official information on new Richard King, executive vice president Technologies’ product line. product development. and general manager NetWare Systems Beginning with the Summer issue “Btrieve Developer’s Journal is Group. “Btrieve Technologies, with its (July through September 1994), Btrieve committed to providing the Btrieve and vision, experience, and specialized focus, Technologies will begin to manage and NetWare SQL community with the latest information on all marketing and technical IN THIS ISSUE aspects of Btrieve Technologies’ product line,” said Scott Smith, Publisher of BDJ. Interview... Btrieve Technologies principals Data Types Explained... Steve “That Btrieve Technologies has agreed to Nancy Woodward, Ron Harris, and Doug Mook looks at more of the ways that fields of data manage the “Technical Corner” section is Woodward talk about the what we might expect as can be packed into Btrieve...... Page 18 not only important for us as an the results of the Novell-BTI agreement...... Page 8 Btrieve Applied... Gary Coombs of organization, but also for the users of Inside Btrieve... Doug Reilly takes us Scientific Atlanta explains why he chose to use Btrieve Technologies’ products who have on a tour of extended Btrieve operations...Page 10 Btrieve for a critical applicaiton...... Page 14 asked for current and up-to-date technical and product information.” Guest Review... Randy Goodhew takes Access Examined... Scott Smith According to Ron Harris, an in depth look at one of the best database reviews Microsoft Access 2.0 as a method to development packages that uses Btrieve..Page 22 examine and manipulate Btrieve data...... Page 25 President and CEO of Btrieve Technologies, “We are excited about the SEE PDS BULLETS, PAGE 3 FreeStyle Report BTI Demonstrates Btrieve ALM at NetWorld+Interop ’94 Austin, Texas Btrieve Technologies, Inc. Harris, President and CEO of Btrieve Writer Supports unveiled an AppWare Loadable Module Technologies, Inc. “Novell’s AppWare (ALM) implementation of Btrieve, the strategy allows us to introduce 5GL Btrieve industry standard data management programmers to the benefits of client-server system, at NetWorld-Interop 94 in Las computing with Btrieve that thousands of Nashville, Tenn. CrystalLogic, Inc. has just Vegas. 3GL and 4GL programmers currently released a new version of their DOS-based The Btrieve ALM provides a link enjoy. The combination of Btrieve and FreeStyle Report Writer. between applications developed using NetWare SQL provides an effective While FreeStyle supports several Novell’s Visual AppBuilder and the database hierarchy for information common database formats including Btrieve, management applications, including new the company claims that their various Btrieve data management engine. Visual methods of accessing Btrieve makes the AppBuilder is a high-level programming applications developed using Visual product quite unique. Although FreeStyle can tool enabling developers to graphically AppBuilder and Btrieve ALM.” access Btrieve data through the standard construct full-featured applications by “The availability of a Btrieve Btrieve TSR, it can also read Btrieve version linking icons representing prebuilt ALM is a critical addition to the AppWare 5.x files directly without the TSR, and can ALM’s, eliminating the need to write suite of software. It provides graphical also read Btrieve BUTIL -SAVE format text hundreds of lines of code. access to the industry’s leading data files. “Btrieve Technologies is management system, making this powerful FreeStyle uses its own data committed to working with industry technology available to a broader number definition format called FDF’s, or “File leaders to create advanced development of developers than ever before,” said Joe Definition Formats.” For users who already environments that are fully integrated with Firmage, Vice President, Novell AppWare have existing standard Btrieve DDF’s, Btrieve and NetWare SQL,” said Ron Systems Group.² however, FreeStyle includes the ability to import DDF table definitions. The system’s menu options allow Revised Btrieve Book Introduced you to define the structure of your Btrieve NETWARE BTRIEVE VERSION 6.X COVERED IN DETAIL files, design reports using the WYSIWYG layout screen, choose record selection criteria, Woodland Hills, Calif. Golden West covered in the book is also available. record order, and individual expressions, and Products International has introduced The The book was authored by define data groups. Other options include the Illustrated Guide to NetWare Btrieve 6.x former Novell employee Richard Trocino, ability to cut, copy, and paste data fields which is designed for programmers, business analyst for Novell’s Austin site, directly to and from multiple reports, and the database administrators, and managers and the book was edited by Kirk menu and dialog driven interface includes who use NetWare Btrieve 6.x. Humphries, the former editor of PDS complete context sensitive help. FreeStyle supports all standard Btrieve key data types. The book focuses on topics Bullets, Novell’s developer support FreeStyle version 2.10 carries a unique to Btrieve version 6.x. Many publication. suggested retail price of $149.95. Contact illustrations and figures are included, as The book costs $39.95 and the CrystalLogic at (615) 391-9100 or FAX: well as explanations of all Btrieve utility disk is $24.95. Call the book’s (615) 391-9997. ² operations with language example distributor, MIDI America, of Marietta, programs. A utility diskette with materials Georgia, at (404) 565-4684. ²

Btrieve Developer’s Journal How To Contact Btrieve Developer's Journal: You may address news items, new product announcements, tips, advice, Btrieve Developer’s Journal (ISSN 1071-7463) is published comments, complaints, praise, or any other correspondence to: quarterly by Smithware, Inc. Btrieve Developer's Journal, Post Office Box 50002, 713 Lynnwood Blvd., Nashville, Tennessee 37205. Subscriptions: $49/year inside the United States, $79/year Telephone: (615) 860-3500 outside the United States. Facsimile: (615) 868-5397 Back Issues: Back issues of Btrieve Developer's Journal are Postmaster: First Class postage paid at Nashville, Tennessee. available for $20.00 per issue. Contact Cindi Gourley at (615) Send address corrections to BDJ, Circulation Control, PO Box 860-3500 for additional information. 50002, Nashville, TN 37205. Staff: Publisher: Scott Smith Copyright 1994 by Smithware, Inc. All rights reserved. Editor: Steve Mook Contributors: Doug Reilly, Gary Coombs, Randy Goodhew No part of this publication may be reproduced in any form by any means Design Consultant: Tania Owen Studio without permission in writing from the publisher. Photographers: Clark Thomas, Gary Russ Btrieve and XQL are registered trademarks and NetWare SQL, NetWare Illustrator: Albrecht Dürer Btrieve, and Xtrieve Plus are trademarks of Btrieve Technologies, Inc. Administration: Cindi Gourley Smithware is a trademark of Smithware, Inc. Editorial Director: Rans Coyote All other names are the trademark of their respective manufacturers.

2 Btrieve Developer's Journal Vol. II, No. 2 April-June 1994 (800) 828-7438 or (615) 860-3500 FAX: (615) 868-5397 of the comprehensive User’s Guides. New Version of Smithware’s Registered users of Visual Controls for Btrieve Version 1.x may upgrade to the Controls for Btrieve Ready to Ship new Controls for Btrieve Version 2.0 for $99.00. DDF Builder for Windows DDF BUILDER FOR WINDOWS REVISED TOO... Version 2.0 carries a suggested retail price Madison, Tenn. Smithware, Inc. controls to be bound across forms, that of $129.95 and registered users of version announced a major revision of their third party controls such as 3-D text boxes 1.x may upgrade for $79.00. Smithware Controls for Btrieve and DDF Builder for and buttons can be bound to Btrieve via may be contacted at (615) 860-3500. ² Windows products. Formerly called Visual our controls, and that we allow multiple Controls for Btrieve, Controls for Btrieve Btrieve controls to simultaneously access Version 2.0 is a set of VBX custom DDF’s located in different directories,” controls for Microsoft’s Visual Basic for according to Henry Savage, Product PDS Bullets From page 1 Windows that allow application Development Coordinator for Smithware. developers, as well as nontechnical “The back end of DDF Builder has really opportunity, and committed to the application users, to develop sophisticated been improved. We have implemented our challenge of building a world-class Btrieve applications in Windows for data own method of creating and maintaining database company, and consider our manipulation and analysis. DDF’s, while still strictly adhering to the relationship with Btrieve Developer’s DDF Builder for Windows has standard DDF guideline. We have gained Journal to be a key element for ensuring long been a widely used method for better compatibility to the DDF the availability of timely and relevant creating Btrieve Data Dictionary Files to guidelines, better performance, and information. In addition to managing the allow report writers and other data significantly enhanced our error reporting “Technical Corner” section of BDJ, we analysis tools to access and analyze capabilities because of these changes.” will work with its staff to implement Btrieve data. Controls for Btrieve Version 2.0 frequent readership surveys that will Controls for Btrieve, which was has suggested retail price of $249.95 and influence our future operation and the recipient of Visual Basic Programmers includes the set of 10 custom controls for direction.” Journal’s “Readers’ Choice Award” for Visual Basic for Windows, DDF Builder BDJ is published quarterly by 1994, and DDF Builder have been for Windows, the 350-page reference book Smithware, Inc. Subscriptions are $49/ enhanced following a year of user input by MIDI America called The Illustrated year for domestic delivery and $79/year and suggestions. Guide to Btrieve, and all required DLL’s. for delivery outside the United States. For “The most significant changes in Sample code and example programs are more information, call Cindi Gourley at Controls 2.0 are that we now allow our included as well as On-Line Help versions (800) 828-7438 or (615) 860-3500.²

available for purchase and immediate Snow Releases Report Writer for Windows shipment.” Access to Btrieve Given High Marks To highlight their commitment to Btrieve developers, Snow is shipping a Clearwater, Florida In a move that will Windows, OS/2, Macintosh, UNIX, and conversion utility that allows the use of certainly increase competition in the VMS. standard Btrieve DDF’s in the creation of Windows report writer arena, Snow “There have been some Snow’s internal data dictionary format. Software International has recently misconceptions in the marketplace about Single user price for the products announced that Snow Software our strength in the GUI product line in the Snow Report Writer line range from Distributing has released the Snow Report because we have been selling our $395 to $695, and network versions are Writer for Windows to work with Btrieve character based product now for ten available from $595 to $995. Contact files. years,” said Brian Rakestraw, General Snow Software, located in Clearwater In 1984, Snow Development Manager of Snow Distributing. “When in Florida, at (813) 784-8899. ² became the first company to offer a stand- fact, Snow Development is light years alone report writer for the Personal ahead in the report writer field in GUI News Brief Computer. According to company development.” Solomon Software of Findlay, OH is officials, over the past several years, they With this announcement, Snow shipping Solomon III for Btrieve, “the have moved into the on-going Distributing recognizes their mission of first accounting package designed to take development of the most mature GUI distributing the Snow Report Writer for full advantage of the Btrieve version 6.10 report writer product on the market. Their Windows to all Btrieve developers and NLM.” Product features include an GUI report writer development began with users. “We have just completed special upgrade path to Windows and SQL via the the Snow Report Writer for the Macintosh editions of the Snow Report Writer for company’s Solomon IV for Windows in 1990. Windows for both RealWorld and Great which uses NetWare SQL, and available In July of 1993, Snow ported the Plains accounting systems, both of which data dictionary files (DDF’s) to provide GUI product from the Macintosh to use Btrieve as their underlying database. support for third-party development tools. Windows. The Snow Report Writer These editions come with complete data For more information contact Solomon Family now runs on DOS, LAN, dictionary definitions and are now Software, (419) 424-0422.

(800) 828-7438 or (615) 860-3500 FAX: (615) 868-5397 Vol. II, No. 2 April-June 1994 Btrieve Developer's Journal The SourceBook Catalog of Products to be Published News Briefs Nashville, Tenn.—Smithware, Inc., those from the data manipulation market, publisher of Btrieve Developer’s Journal, including development tools and utilities, Magic Software Enterprises is has announced the introduction of The report writers, and data analysis tools, as currently shipping the Magic 5.5, the SourceBook catalog of Btrieve and well as those from the data gathering latest version of their database NetWare SQL products. Through an market including companies with Btrieve- application development software. agreement with Btrieve Technologies, based accounting systems, personal Magic excels in portability, running Inc., the catalog of Btrieve-based information managers, scheduling in DOS, Unix, VMS, and CTOS, and applications, tools, and utilities will be systems, and all of the many horizontal in rapid application development, placed inside each database product and vertical market Btrieve-based using a table-oriented application package that is shipped, both directly to packages that are available. design format to define data, screens, users and through the reseller channel. There will be two sections of The procedures, reports, and menus. The “For years now, we have wanted SourceBook. First, for those companies resulting applications conform to the some way to get information about our and individuals who wish to obtain character-based Common User products to those who need them the most: complete coverage of their products or Interface (CUA) specifications. A Btrieve developers,” according to Steve services, there will be three defined Windows version is expected soon. Mook, Vice President of Development for formats for advertisements: One full page Though Magic uses Btrieve as its Smithware, Inc. “Although we have been with a color screen capture or product native file format, support for included in many Microsoft product shot, one full page with text only, and a NetWare SQL was not listed among packages for a long time, when Btrieve one-half page with text only. supported database servers. Contact was a Novell product, it simply was not The second section of The Magic Software at (714) 250-1718. possible to be included with Btrieve. SourceBook will be a listing of all known Btrieve Technologies has demonstrated Btrieve related products and services. This Campbell Services of Southfield, MI, that they really are committed to section will be free of charge. has developed OnTime Enterprise for supporting the independent software For more information on NetWare, a true client/server vendor by allowing us to have an advertising in The SourceBook, call enterprise-wide group scheduling and immediate audience with users.” Carolyn Lighty, Advertising Manager, at messaging package which is The SourceBook will be of (800) 685-2403 or (201) 712-0044. To implemented as NLM’s on Novell interest to many different companies and have your product or service included in NetWare 3.11 and 4.0. individuals because of the diversity of the the free listings section of The Contact Campbell Services potential audience. Products and services SourceBook, contact Cindi Gourley at at (810) 559-5955. listed in The SourceBook will include (800) 828-7438 or (615) 860-3500. ² Two Great Btrieve Books! The Illustrated Guide to Btrieve The Illustrated Guide to Btrieve for 5.x Users... for 6.x Users... Introduction to Btrieve version 5.x Upgrading to NetWare Btrieve version 6.x Tools for Btrieve Programming NetWare Btrieve version 6.x Features Interfacing with Btrieve for DOS, Windows, OS/2 Continuous Operations and Version Control Basic and advanced file access techniques Indexing, Integrity Processing, Caching Btrieve Operation Codes Transaction Processing, Chuncking, Record Btrieve Extended Key Types Grouping Source code for COBOL, BASIC, Turbo Pascal, C Multi-user Programming, Writing Btrieve NLM’s Operation code Quick Reference Table Flow of Control, NetWare SQL

The Illustrated Guide to Btrieve 5.x...... $29.95 The Illustrated Guide to Btrieve 6.x...... $39.95 Btrieve 5.x Tutorial Diskette...... $19.95 Btrieve 6.x Utility Diskette...... $24.95 (Include $5.00 Shipping/Handling per book, $2.00 for each additional book)

To order by phone, call (404) 565-4684 ˜ Major Credit Cards Accepted ˜ or, send Check or Money Order to: MIDI America, Inc. 896 Fairfield Drive N.E. Marietta, GA 30068 (404) 565-4684

4 Btrieve Developer's Journal Vol. II, No. 2 April-June 1994 (800) 828-7438 or (615) 860-3500 FAX: (615) 868-5397 Doug Woodward Presents Forums on IVIS Ports Mainframe Btrieve at BrainShare CICS to NetWare Btrieve New Releases, Btrieve Architecture and Future Plans Discussed Downsizing System Adopted by General Provo, Utah. Novell’s annual support currently under development, Electric BrainShare developers conference, including Windows NT, Chicago, UNIX, Raleigh, North Carolina In the current attended by developers, resellers, and and Macintosh. These new releases take business climate, the need to cut costs is Certified NetWare Engineers (CNE’s) advantage of a common 32-bit code base acute. Equipment and services for large included two seminars on database derived from the Btrieve NLM, improved mainframe MIS operations can take a big products this year. caching, a common API, global file bite out of the bottom line, and many A seminar entitled “Inside sharing support, and background I/O companies are looking for a way to port Btrieve File Structures” gave developers a operations. In addition, the 6.15 Btrieve their information systems to less rare glance at the inner workings of drivers are designed to be backward- expensive platforms. IVIS International Btrieve version 6, the purpose of the compatible with version 5.x files and has positioned itself to take advantage of seminar being to help developers design applications. this growing market segment. IVIS more efficient files and by giving them a The seminar also included provides software and consulting services better understanding of the products’ discussion of SQL product enhancements to businesses wishing to port mission- features and of factors affecting including Windows and DOS environment critical applications from IBM Customer performance. The seminar covered the support. Information Control System (CICS) changes between version 5 and 6 file Doug Woodward, who presented environments to Novell NetWare local formats, including details such as File both sessions, said, “Of course other area networks. Maps, File Control Records, Page platforms were talked about, especially “We have written an API which Allocation Tables, Page ID’s, Data and NT,” and that the future of the cost base allows us to take mainframe systems, Index pages, and new Key Allocation optimizer for SQL, and development work small or large, and port them to a Novell Tables. Version differences in accessing, on replication and stored procedures were network deploying Novell’s Btrieve NLM. updating, and ensuring the integrity of also discussed. “ODBC came up, and We do this with no source code changes. Btrieve files were also covered. seems to be getting a lot of use,” he added. It works for most CICS VSAM on-line The second seminar, “New “I expect to continue our and batch mainframe environments,” says Directions for Btrieve Database Products,” presence at BrainShare,” said Mr. Jeffrey S. Zajac, Manager of Emerging involved discussion and distribution of Woodward, “but only time will tell. Technologies at IVIS. In addition, IVIS pre-release copies of the new client-based Additionally, BTI will expand to other Btrieve version 6.15 engines for DOS and vendor’s conferences, and we plan to host SEE IVIS ON PAGE 24 Windows, and discussion of new platform Btrieve specific conferences in the future.”² Novell to Replace NetWire. Staff with Volunteer Sysops Provo, Utah Novell management has directly to Novell support personnel. In see us go to a more structured support decided to pull its technical support return for their unpaid service, sysops program where we have things like our personnel off its CompuServe NetWire would receive a sponsored CompuServe own CompuServe forum, and our own forums, replacing them with volunteer account, copies of the Novell products bulletin board; we may even employ a sysops who will monitor the forums and they are supporting, and other perks. fee-based program over time, but that screen technical support requests. How Novell personnel will continue to monitor would be in order to keep the level of this move will affect the last remaining the message forums on an irregular basis, support at the highest quality possible.”² free support option for Novell customers company officials say. Also, the libraries remains to be seen. and patch files will continue to be News Brief A NetWire announcement dated maintained by Novell personnel. Computer Concepts Corporation of January 28, reads in part, “Novell NetWire Changes in support policy at Bohemia, NY, released the Windows Management is looking for technical Novell no longer directly affect the former version of their d.b.Express data people who are interested in using their Novell database products, recently query application late last year. The skills to respond to questions posted in the transferred to Btrieve Technologies, Inc. program gives users flexible, Novell Forums (NetWire) on Btrieve Technologies officials do not intuitive, read-only access to data CompuServe. We currently have foresee any immediate change in the level stored in a number of different ‘Volunteer Sysop’ positions available for of database support provided currently on database formats, including Btrieve individuals who have the time and the Novell Developer Support forum and NetWare SQL, via the Q+E expertise to meet the responsibilities,” (NDEVSUP), at least during the product Software Inc. Q+E Database Library including monitoring the forum at least transition period. According to Ron and ODBC. The product retails for four days per week, and posting an Harris, BTI president and CEO, “they $595. For more information contact average of 75 responses. Sysops would (support engineers) are going to be a lot Computer Concepts Corp. at (800) have the option to route difficult problems more accessible. I think over time, you’ll 210-4209.

(800) 828-7438 or (615) 860-3500 FAX: (615) 868-5397 Vol. II, No. 2 April-June 1994 Btrieve Developer's Journal The First Word... What was your initial reaction to the news that Novell was planning to put its database products back in the control of a smaller company made up of the people who originally developed the products? Enthusiasm? Concern? Excitement? Indifference? Let me tell you about mine. When I first learned in late 1993 that plans were underway to separate the database products from Novell, I was, quite frankly, delighted. Since we have been working closely with Btrieve and Novell for the past six years, I have been acutely aware of both the tremendous benefits and the sometimes frustrating problems created by Novell’s ownership and control of Btrieve and the entire database product line. To grasp fully what this agreement may mean to us as Btrieve and NetWare SQL users, we must look closely at the potential advantages and possible disadvantages of shifting control over the product line to a smaller and more focused company. Btrieve Technologies, Inc. is smaller. I see this as a distinct improvement because BTI can focus much more clearly on where the development tools and database products need to go and how they can best get there. Decisions about product development and marketing not only can be made, but also can come about completely and quickly by those who have an intimate knowledge of, and investment in, the technology. Competition between large and LAN vendors will become a non-issue. BTI will now be in a position to respond quickly when changes come about in operating systems or development platforms that are important to the industry, based on their knowledge of what users require, regardless of any areas of competition that may exist between Novell and those companies. This suggests that we might reasonably expect to see Btrieve and NetWare SQL implemented on such platforms as Windows NT and UNIX in the near future. Photo By Clark Thomas Further, BTI will no longer need to consider the relationships that Novell has with SCOTT A. SMITH, PUBLISHER other database vendors. In order to continue developing partnerships that enhance their core product, NetWare, Novell can continue to build and expand relationships with database vendors who can move their database engines into the NetWare environment, without consideration for potential competition with its own database products. This Novell can do while still maintaining a positive relationship with BTI (remember Novell is one of the major stockholders of BTI and has a seat on the Board of Directors) and continue to support Btrieve and NetWare SQL as the NetWare database standard. But does smaller mean that BTI will be less capable of promoting and supporting the database products? Probably just the opposite. Let’s consider for a moment that since 1990, Novell has not actively marketed Btrieve or NetWare SQL as a product, in part to avoid complicating strategic alliances with other database vendors such as Gupta, Borland, and Oracle. In fact, most of the Certified NetWare Engineers I’ve spoken with have never heard of Btrieve, or have only a vague notion of what it is. Once I had to spell “Btrieve” for a Novell switchboard operator. Yet Btrieve remains today one of the leaders in the development tools market because of its strong reputation with developers. BTI has committed their resources to promoting the database products as what they are — the best and most fault-tolerant data management tools available. But how about support? If you have read our news section in this issue, then you already know that Novell has practically eliminated their NetWire support staff, opting to rely on volunteer sysops on the Novell CompuServe forums to handle support requests. BTI has indicated that it plans to continue direct support for the database product line via CompuServe and possibly through an independent bulletin board system as well. And if you’ve ever tried to get telephone support from Novell, you know it’s a good idea to pack a lunch — almost anything BTI could do would be an improvement. Being a smaller company will certainly allow BTI to communicate better with their customers. It has continually been our experience that Novell has done a rather poor job of getting news about Btrieve and NetWare SQL to their customers. The fact that BTI has chosen to work closely with Btrieve Developer’s Journal as a channel for product information and technical bulletins is important for two reasons: One, BTI plans to keep developers closely informed of product developments, and two, BTI not only has the intention but also has the proven capability to make strategic partnership decisions quickly with other vendors such as Btrieve Developer’s Journal. To be sure, it will require some time before we can fully realize what will be the benefits and complications that will result from the Novell-BTI agreement. So we will wait, and watch, and keep you informed in the pages of Btrieve Developer’s Journal. What was my real reaction to the Novell-BTI agreement... “Enthusiasm?” definitely. “Concern?” a little. “Excitement?” absolutely. “Indifference?” Never!

6 Btrieve Developer's Journal Vol. II, No. 2 April-June 1994 (800) 828-7438 or (615) 860-3500 FAX: (615) 868-5397 Readership Survey... Btrieve has long been a leader in the Database Manager industry for many WE WANT YOUR OPINION reasons... data integrity, scalability, You can help us by keeping Btrieve Technologies, Inc. informed about your views support and leadership from Novell, and on their product line and services. Every response that Btrieve Developer's many other factors. Journal receives is forwarded directly to the management of Btrieve Technologies We are interested in knowing for analysis and review. Choose one of these methods to respond: more about why you or your organization decided to select the Btrieve Database CompuServe: 73173,2731 Manager or NetWare SQL as your method FAX: (615) 868-5397 Voice: (615) 860-3500 of data handling. Mail: BDJ Readership Survey, 1052 Madison Square, Madison, TN 37115

1. Rank each of the following on a scale of 1 to 5, 5 being most important, as to how much each of the following factors influenced your decision to use any of Btrieve Technologies’ products: Capacity for large : •‚ƒ„… Multi-user capabilities: •‚ƒ„… Scalability: •‚ƒ„… Client-server architecture: •‚ƒ„… Novell product: •‚ƒ„… Speed: •‚ƒ„… Features and performance: •‚ƒ„… Referential integrity: •‚ƒ„… Third-party support: •‚ƒ„… Industry standard: •‚ƒ„… Reliability: •‚ƒ„… Transaction processing: •‚ƒ„… Multi-platform: •‚ƒ„… Royalty-free distribution: •‚ƒ„… Other (Describe): ______2. How long have you or your company been using Btrieve or NetWare SQL: •1 year or less ‚2 to 4 years ƒ5 to 7 years „8 to 10 years …Over 10 years 3. Which of the following best describes your industry or service: ™Aerospace ™Computers ™Defense ™Electronics ™Government ™Industrial ™Manufacturing ™Medicine/Helath Care ™Power/Energy ™Telecommunications ™Transportation ™University/Education Other (Describe): ______4. Which of the following best describes your job function: ™MIS/DP/IS Management ™Consultant ™Developer ™Corporate Management ™Systems Engineering/Integration ™Technical Services ™Technology Assessment ™Sales/Marketing Other (Describe): ______(Optional) Name: ______City, State: ______

The Results are in... NetWare SQL based applications. applications? 1-5: 11% 1. On a scale of 1 to 5, 5 being most 6-10: 8% important, rank your views as to the 11-15: 2% In our last issue we asked you importance of the following areas of 16-20: 4% to tell us about where you would like to development: see Btrieve Technologies concentrate 21-25: 1% their development and to what degree DOS Client 6.x: 4.24 26-100: 21% you have deployed applications using OS/2 Client 6.x: 2.54 100 and up: 53% Btrieve. Win Client 6.x: 4.27 The results of our questions Unix Client: 2.32 3. What is your opinion of the decision about your suggestions for Btrieve Win-32 NW Client: 3.11 by Novell to return Btrieve to the Technologies’ product development Win-32 Server: 2.98 control of a smaller company? were clear: bring the client versions of Mac NW Client: 1.65 “Btrieve is a great product that has Btrieve up to version 6.x compatibility. Mac Server: 1.54 been successful for a long time... As Now you know one of the reasons that NW Client is a NetWare NetWare Btrieve the technical and sales people become Btrieve Technologies is introducing the Client for the particular operating platform more independent from Novell, new Windows DLL and DOS EXE: and Server is a version of the Btrieve perhaps they will be able to free You asked for it through BDJ. engine running as a server on the themselves from the bureaucracy that It was also clear that Btrieve platform. has bogged them down.” McAllen, TX maintains a very wide base of “Although it may initially decrease applications and users, since 53% of 2. If you distribute Btrieve-based industry acceptance, the move should survey respondents have more than 100 applications, approximately how many ultimately result in a much better installations of their Btrieve or total installations (sites) do you have of all product.” Salt Lake City, Utah

(800) 828-7438 or (615) 860-3500 FAX: (615) 868-5397 Vol. II, No. 2 April-June 1994 Btrieve Developer's Journal around and build up a very successful and influential business from Interview... them, and I’m excited about that challenge. On April 8, 1994, Btrieve Developer's Journal Publisher, Ron: When we first began Scott Smith and Editor, Steve Mook, traveled to Austin to serious negotiations it talk at length with the three principal players in the new became apparent that Btrieve Technologies, Inc. The edited transcript of that Novell had been meeting with Nancy Woodward, Doug Woodward, and Ron approached by several Harris is presented here. other companies who wanted to buy the database division. It was a Btrieve Developer's Journal: We have all come to know and love highly sought after asset. I Novell as a large, somewhat impersonal network corporation. Who think the thing that really is Btrieve Technologies, Inc.? made it possible was the Nancy Woodward: My position at the new company is chairman.

history that Novell had Photo By Gary Russ Ron Harris will be President and CEO. Doug Woodward will be with Doug and Nancy, NANCY WOODWARD, CHAIRMAN Chief Technology Officer. And we will be bringing over believing that they could spin this off to a private company that approximately 50 employees from Novell. So it’s a lot of the same would have the best interests of the technology and the business people that have worked on the database products for years. In in mind. That was important to Novell because they’re such a fact, there’s a handful of people that were SoftCraft employees large customer of the technology. before we joined Novell. Doug: Another thing to keep in mind is that they still have an Doug Woodward: I think everyone involved with Btrieve ownership in the company. Technologies has a real personal attachment to the products... plus Nancy: Novell’s ownership includes a board seat, so we expect a commitment to the customers who have decided to use them and a close relationship with Novell in the future. Novell is going to to make them better as well. So that’s who we really are... continue to bundle Btrieve and NetWare, so we’ll work together BDJ: Ron, why did you choose to come to work with Btrieve to ensure that they still have a viable Btrieve for NetWare. Technologies? Doug: I think we’ll have a lot of advance information about Ron Harris: Well, I really enjoy it. I guess I’m a little insane, but I Novell’s direction and strategy. There’s a firm partnership just get a big kick out of working with a lot of good people in a there, that’s based not only on Btrieve being bundled as a small environment where you have a lot of control and the NetWare component, but on working together to grow both the bureaucracy is left behind... I think we’ve all experienced the big- network and the database server market. company environment, and there’s just so much more you can BDJ: How committed is Novell with continuing to bundle the accomplish when you have a small team of experienced, Btrieve products with NetWare? committed people. It makes both a challenge and a lot of fun. Nancy: That was the number one rule that Novell did not want BDJ: You’ve known these two (Doug and Nancy) for quite to be broken when we started discussing terms; that they would awhile. continue to have Btrieve for NetWare. So I think it was very Ron: We go back to the late 70’s... important to them. Doug: 1978. Ron: The license is a perpetual and irrevocable license, and that BDJ: So they dragged you into this whole thing? was at Novell’s insistence. It’ll be there. Ron: Kicking and screaming, yes. BDJ: What do you see as the advantages of taking the database BDJ: And Nancy, since your retirement from Novell in 1990, you products back out of Novell? were free to do whatever you wanted. Why did you choose to Doug: You just get to begin thinking and acting like a database return? company instead of like a network company. As a database Nancy: I may be the most insane of the three. But truthfully, I was company, you make sure that you have cross platform support, looking for a small company. Because, like Ron, I think it’s fun, and that you’ve got a strong database offering in both relational it’s exciting to get involved in something you can really have an SQL technology and Btrieve technology. You make sure there impact on. And like Doug I’ve certainly got the ties, not just to the is a premium placed on customer support. I think it will be to customers but to the employees. It was so hard to watch the the advantage of the customers. employees who were focused so hard on the product and their Ron: It’s important that you make sure you are addressing real jobs, and they felt like they just didn’t have any real support from customer problems, that your technology is not simply for the the company for what they were doing. I know they’re a good set benefit of whiz-bang bells and whistles, but that it address a of folks, and I was certainly glad to see an opportunity to change clear need in a differentiated and unique way. We’ll make sure that. But given all that I probably have to say that my single most that we do the market research so that our products, when they driving force is that I think this is an unbelievable business hit the customers hands, really do solve a problem. opportunity waiting for someone to try and capitalize on it. I think BDJ: Is that a significantly radical change from the past? it’ll be a tremendous challenge but really exciting to take this Doug: I think it is, because, as part of Novell, we were driven technology that exists, and the resources that are there, which you more by internal needs, people using the product internally to could almost not even call a business today, and to turn that develop NetWare-specific stuff. Now we can focus more to the

8 Btrieve Developer's Journal Vol. II, No. 2 April-June 1994 (800) 828-7438 or (615) 860-3500 FAX: (615) 868-5397 external people. the tools and services they require. Nancy: We should be able to move faster, communicate better. BDJ: Do you envision SQL as a high-end interface for those We’ll also have a much tighter focus; we’ll be focused on applications, to address that secondary market? database products. We will have the freedom to support Nancy: It can be used as a high-end interface. A lot of developers whichever platform the market demands. So of course NetWare need to use front end tools that require SQL access. The users will remain very important, but we’ll also be looking at other can enhance their application without doing any programming. In platforms. addition, NetWare SQL will be directed at smaller businesses or BDJ: When a platform is revised, will the Btrieve engine for that departments. Its strength will continue to be ease of use, and ease platform be available when the changes occur? of administration. The product we envision can be bundled with Doug: I think you’ll see that. Prior to Novell, whenever a new an application solution that doesn’t require a dedicated platform came on the market, like the original release of OS/2, administrator who’s an expert in the database itself. Instead it’s Btrieve was shipping when it did. You can expect to see Btrieve easily buried in an application solution. Technologies working very closely with platform vendors to Doug: I think you’ll see NetWare SQL taking on a more make sure that technology is available when the platform important role in the future, too. We’re actively upgrading it changes. now. BDJ: When Microsoft introduced MS Access, they were the one Ron: Two weeks ago it just was awarded Byte Magazine’s company that could not distribute the Btrieve DLL with their “Readers Choice Award for Client/Server Databases” for the product. How is that likely to change? fourth straight year. Nancy: We expect to deal with Microsoft as the provider of BDJ: How is downsizing going to affect customer support? important platforms for the industry just like we would any other Ron: It will do nothing but improve support. The reason is that vendor that’s servicing that we’re going to put a premium on getting close to the customer, large customer base. So and close to the customer’s needs. You’re going to have a single obviously we’ll have a number to dial and you’re not going to get a lot of run-around. cooperative relationship You’re going to know who your talking to, you’ll know them by with them. We are looking name. I think over time we may employ a fee-based program, but at Btrieve licensing in that would be in order to keep the level of support at the highest general, particularly in the quality possible. We believe that to be a world-class database area of development tools. company today you’ve got to have world-class products and It’s been vaguely defined world-class support. throughout the years by Doug: As a smaller company the support engineers will be more Novell. In fact, the license of the same team as the development engineers. We should have has changed several times. more direct feedback into engineering than we had previously at We want to focus on the Novell. whole licensing issue, and Nancy: Any large company has to be extremely cautious about how to make that more predictions they might make about when some new release is clear and make it make going to be available or what it will cost. But as a smaller sense. Also to make sure company, we’ll be free to provide a better level of information to

the customers end up with Photo By Gary Russ the customers. the correct paths for support. RON HARRIS, PRESIDENT AND CEO BDJ: You’ve talked about placing a premium on addressing There are customers out there who have Btrieve applications and customers’ needs. How do you plan to go about that? in some cases Btrieve utilities, and no clue what to do with them Ron: We foresee working closely with Btrieve Developers when they have any question or problem. They don’t have a Journal, especially as a manual, and they barely know how to find us, and they have no means of providing relationship with us. So, the entire licensing issue is one that we product information. We’re hope to address very quickly and make it much more structured also working through other and supportable. channels, such as a Doug: I don’t think you’ll see Microsoft treated any differently CompuServe forum, and than anybody else... developer’s conferences. I Nancy: No, we would have no grudge against Microsoft, think we’ll continue to be certainly... present at BrainShare, and Ron: If there’s any bias at all, it would be in the direction of a we’ll also begin having our more strategic relationship. own Btrieve Technologies BDJ: How do you characterize your customers? developer conferences on Nancy: Our traditional strong point is the developer community. an annual basis. We We have focused on developers that use third generation envision one in the U.S., languages, and we’ll continue to focus on their needs. In one in Europe and one in addition, servicing that market brings us another tier of Japan to find out what customers, which is the users, or the consultants, or installers of developers’ interests are,

those applications. So, secondarily, we’re finding ways to service what their needs are from Photo By Gary Russ that customer market, to be open to their needs, and to provide DOUG WOODWARD, CONTINUED ON PAGE 13 CHIEF TECHNICAL OFFICER

(800) 828-7438 or (615) 860-3500 FAX: (615) 868-5397 Vol. II, No. 2 April-June 1994 Btrieve Developer's Journal and then discuss the potential benefits and pitfalls of their use. Inside Btrieve... Extended INSERT’s Extending Yourself: Btrieve’s Extended Using INSERT EXTENDED, Btrieve operation code Operations 40, is by far the easier of the two types of extended operations to implement. This operation can be used to insert multiple records By Douglas J. Reilly, Access Microsystems in a single operation. Due to the overhead inherent in network communications, sending a single, larger block of information is more efficient (in terms of network resources) than sending that One of the buzzwords in the computer industry these same information in some number of smaller blocks. This is the days is actually two words: “Client/Server.” As have many other premise behind INSERT EXTENDED. terms before it, this buzzword has found its way into marketing To use INSERT EXTENDED, simply gather together lingo long before the underlying promise of the technology has any number of records you wish to insert, create a data buffer in been realized. And like so many similar buzzwords turned a format as shown in figure 2. The data buffer has a fixed length marketing phrases, its meaning becomes blurred. header which includes the number of records to be inserted and a Let's be clear: for our purposes here, something uses variable length portion consisting of the record data. The data Client/Server technology when the following are present: buffer length sent to Btrieve must exactly equal the length of the 1. A client process makes a request of a server data buffer. Note that since the buffer length parameter to process. Btrieve is a 2 byte unsigned integer, the largest total size of the 2. A server process does some processing to perform data structure is hex FFFF or decimal 65535. the request. As with all database operations, sometimes things do not 3. A server process sends information (data, a result go as planned. And as with many good things in the world of code, whatever) back to the client. computers, the cost of INSERT EXTENDED is in complexity. You will notice that there is no mention of a network, or One common problem with INSERT operations is trying to insert a requirement that two separate computers contain the client and a duplicate key value into a key which does not allow duplicates. the server. The basic requirements of a Client/Server system do With extended operations, merely knowing that a record not require these (an example of common single machine Client/ insert has failed is not enough. We need to know where the error Server systems includes Windows Dynamic Data Exchange occurred. which has a client process and a server process residing on the When INSERT EXTENDED returns a non-zero status same machine), but as we shall see, especially in relation to using code, it returns in the first two bytes of the data buffer the Btrieve, most benefits of a Client/Server architecture become number of records that were successfully inserted before the error apparent only when the client is a and the server is a was encountered. From this we can determine the which record NetWare server. caused the error. For many years, dating back to NetWare version 2.x The performance boost offered by INSERT Value Added Processes (VAP’s), Btrieve developers have been EXTENDED is not trivial, but clearly not as significant for on the Client/Server frontier. With current versions of NetWare standalone Btrieve as for server-based Btrieve. Also, a practical (3.1x and 4.x), Btrieve has offered both standalone Btrieve consideration is that in reality, INSERT EXTENDED is only (BTRIEVE.EXE running on the “client” machine) and server useful for batch operations, mass file rebuilds and the like. based Btrieve (BTRIEVE.NLM, a NetWare Loadable Module running on the server, communicating to BREQUEST.EXE, a Extended Get’s client module running on a NetWare workstation). Note that “Standalone” Btrieve can be used on any network that follows The GET/STEP extended operations are really where the DOS 3.1 network standard. the action is in exploiting the Client/Server advantages that Many early versions of server based Btrieve did not live Btrieve can offer. All of the GET extended operations share a up to the full potential that Client/Server had to offer. The common set of requirements, restrictions and features, so they primary advantages of server based Btrieve were a smaller DOS will be discussed as a whole first, with details of differences footprint, somewhat reduced network saved for last. traffic, and some improvement in the speed of some operations. As was the case with the INSERT EXTENDED Btrieve version 5.10 offered something different, the operation above, the GET/SET extended operations can all be topic of this column: extended operations. The goal of extended used simply as a batch method of dealing with more than a single operations is to offload some of the processing burden in a Btrieve based system from the workstation onto the server, where the data resides, further reducing network traffic. As we will see, Doug Reilly is the owner of Access Microsystems Inc., a software development house specializing in C/C++ software development, often this shifting of workload has both advantages and disadvantages. using Btrieve as a file manager. He has had articles on Btrieve published in The extended operations are summarized in figure 1. DR Dobbs Journal and is also the author of BTFILER and BTVIEWER For our purposes, they will be grouped into two categories, the Btrieve file utilities available on CompuServe. Doug’s CompuServe address INSERT extended operation and the GET/STEP extended is 74040,607 and can be contacted at 404 Midstreams Road, Brick, NJ 08724 or at (908) 892-2683. operations. We will first look at the two classes of operations,

10 Btrieve Developer's Journal Vol. II, No. 2 April-June 1994 (800) 828-7438 or (615) 860-3500 FAX: (615) 868-5397 record in a single operation. This offers similar sorts of There is also an “FB” constant that can be used. “FB” advantages with regard to network traffic (a single big block apparently stands for “Fast Buffer.” It is useful only with received from the server rather than a number of smaller blocks), standalone Btrieve, and it is only useful when using Btrieve to but the GET/STEP extended operations offer much more. filter for a single record at a time. The savings appear to be One of the buzzwords often associated with Client/ related to saving a memory buffer rewrite when a valid record is Server programming is SQL, or Structured Query Language. found. (Thanks to Pat McNerthney at Icicle Software for pointing NetWare SQL has, at its heart, the Btrieve file manager. One of this one out to me.) the things that SQL allows is the filtering of records in a file, The filter section of the data structure allows you to allowing one to set up a “view” of some subset of the records. specify the filtering to be applied to your GET’s. In the first two For instance, if we had a customer file, we might ask for all bytes of the fixed section of the filter, you specify a reject count customers in New Jersey. This request might be easily filled that tells Btrieve how many records can be rejected during the because it is quite possible that STATE is a key field in our file. search. Using a value of 0 for the reject maximum will cause a However, if we wanted to search for customers where “system-determined” value to be substituted. The next two bytes the first name of the contact person (not a key in the file) was give the number of filtering terms that follow in the repeating “Fred”, this would probably involve reading lots of records portion of the data structure. The repeating portion of the filter before we found the records we wanted. Traditionally, we would section is for the most part self-explanatory, except for the field. simply read sequentially through the file, check for “Fred” as the Most often, a comparison for filtering will be made contact person’s first name, save those who met the criteria, and against some external string, like “Fred” in the example above. discard those who did not. However, Btrieve allows a comparison to be made against a As you might imagine, this results in a lot of traffic over portion of the record being filtered. For instance, if a record had the network. In a 40 meg file, we might, in essence, send the two fields of type FLOAT, and one was a COST field and one entire customer file over the wire before we found all the was a PRICE field, a filtering condition could be “COST > customers with “Fred” as the contact person. There had to be an PRICE”, and so this field would be not a constant but rather an easier way. The easier way was, of course, to simply specify a offset of PRICE in the record. selection criteria and let the server do the work. Figure 3 shows The Extractor section allows you to specify the number some results from using the GET extended operations to look of records you want returned, and what field or fields you wish to through a file for a particular value in a non-key field. The obtain from each record. Commonly, the number of records you results using extended GET’s with server based Btrieve are want to retrieve will be determined by the number you can fit nothing short of amazing. This filtering ability of Extended into the buffer (remember, the data buffer cannot be over 65535 GET’s is used extensively by NetWare SQL. bytes long). Very often, the entire record is required. In this case All this performance improvement comes at the cost of the number of fields to be extracted is set to 1 and the length of some increased complexity. In the Btrieve version 5.10 the field is set to the record length, with the offset set to 0. Programmer's Manual, the explanation of GET NEXT covers It is important to remember, as a side note, that the two pages. The explanation of GET NEXT EXTENDED covers memory allocated for the data buffer serves a dual purpose - both seven (and even at that, they left out some interesting stuff!). to hold the extended operation descriptor structure on the call, Figure 4 shows the data structure passed to Btrieve in and to hold the data returned by the operation. the data buffer for the GET extended operation. Several things As with INSERT EXTENDED, the possibility of partial deserve notice here. First, each of the extended operations are success complicates matters. Several possible non-zero status GET or STEP's PREV or NEXT. This implies that there is codes can be returned while valid data is returned. Some already a position established in the file. This brings us to the common status codes that should be examined further are: major omission in the implementation described in the Btrieve version 5.10 Programmer’s Manual because this functionality Status Description was added to Btrieve after the manuals were printed. Note in Figure 4 that the header portion of the data buffer contains a 9 End of File “constant” value of “EG”. One can assume that “EG” is for 22 Data Buffer Length “Extended Get.” 60 Reject Count Reached This “Constant” value can also be set to “UC” which 64 Filter Limit Reached seems to stand for “Use Current.” Thus, if you have a complex 65 Incorrect Field Offset filtering scheme that you would just as soon describe for Btrieve and not duplicate elsewhere in your code, you can simply establish your position in the file using GET FIRST, GET Status 64 is especially useful. If this is returned, it GREATER, etc., and then use the extended GET operations to indicates that Btrieve has optimized the request and can be sure filter the records, Using the Current record as the first candidate. that no more records exist that met the filtering condition (in If you “try this at home” using BTRIEVE.EXE and it does not many respects, this should be treated like a status 9, End of File). appear to work, try and get the most recent patches. Several If the status code is 0, or if the status code is non-zero patches to Btrieve 5.10 standalone have alternately enabled and but the data buffer length returned is not 0, some data is in the disabled the “UC” constant. However, note that the “UC” data buffer. The format of the data is as described in Figure 5. constant is not supported in any current release of You may wish to refer to Gary Coombs article on page for 14 an BTRIEVE.EXE when using the STEP extended operations rather example of C code to use Extended GET operations to filter for than the GET extended operations. records meeting a certain criteria.

(800) 828-7438 or (615) 860-3500 FAX: (615) 868-5397 Vol. II, No. 2 April-June 1994 Btrieve Developer's Journal As with the normal GET and STEP routines, the major Header difference between the GET and STEP extended operations is the 2 bytes Total length of data buffer fact that the GET extended operations look through the file via an 2 bytes tConstantv value, tEGv, tUCv, tFBv index, and the STEP operations look through a file via physical (See Text) positioning, working from the first record physically in the file to the last. Filter - Fixed Part 2 bytes Reject Count 2 bytes Number of terms in logic expression Conclusions (0 means no filtering) As with all Client/Server architectures, Btrieve’s division of labor has the most chance of improving overall Filter - Repeating (one per logic expression) performance if the server is not already “dancing as fast as it 1 byte Btrieve Data type can.” Several clients of mine (companies, not applications 2 bytes Length of field communicating with “servers”) have resorted to stepping back 2 bytes Offset (0 relative) from server based Btrieve because their already taxed servers 1 byte Comparison code shout “Uncle” under the load of still more work shifted from 1 means EQUAL . In many cases, the actual network (not server) load 2 means GREATER THAN can be cut using other means (segmenting the network, getting 3 means LESS THAN better Network Interface Cards, etc.). Note especially that the 4 means NOT EQUAL tests presented here were performed on a server where utilization 5 means GREATER THAN OR EQUAL seldom approaches 50%. So of course, your mileage may vary.² 6 means LESS THAN OR EQUAL +32 If comparisons are to be made using the Alternate Collating Sequence Op Code Description +64 If the second operand is another field in 36 Get Next Extended the file rather than a constant 37 Get Previous Extended +128 If strings should be compared case 40 Insert Extended insensitive. 38 Step Next Extended 1 byte AND/OR logic expression: 0 If this is the last term 39 Step Previous Extended 1 If the next term is connected with an AND FIGURE 1: EXTENDED OP CODES 2 If the next term is connected with an OR 2 or n bytes Offset of the field for comparison (if the comparison code has a 64 bias) OR n bytes Fixed Portion 2 Bytes Number of Records is the length of the field specified above, to insert and the constant is located here. Repeating Portion 2 Bytes Length of Record (n) n Bytes Record Image Extractor - Fixed 2 bytes Number of records to be retrieved. FIGURE 2: DATA STRUCTURE FOR INSERT EXTENDED 2 bytes Number of fields to be extracted.

Repeating portion (one per extracted field) Standalone NetWare 2 bytes Length of field Operation Btrieve Btrieve NLM 2 bytes Offset of field (0 relative)

Select out 608 of 1:05 0:53 FIGURE 4: DATA BUFFER LAYOUT FOR GET/STEP EXTENDED OPERATIONS the records in the file, selecting based upon a non- Fixed Portion 2 bytes Number of records returned indexed field. Repeating (One per record retrieved) Select out 608 of 0:44 0:06 2 bytes Length of record image (n) the records in the 4 bytes Currency position (the same as file, selecting returned by a call to GET POSITION, based upon a non- Btrieve operation 22) indexed field, n bytes Record image using Extended GET's. FIGURE 5: DATA BUFFER RETURNED FROM GET/STEP EXTENDED OPERATIONS

FIGURE 3: PERFORMANCE TESTING WITH EXTENDED GET’S

12 Btrieve Developer's Journal Vol. II, No. 2 April-June 1994 (800) 828-7438 or (615) 860-3500 FAX: (615) 868-5397 do the reporting and that sort of stuff. That’s where SQL really From Page 9 Interview... shines. It’s not meant to be a way to get data in on a day-to-day the products. Our marketing and sales programs will definitely transactional basis; it’s a way to view data. have a global perspective to them. We’re putting together market BDJ: Some Btrieve applications look as if they’ve worked hard and channel development programs now that are targeted in to define data so that it’s inaccessible through SQL, and no Europe, targeted in Japan, targeted throughout the world to make documentation on SQL compatibility has ever been included in sure that the visibility is there for the product. We’ll also be the Btrieve developer’s kit. doing quite in bit of internationalization and translation for Doug: Btrieve is model-independent. Developers can embed the specific products with partners like Yoshio Tanahashi at AG data model in their application, and lock the data out from other Tech in Japan. users in SQL if they choose to do that. But they should realize Nancy: Novell has a lot of internationally trained people in they are making a choice to do that. In a way they’re kind of support and sales, and they are going to make those resources cutting off their future too, by not allowing that data to be available for our product line for an extended period of time to accessible to third parties, but there’s nothing to forbid them ensure that there’s no break in the business. from doing that. BDJ: Which products exactly are coming from Novell to Btrieve BDJ: Are there plans to help developers who use Btrieve to technologies? ensure that their data is NetWare SQL compliant if that’s what Doug: Btrieve, NetWare SQL, Xtrieve, and XQL on all the they choose? current platforms, Btrieve of course as the NLM, and DOS and Doug: By following the set of procedures that they should Windows. And of course Btrieve is on OS/2 as the underpinnings follow, by taking their data and defining it and normalizing it. of IBM’s CICS product. And also Report Executive... They have to follow the rules to make it SQL compliant. Nancy: All the main products and a lot of variations... BDJ: What will Btrieve Technologies do to make sure that they Ron: And all the utilities... know those rules? Nancy: Really any technology related to the database products of Doug: I think that’s just an educational process. In the past, the company, even un-released prototypes. we’ve done seminars at BrainShare on normalizing your data, BDJ: What’s the best thing about Btrieve and NetWare SQL, the telling developers, “This is how you set your tables up with Novell database products? Btrieve so they can easily be defined.” I think most people are Ron: One really neat thing about Btrieve and NetWare SQL is very familiar with the DDF files now, and understand how they the architecture. It’ll scale from a very small database on a single map to Btrieve. PC, up to a very large one using true client/server technology. Nancy: We have a vested interest in doing that. We’ve certainly When you’ve done all that, you’ve never changed your had situations in the past where customers badly designed their application, never changed a line of it. And very shortly with database, and eventually the performance would be a problem. SQL for Windows and DOS, you’ll have a relational SQL that The more we can get customers to use the products well, the less scales better than any product on the market. That’s unique. support burden we’ll bear later. Nancy: The best thing about these products is that they work, and Doug: Another thing to keep in mind is, there will be new types your system will run for years. We have people who have run the of data models defined on top of Btrieve files. We’re working on database applications for five to ten years. Their database may be the ability to define object models on top of Btrieve. The object approaching gigabytes in size now, and they’ve never had to model is not quite as structured, or is not as normalized. You change anything; they’ve never had to worry about it. don’t have to define a table with a fixed set of fields, as is Ron: The products represent a very practical solution, for the required by SQL and the relational model. You can define an size, speed, and performance constraints that we all live under, object and it can have sets of properties that may or may not be and the expense constraints that we all live under. These products there; you can have groups of properties which then become address those multiple constraints extremely well, and provide a repeating elements. As you define an object, you can define an very practical solution that, as Nancy said, works year after year object hierarchy as well within the data file. and time after time to protect your information and make it BDJ: What else can we look for in future releases? available to you. Ron: Replication. Data type support for object-oriented BDJ: Why do they do that so well? technology. The ability to spin off your database and allow you Doug: The products came from things that had been done before to take it with you on the road, and have it re-synchronized when in the mini-computer area, basic record management, using you get back. There are a lot of technology paths that we will indexing. Microsoft and all the other database companies are pursue, again, in response to specific market needs. In the concentrating on SQL, they believe the only way you get to a NetWare SQL area: triggers and stored procedures, which would database is through SQL. This type of product allows people who have some benefits in Btrieve as well. We’re doing some unique don’t need the baggage of SQL to write very sophisticated thinking and planning right now on ways we can provide stored applications. procedures. Again, that will be a very practical solution, and a BDJ: A lot of your developer customers don’t need the baggage unique solution, beyond what you see out in the market today. of SQL. But their customers need the baggage of SQL to query Doug: When you see the concepts of triggers and stored their data. procedures you think about SQL-based environments. We’re Doug: That is the main purpose of the SQL interface which is thinking more about letting you define your own language. And NetWare SQL today, to Btrieve, and we’ve discussed the the language that we may include will be based on a some type of importance of how that will continue to grow. But the daily syntax for scripting languages. The reason for choosing that is transactional baggage of SQL is not required, it’s only when you CONTINUED ON PAGE 17

(800) 828-7438 or (615) 860-3500 FAX: (615) 868-5397 Vol. II, No. 2 April-June 1994 Btrieve Developer's Journal The Challenge TRACK was originally designed around xBase and within a short time was in beta test. Everything went well until Btrieve in Action... the record count began to increase. Every day the customer call By Gary Coombs, Scientific Atlanta count increased by approximately 100 calls. Each day the system became slower and slower. Editors Note: This is the first of what we expect to be an on- One of the biggest problems was the design requirement going feature of Btrieve Developer's Journal called “Btrieve in of using pick lists throughout the package. Pick lists ordered by Action.” We would like for you to send us an outline of how you Company, or State, or even Telephone Number, had to be have applied Btrieve or NetWare SQL in what you consider to be instantly available. The system was dependent on pick lists. But, an interesting or innovative way. Please send a brief description oh were they slow in xBase. of your proposed topic for this column to BDJ-Btrieve in Action, But the slowest part of the entire system was an update! PO Box 50002, Nashville, Tennessee, 37205 or send it to It seemed that the entire xBase index file had to be massaged by CompuServe address 73173,2731. We pay $100 for each article the workstation. And all this at ARC Net speeds! (We are, of printed in this column. course, on EtherNet today.) The larger the index became, the longer the update time. It was an intolerable situation.

Gary Coombs is an Associate Staff Software Engineer in The Solution the MIS Group at Scientific Atlanta. It was determined we needed a client-server architecture. Instead of having the database and its indexes He can be reached at CompuServe address 71020,425. maintained by an individual workstation, the client-server would do all the database overhead at the server level and simply respond to data requests from the workstation. Set the stage And what product do you think Novell recommended? Scientific-Atlanta, Inc. is a Fortune 500 company and a Btrieve, of course! It was claimed that nothing would be faster world leader in broadband communications systems and cable or more reliable on a Novell Network. It could be run as an TV electronics. One of SA’s largest divisions is the Broadband NLM (Network Loadable Module) and the NLM would function Communications Group which manufactures and services as the database control center, doing database insertions, products for many local cable TV companies. deletions, and indexing at the server and not at the workstation. One of the most important things a company can do is It sounded almost too good to be true! provide good service to its customers. Scientific-Atlanta has a Since speed was now on everyone’s mind, it was large support group directly involved in supporting its cable decided the project would be changed to the C Language. The customers after the sale. Of central concern is direct technical interface between Btrieve and C was straightforward, so the telephone support of its primary customer, the Cable TV transition to another language and database was quick and easy. Operator. None of the basic logic needed to be changed. For many years this support was done from the support A DOS windowing environment was called for (we are engineer’s memory, and the proverbial file cabinet, yielding a looking back at pre-Windows 3.0) and we chose the Vermont usually incomplete customer history, and, in the case of the file Views for DOS Library for doing DOS based windowing. (After cabinet, a slow retrieval system. using the Vermont Views system for several DOS based projects, A computer based system was envisioned that would we can recommend it highly.) automate customer support with the goal of an immediate and Microsoft C 6.0, Vermont Views, and Btrieve were the complete availability of all customer support history. The system development package and we could not have made a more would be called TRACK. fortuitous choice. There would be a customer and support database When told of our requirements, Novell recommended maintained at a Novell Server. Each customer support engineer using the Btrieve extended calls on the network. The Btrieve (CSE) would have an individual workstation. When a support extended calls allowed the programmer to request multiple call came in the CSE would be able to instantly bring up the records from the server and get them all at one time! That meant customer’s complete support record along with all previous lower network traffic and a faster response time on our large pick support calls and even a trip report section for on-site support lists. trips. The last entry in the record would be a variable length field And it gets even better. We could even apply filters! which would allow the CSE to completely describe the problem That means instead of bringing down the entire record for the and its resolution. This would be very valuable future picklist, we could bring down just the field(s) needed for the information to the CSE taking the next support call for this picklist. Then, after the picklist choice was made, we could go particular customer. back and get the entire record! (When we brought down the Another requirement was tracking response time. We individual picklist items, we also retrieved and stored the could track the time of the incoming call, the time the engineer physical address of each record.) Using the B_GET_DIRECT responded, and the time of the call resolution. We could also function we could then go back and retrieve the entire record! track problem categories and resolution types. I was to be the The following is some sample code of how we used system designer and the only programmer on the project. extended operations in the trip report section in TRACK:

14 Btrieve Developer's Journal Vol. II, No. 2 April-June 1994 (800) 828-7438 or (615) 860-3500 FAX: (615) 868-5397 typedef struct // Trip Report Data Structure // { // Get the user’s choice of pick list type.... UCHAR from_date[9]; // UCHAR to_date[9]; // UCHAR trip_code[2]; UCHAR cust_no[11]; // Set up Extended Gets structure members UCHAR customer[31]; getBuf.filter.descriptLen = sizeof(getBuf.filter); UCHAR city[21]; getBuf.filter.id[0] = ‘E’; UCHAR state[3]; getBuf.filter.id[1] = ‘G’; UCHAR contacts[31]; getBuf.filter.rejectCount = 1; UCHAR salesman[27]; getBuf.filter.numTerms = 1; UCHAR purpose[31]; UCHAR fscode_a[13]; getBuf.filter.term1.fieldType = B_ZSTRING; UCHAR fscode_b[4]; getBuf.filter.term1.fieldLen = 11; UCHAR lastname[21]; getBuf.filter.term1.fieldOffset = 20; // Zero relative!!!! UCHAR frstname[21]; getBuf.filter.term1.compareCode = B_CMP_EQUAL; UCHAR user_id[11]; getBuf.filter.term1.logicExpression = B_LOGIC_END; UCHAR memo[7900]; } TRIP_REPORT tripbtrv; for (i=0; i<=10; i++) { getBuf.filter.term1.compareValue[i] = curr_cust_no[i]; // Extended structures for the Btrieve Extended Operations } struct ExtractRepeatType { int fieldLen; getBuf.filter.numRecords = 100; int fieldOffset; getBuf.filter.numFields = 4; }; getBuf.filter.field1.fieldLen = 9; // from_date[9] getBuf.filter.field1.fieldOffset = 0; // Zero relative!!!! struct FilterRepeatType { getBuf.filter.field2.fieldLen = 21; // lastname[21] char fieldType; getBuf.filter.field2.fieldOffset = 192; int fieldLen; getBuf.filter.field3.fieldLen = 21; // frstname[21] int fieldOffset; getBuf.filter.field3.fieldOffset = 213; char compareCode; getBuf.filter.field4.fieldLen = 31; // purpose[31] char logicExpression; getBuf.filter.field4.fieldOffset = 144; char compareValue[11]; // Compare using field len of cust_no }; // // Code to fill pick lists.... struct ExtendedGetDescType { // int descriptLen; // Descriptor length // User picks item from pick list and then using the recordCurrency structure char id[2]; // Descriptor id “EG” item..... int rejectCount; // Max num records that can be skipped int numTerms; // Num terms in logic expression // Put the 4 byte long int recordCurrency in tripbtrv struct struct FilterRepeatType term1; // Filter desc 1 tripbtrv.from_date[0] = (char)(getBuf.record.buf[choiceno].recordCurrency int numRecords; // Number of records to retrieve & 0xFF); int numFields; // Number of fields to extract tripbtrv.from_date[1] = (char)((getBuf.record.buf[choiceno].recordCurrency struct ExtractRepeatType field1; // Field 1 : from_date >> 8) & 0xFF); struct ExtractRepeatType field2; // Field 2 : lastname tripbtrv.from_date[2] = (char)((getBuf.record.buf[choiceno].recordCurrency struct ExtractRepeatType field3; // Field 3 : frstname >> 16) & 0xFF); struct ExtractRepeatType field4; // Field 4 : purpose tripbtrv.from_date[3] = (char)((getBuf.record.buf[choiceno].recordCurrency }; >> 24) & 0xFF);

struct ContactRecType { // Resize the data_len buffer int recordLen; dataLen = sizeof(tripbtrv); long recordCurrency; CONTBTRV contbtrv; status = btrv(B_GET_DIRECT, trip_pos_blk, &tripbtrv, &dataLen, trip_key_buf, }; 2);

struct ContactRecTypeExt { // Record buffer for extended get // And there is the complete requested record complete with memo section! int recordLen; // Length of record image long recordCurrency; // Currency position char from_date[9]; // Beginning of record image char lastname[21]; What a stroke of genius these extended calls are. A char frstname[21]; support engineer can now get a pick list of 100 records literally char purpose[31]; // End of record image }; instantly, make his choice, and then retrieve the entire record, INSTANTLY! The whole list is sent out as one network packet struct ExtendedRecordType { and the list appears with no wait. This is exactly what was int numRecords; // Number of records actually returned needed. struct ContactRecTypeExt buf[100]; // Space for 100 records }; union { Epilogue struct ExtendedGetDescType filter; struct ExtendedRecordType record; The TRACK system has been in use for over 3 years at } getBuf; Scientific-Atlanta and is approaching 100,000 customer support records. The system has been solid during that time, and is as fast today as the day it was implemented.²

(800) 828-7438 or (615) 860-3500 FAX: (615) 868-5397 Vol. II, No. 2 April-June 1994 Btrieve Developer's Journal Agreement... From Page 1 Interview... From Page 13 applications using 3GL and 4GL methods. NetWare SQL, offers the potential for tight integration with a lot of other desktop an optimum relational database solution for workgroups in small products. Why would you not want to do your database to medium size companies, or departments within the enterprise integration using the same type of scripting language as other environment, as well as the preferred SQL interface to Btrieve applications? It would look the same to the end user, plus it data. would be a more general-purpose language than the SQL “We have been longtime believers in the world-class procedures. With something like this, triggers could do things database technology behind Btrieve and NetWare SQL,” said that are non-database oriented like talking to an async port... Pure David Vinzant, president of Vinzant, Inc., a database and general-purpose type stuff. There’s already referential integrity application software development firm. “We expect big things built in, and it’s enforced at the Btrieve level. This technology from this, and from what we have seen so far, Btrieve would allow developers to enforce other types of integrity, like Technologies is going to more than meet our expectations with business rules, at the Btrieve level. Right now, there’s no way to continued enhancements to the technology and a broadening of “declare” a business rule and have it enforced... You have to the support platforms.” have some external, procedural method for doing it in your own Btrieve Technologies is a software development and code. marketing company founded in 1993 by former Novell Ron: So those are things that not only would give us a specific employees, including the original developers of the Btrieve differentiation in terms of things you can do with our products, database. With corporate headquarters in Austin, Texas, the but with a stored procedure environment we could have a company is a leading provider of high performance, multi- tremendous performance increase that we can show by virtue of platform database and information management products for pushing even more of the processing back to the server. There’s a industry standard computing environments. The company is lot of interest in bringing this technology to the product line. ² privately held. For more information, contact Btrieve Technologies, features power users have wanted for years, turnkey data entry Inc., 5918 West Courtyard Drive, Austin, Texas, 78730, phone forms, extensive relational database capabilities, edit fields, (512) 794-1719 or fax (512) 794-1711.² report writing... Users can create standalone applications and distribute them with a royalty-free runtime package, exactly as On Top Systems, of Northbrook, IL is giving away 100,000 they would with a language such as Visual Basic... text-based, copies of DI-OGIX, described as “a self-contained fast, small, portable to UNIX,” says the company’s press release, spreadsheet development program,” for a $9.95 postage and “reads dBase, Btrieve, ASCII, and Lotus .WKS files.” Contact handling fee. “DI-OGIX is a spreadsheet with all the On Top Systems at (800) 454-4426. far the more common. In fact, this author has never seen an instance of an Lvar in the wild, though I have heard from some Data Types, explorers that they are furry creatures with webbed feet, which lay eggs and nurse their young. Naturally, neither of these types can be indexed, since, as of version 6 of Btrieve, indexing is Continued... possible only on fields within the fixed-length portion of a record. The DDF standard imposes some limitations on the use By Steve Mook, Smithware, Inc. of variable length fields. There may be only one variable length field in a file, either of type Note or type Lvar, it must begin at This is the second in a series of articles addressing the issues the first byte of the variable length portion of the record, and involved in converting data types in Btrieve files. In the first must be defined long enough to hold the longest possible record. installment, Mr. Mook covered all of the Btrieve Extended The Note field is used generally for what its name Key types, which are definable using the standard DDF implies, some comment or description attached to a record. A format, and which are therefore accessible to most third- Note field consists of the field text and a delimiter character to party Btrieve front-ends. This installment covers other data mark the end of the text. DDF descriptions of Note fields use the types, some which are not supported by all front-ends and Xe$Size field in FIELD.DDF to stipulate the maximum possible development systems. length for the note text plus one (for the delimiter), and the Xe$Dec field to store the ASCII value of the delimiter character. Introduction A note field may theoretically extend the length of any given Since Btrieve is a data-model independent, language- record up to the maximum record size for Btrieve, generally 64K independent and application-independent database engine, data bytes. types lurking in the non-indexed areas of the data buffer may The Lvar data type is essentially a collection of note depend largely on the whim of the programmer, or the types fields. The first two bytes of the field contain an unsigned binary available to a particular programming language or Btrieve-based length parameter, indicating the length in bytes of the first note, a database design system. This article picks up where the last one value of zero if the field contains no data. For fields which left off, with some of these more troublesome data types. contain data, this can be followed by another length word, and Troublesome, that is, because since the DDF structure is a another note, or the field can be terminated with a zero value. construct for defining files for SQL access, and SQL presupposes The same maximum record length limitation applies as with the a finite set of data types, inclusion of these types in a file Note type, though this may change virtually preclude the ability to define the file in such a way that NetWare SQL, or SQL-based query tools like Microsoft Access, or SQL-compliant report writers can access them. Whether or not a field of a particular type can be used as a key in a Btrieve file depends upon whether or not it will map to one of the Btrieve key types discussed in the previous article. The Virtues of Being Very Small Logical fields are among the more useful storage types. These fields store all sorts of information which can be broken down into binary form, true or false, left or right, on or off, male or female. At their most basic level, computers store all information this way. The Logical data type, type (7), stores such information, and because Btrieve cannot recognize key values shorter than one byte, this is the only way to make a logical field part of a Btrieve index. But for non-key data, using an eight-bit byte to hold one bit’s worth of data seems somehow wasteful. Enter the Bit type, type (16) in the SQL-compliant DDF data type list. It can store eight logical fields per byte, its only drawback being that these fields cannot form part of an index. Bit fields are stored right-justified within the byte, which is to say, they are

stored in magnitude order. The first bit field at any given storage Illustration By Albrecht Dürer location will add a value of 1 or 0 to the binary value of the byte, DATA TYPES IN THE WILD the second, 2 or 0, the third, 4 or 0, etc. By using binary logic to as version 6.15 Btrieve gains software support. The Lvar type has evaluate the bit values within the record, programs can realize a historically lacked such support; if you plan to use one in substantial savings in storage space when dealing with this type Microsoft Access, for example, be prepared to deal with the data of data. in its “OLE Object” form. Strange Creatures of Indeterminate Size Reflections on Getting Dates and Doing Time SQL-compliant files may contain only two types of There are about as many ways to store dates as there are information in the variable-length portion of a record, a Note programs out there waiting to go belly up and float to the surface field, type (12), or an Lvar, type (13). Of these, the Note is by on January 1, 2000 (for those of you who have written or are

18 Btrieve Developer's Journal Vol. II, No. 2 April-June 1994 (800) 828-7438 or (615) 860-3500 FAX: (615) 868-5397 charged with maintaining such a program, that means you have aspects to all of this? Nothing works better at promoting a blue about five and a half years to qualify for the Federal Witness ontological funk than date math and cheap scotch. Anyhow, to Protection program). There are essentially two schools of relate the TAS Date to the Microsoft Visual Basic Date, subtract thought when it comes to storing dates: calendar versus serial. 2,415,019 days. The recent tax deadline of April 15, 1994, then, The advantage to storing dates in their calendar representation is has the value 2,449,458. Would that it were so on the refund line that you don’t have to do a lot of math just to find out what day it of my form 1040A. is, but it takes some pretty esoteric stuff to tell how many days Magic Software’s database program generator, Magic apart two dates are. There’s an example in the previous article in PC, supports yet another serial date type (SEDT 241), also four this series, which dealt with the Btrieve Date type, a calendar bytes long, stored in long integer format. For day zero, the storage format. The advantage to storing dates in a serial designers chose the something reasonably close, 01/01/01, so our representation is that date math with this data is simple, the example, 04/15/94 translates to the long integer value 34,073. disadvantage is that decoding the result is not. Take your pick. Time data types represent a more precise treatment of Or, if somebody else chose for you, you may be dealing with one the same philosophical problem that date fields present. Einstein of the animals described below. got around the difficulties by relegating time to the realm of The three byte YMD date, Smithware Extended Data relative phenomena, but those of us who deal with computers are Type (SEDT) 242, stored as a year number in the first byte, a generally compelled to think in more Newtonian terms. month number in the second byte, and a day number in the third, Information in the Btrieve Date type relates to the calendar, and is compact, concise, sorts very nicely as a string key, and maps information in the Btrieve Time type relates to the clock. Not so nicely into the way most people write dates, i.e. 04/15/94. In a the Magic PC Time type (SEDT 240), which stores a “number of Btrieve data buffer, it would look something like an ASCII value seconds from zero” as a long integer. Once again, this allows for of 94 in the first byte, a 4 in the second, and a 15 in the third. easy time math, and the field also sorts nicely as a Btrieve Integer Though it is elegant and concise, only a devoted student of key, but it requires a modicum of translation into hours, minutes, eschatological literature would employ it, as its continued and seconds. In Microsoft Visual Basic, time is part of the Date/ viability depends upon the intervention of the four horsemen Time specification discussed above, time being stored in the within the next half decade. A similar method is also not double-precision IEEE floating point number in the form of uncommon, the 6-byte string date. In this instance (SEDT 243) fractional days. Unfortunately, Btrieve data which contains the same date would be stored in YYMMDD format, as the Microsoft Date/Time type fields or Currency fields (SEDT 254) string, “940415,” once again sorting correctly as a string in will cause problems in Microsoft Access and other third-party Btrieve, and once again lacking that increasingly important query tools and report generators, since these data types are not century element. Dates are also occasionally stored as recognized by the SQL-compliant DDF standards these products YYYYMMDD strings (SEDT 244), like “19940415.” adhere to. Advantage: very easy to spot amidst other raw data. 101 More Ways to Store the Number 101 Disadvantage: eight bytes of storage space gone with the wind. First, let me postulate what I shall refer to as Mook’s Because of its size, you may see this date format stored as a long theorem: That there are more ways to represent numbers than integer value instead of a string. there are numbers wishing to be represented. The elegant proof: Languages, code generators, and database front ends That’s what keeps mathematicians from doing anything tend to support serial date data types, to simplify date math. especially useful. Quod erat demonstrandum. Storage type differences in the serial date camp hinge on two Btrieve has become something of a commonplace questions: First, what numeric storage type to use (seldom will within the COBOL compiler world, and with this general one encounter a serial date stored as a string, though, in Btrieve acceptance comes the possibility of encountering some odd- files, all things are possible), and second, when was day zero? looking numbers in your Btrieve data. Take the Numeric data Microsoft’s Visual Basic Date type (SEDT 253) is one such type discussed in the last article, for example. The Btrieve example. It uses an eight-byte Float field to store both date and Numeric type (8) presupposes and EBCDIC overpunch character time serially; the floating point number represents the number of for the rightmost digit, but most PC-based COBOL compilers days and fractions of a day before or after “time zero”. The also support an ASCII overpunch. Third-party software may or previous article in this series described the IEEE floating point may not translate ASCII negative overpunch Numeric types type. Btrieve will sort the Microsoft Date type correctly if the correctly. The following table illustrates these options: index segment is defined as an eight-byte Float. “Zero” for the

Visual Basic Date is defined as the wee hours of the morning of EBCDIC EBCDIC ASCII ASCII Saturday, December 30, 1899, so noon on Friday, April 15, 1994, Digit Pos Neg Pos Neg would be stored as 34,439.5. ======Business Tools, Inc.’s TAS Professional forms the basis 0 { } 0 p 1 A J 1 q for a number of accounting and mission-critical applications. 2 B K 2 r These programs may store a serial date type in a four-byte binary 3 C L 3 s coded decimal format (SEDT 245 uses the same format as the 4 D M 4 t COBOL COMP-6 unsigned decimal number described below). 5 E N 5 u 6 F O 6 v This date is stored as an integer, with no fractional time element. 7 G P 7 w Day zero for the TAS Date type falls somewhere in the 8 H Q 8 x antediluvian range, on or about the day God separated light from 9 I R 9 y darkness. Begin to see the philosophical as well as practical

(800) 828-7438 or (615) 860-3500 FAX: (615) 868-5397 Vol. II, No. 2 April-June 1994 Btrieve Developer's Journal COBOL COMP-1 data corresponds to Btrieve type (1) down to a hundredth of a cent on the range between two byte Integers detailed in the previous article. Also in that -922,337,203,685,477.5808 and 922,337,203,685,477.5807. article was a description of COMP-3, corresponding to Btrieve Numbers like that need some perspective, so go start damming type (5) Decimal numbers. the Mississippi River with toothpicks, at flood stage, in the rain, The COBOL COMP-4 data type uses a two’s and raise your hand when you’re finished. This is not a timed complement storage format and, like other COBOL types, rely on test, but you are asked to place any beavers you may have an implied decimal point. A COMP-4 number may occupy 2, 4, brought to class with you under your desk. Once again, though or 8 bytes of storage space. COMP-4 numbers are fully all it takes in Btrieve to sort this type correctly is to define it as an supported as Btrieve keys, either as Integers (1) or as Unsigned eight-byte Integer (1), such a definition is beyond the scope of Binary (14) types. However, neither Unsigned Binary types nor SQL-compliant DDF’s, and the SQL-based tools which use them. eight-byte Integers are supported in the SQL-compliant DDF Magic PC can use a BCD numeric type of either 4 or 8 standard, so defining COMP-4’s to a third-party tool such as bytes (SEDT 239). This number contains a sign bit in the first Microsoft Access is liable to require a few back handsprings. bit, and an exponent in the first byte biased by 65. Since the The COBOL COMP-6 data type (SEDT 247) is stored storage is BCD, the exponent value is a power of 10. This is a in simple binary coded decimal format, with two decimal digits true floating-point storage type, which is to say, the decimal point per byte. Data is stored right-justified and padded with leading is stored with the number, though its precision is of course binary 0’s. No storage is allocated for an operational sign. limited by the size of the BCD storage area; six digits for a 4-byte Decimal point information is not stored with the data, so it is up field, fourteen digits for an 8-byte field. The number is stored in to the program to determine how many decimal places to use, BCD format right-justified in the remaining bytes, two decimal either internally or by referring to the DDF definition for the digits per byte, see figure 4. field. COMP-6 numbers will sort correctly either as Btrieve TAS Professional utilized another variation of the BCD String (0) or Decimal(1) key types. storage type (SEDT 246), which did not store an exponent or a Btrieve usage is not by any means limited to COBOL decimal place, but rather relied on the program or data dictionary systems, it can be accessed from more languages and on more to supply it. A value of 0xE in the first four bits indicates a platforms than any other database. Borland’s Turbo Pascal negative number - positive numbers are represented by a value of supports a six-byte floating point format (SEDT 255). This 0xF in this position for fields containing an odd number of bytes, format is similar in many respects to the Btrieve Bfloat (9) or 0x0 for fields containing an even number. The remaining bits format, with a precision which falls between that of a single and contain the BCD digits, right justified, two digits per byte. a double-precision Bfloat. It will not sort as a Bfloat key, This last is by far the most bizarre example of a BCD- however, because the sign bit and exponent are in the wrong format number in our files to date. We’ve yet to classify it, aside places. The Pascal 6-byte real number is stored as an 8-bit from assigning it an extended data type designation (SEDT exponent biased by 129 in the first, or leftmost byte, a sign bit in 238). The current speculation is that it has its origin in an the MSB of the last, rightmost byte, and a mantissa consisting of obscure Pascal compiler. These are its identifying an implied MSB of 1 in the same position as the sign bit followed characteristics. It is ten bytes in length. The first byte consists of by the remaining 39 storage bits. The binary fraction of the a sign in the first bit, and a base-ten exponent in the binary value mantissa is stored MSB to LSB within each byte, with the bytes of the remaining seven bits, biased by 66. So far, it looks ordered from right to left within the field, see figure 1. vaguely reminiscent of the Magic PC numeric type described Several compilers which support the 8087 family of above. The rest of the number gets a little screwy. The decimal math coprocessors or coprocessor emulation also support a long value is stored two digits to the byte with the digits ordered from double floating point real number. These fields are 10 bytes in left to right, with the first digits in the last byte, and proceeding length. The format for a long double floating point number is a bytewise to the left. It’s the next best thing to data encryption, see sign bit in the MSB of the rightmost byte, with a 15-bit exponent figure 5. biased by 16,383 stored in the following 7 bits of the rightmost Parting Shots byte and the bits of the penultimate byte. The mantissa is stored The data-independence of Btrieve is a wonderful in the remaining 8 bytes, the bits ordered left to right within each quality. It gives developers the freedom to optimize, epitomize, byte, proceeding by byte from right to left within the field. The turbocharge, invent, and to really screw things up. If I only had a MSB of the mantissa is stored in the case of the long double, not dime for every person who has asked me “How do I read my implied as with the other floating-point types. The field value is Peachtree Accounting data in Microsoft Access?” Let’s bear in obtained by multiplying two raised to the power of the exponent mind that in the best of all possible worlds, your boss should be less its bias value, by the value of the mantissa, and signed able to get all the information she puts into your program back according to the value of the sign bit, a sign bit value of 1 out again as information. Does this mean that developers must denoting a negative number. These numbers sort in Btrieve if conform to a restrictive data model like SQL? No. Does it they are defined as ten-byte Float (2) keys. They are, however, require that everyone conform to a minimalist access not definable in standard DDF format, as SQL-compliant DDF specification like ODBC? I don’t think so. It does mean that format allows only 4 or 8 byte Float fields, see figure 2. developers should work towards data-type irrelevance, to say Microsoft BASIC language products add a Currency what I mean without using the word “Object.” Data is only as data type (SEDT 254) which is extremely useful for storing very valuable as it is easy to translate into information. More and large fixed-decimal numbers. The number is stored in an 8-byte, more, users are going to demand independent access to their two’s complement format similar to the Integer and COMP-4 information, and developers who fail to provide that kind of types, and is scaled by 10,000, see figure 3. access are going to find themselves replaced by those who do. ² This numeric type has an incredible range and accuracy, 20 Btrieve Developer's Journal Vol. II, No. 2 April-June 1994 (800) 828-7438 or (615) 860-3500 FAX: (615) 868-5397 Example Field Value: -1234.5

0x8B 0x00 0x00 0x00 0x50 0x9A

e e m m m m m m m m m m m m m m m m m m m m m m m m m m m m m m S M L ------m m ------i m m m m m m m S e e e e e e S 3 3 3 3 3 3 3 3 2 2 2 2 2 2 3 3 1 1 1 1 2 2 2 2 - - 1 1 1 1 1 1 g ------B 6 5 4 3 2 1 B 2 3 4 5 6 7 8 9 4 5 6 7 8 9 0 1 6 7 8 9 0 1 2 3 8 9 0 1 2 3 4 5 n 1 2 3 4 5 6 7

1 0 0 0 1 0 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 1 0 0 0 0 1 0 0 1 1 0 1 0

Value of Exponent: 10 (20 + 21 + 23 + 27 - 129) Value of Sign: 1 (negative) Value of Mantissa: 1.2055664 (20 + 2-3 + 2-4 + 2-6 + 2-9 + 2-11) Value of Storage: -1234.5 (-1.2055664 * 210)

FIGURE 1: TURBOPASCAL 6-BYTE REAL (SEDT 255), FIELD STORAGE LEFT TO RIGHT

Example Field Value: -1234.5

0x00 0x00 0x00 0x00 0x00 0x00 0xC0

m m m m m m m m m m m m m m m m m m m m m m m m m m m m m m m m m m m m m m m m m m m m m m m m m m m m m m m ------L ------m m ------5 5 5 5 6 6 6 S 4 4 5 5 5 5 5 5 4 4 4 4 4 4 4 4 3 3 3 3 3 3 3 3 2 2 2 2 2 2 3 3 1 1 1 1 2 2 2 2 - - 1 1 1 1 1 1 6 7 8 9 0 1 2 B 8 9 0 1 2 3 4 5 0 1 2 3 4 5 6 7 2 3 4 5 6 7 8 9 4 5 6 7 8 9 0 1 6 7 8 9 0 1 2 3 8 9 0 1 2 3 4 5

0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 1 0 0 0 0

0x50 0x9A 0x09

e S e M m m m m m m m L i M e e e e Value of Exponent: 10 (20 + 23 + 214 - 16383) S ------e e e e e e e S g S 1 1 1 1 e e Value of Sign: 1 (negative) B 1 2 3 4 5 6 7 7 6 5 4 3 2 1 B n B 3 2 1 0 9 8 Value of Mantissa: 1.2055664 (20 + 2-3 + 2-4 + 2-6 + 2-9 + 2-11) Value of Storage: -1234.5 (-1.2055664 * 210) 1 0 0 1 1 0 1 0 0 0 0 0 1 0 0 1 1 1 0 0 0 0 0 0

FIGURE 2: DOUBLE FLOATING POINT REAL (BTRIEVE DATA TYPE 2), FIELD STORAGE LEFT TO RIGHT

Example Field Value: $1234.56

0x00 0x61 0xBC 0x00 0x00 0x00 0x00 0x00 00000000 01100001 10111100 00000000 00000000 00000000 00000000 00000000

Implied Scale Value: 10,000 Constant Two’s Complement Integral Value: 12345600 Value of Storage: 1234.56 (12345600 / 10000)

FIGURE 3: CURRENCY (SEDT 254), FIELD STORAGE LEFT TO RIGHT

Example Field Value: -1234.5

0xC0 0x01 0x23 0x45 Value of Sign: 1 - negative (0xC0 & 0x80) 11000000 00000001 00100011 01000101 Value of Exponent: -1 (0xC0 & 0x7F - 0x41) Value of Mantissa: 12345 Value of Storage: -1234.5 (-12345 * 10-1)

FIGURE 4: MAGIC PC BCD NUMERIC (SEDT 239), FIELD STORAGE LEFT TO RIGHT

Example Field Value: -1234.5

0xC3 0x00 0x00 0x00 0x00 0x00 0x00 0x56 0x34 0x12 11000011 00000000 00000000 00000000 00000000 00000000 00000000 01010110 00110100 00010010

Value of Sign: 1 - negative (0xC3 & 0x80) Value of Exponent: -1 ((0xC3 & 0x7F) - 0x42) Value of Mantissa: 12345 Value of Storage: -1234.5 (-12345 * 10-1)

FIGURE 5: UNKNOWN BCD SEDT 238, FIELD STORAGE LEFT TO RIGHT

(800) 828-7438 or (615) 860-3500 FAX: (615) 868-5397 Vol. II, No. 2 April-June 1994 Btrieve Developer's Journal In fact, the Clarion development environment and compilers are written in C, Modula-2 and in the Clarion language. The “Sieve of Eratosthenes” benchmark when compiled with Clarion 3.0, Guest Review... runs about 200 times faster than FoxPro and Clipper. The compiler produces standard OBJ files that can be linked (with By Randy Goodhew, Editor, Clarion Tech Journal some restrictions) with other languages. A Visual Interactive Debugger is included. The Clarion language supports data scoping at the Randy Goodhew is the Editor-in-Chief of the Clarion Tech Global, Module and Local level. Both static and dynamic (stack- Journal. The Bi-monthly publication for developers who use based and even register-based) persistence are available. the Clarion Database Developer, is published by PC Recursion and sub-routines are also supported. I was able to Information Group, Inc. of Winona, Minnesota at (507) 452- program a true recursive QuickSort algorithm that performed as 2824. Randy's CompuServe address is 72607,2133. fast or faster than similar algorithms written in C or Pascal. My QuickSort algorithm (using just the Clarion language) can sort an array of 1,000 random LONG integers in just a few tenths of a Clarion Database Developer, Version 3 second on a simple 80386 machine. In terms of complexity, Clarion is a higher level The Clarion Database Developer is the third generation language than C or Pascal but of a lower level than xBase (that is, of the Clarion family of application development systems. Built it is more procedural than xBase). For example, Clarion does not upon the TopSpeed optimizing compiler technology (Clarion have an xBase-style REPLACE function but the same results can Software has merged with JPI), Clarion offers all the benefits of a be achieved by writing a simple record processing loop. complete application development environment, including: Although this results in a few additional lines of code, it allows for far greater flexibility and control. Where xBase has its roots 1. Template driven code generator. in a command line interpreted environment (the famous “dot 2. Database dictionary with referential integrity. prompt”), Clarion is strictly a compiled language. The Clarion 3. Screens (SAA/CUA style) and reports painter. database processing commands are designed to be relatively 4. Replaceable database drivers. universal so that they can be used with many different database 5. Built in help system for applications. drivers depending on features available for a particular database 6. Integrated Developers Environment with Editor, format. The linker supports memory models that include: Compiler and Linker. * Static 7. Produces real executables with no royalties or * Dynamic Overlays runtimes. * DLL (these are DOS DLL’s and are unique to the TopSpeed technology) The look and feel of Clarion includes screens with push * , with the optional DOS buttons, check boxes, pulldown menus, scrolling list boxes and Extender. full mouse support. A “Smart Linking” process is used to assure a high The Clarion language has its roots in COBOL but degree of granularity with the library files. A project contains a hybrid mixture of other modern languages such as is used to configure the link and make processes. The linker can Pascal, C and Modula-2. The syntax is very clean and readable, produce OBJ’s, LIB’s, Clarion-style DLL’s and standalone yet less wordy and not as demanding as other modern languages. EXE’s. For example, you won’t find C’s curly braces or the need to end The Application Generator allows for a somewhat a line of code with anything other than a carriage return/line feed; “visual” design of applications using a combination of screen i.e. no line terminating semi-colons. painting, prompted input and source code embed points. The Multiple decision statements can be constructed with C- template file system is based upon a metalanguage that allows the like CASE statements or Modula-2-style IF/ELSIF/ELSE programmer to completely modify and create new application statements. Clarion’s CASE statements are less wordy than those design templates. The Third Party Add-on market is starting to of C and do not require a BREAK statement to signal the supply enhanced and special purpose templates that can be compiler to quit processing branches and exit the CASE integrated or replace the standard templates supplied with structure. Also, unlike C, Clarion allows expressions in CASE Clarion. branches. To allow for replaceable database drivers, Clarion uses All of the usual modern language constructions are its own commands to access the Btrieve record manager. present, including logical comparisons, static arrays and a Likewise, Btrieve status codes are mapped to Clarion Error dynamic data structure known as memory Queues (doubly linked Codes. Most Btrieve operations are supported through the lists that can use conventional, extended and virtual memory). equivalent Clarion commands. However, the syntax is simpler However, pointers and direct memory allocation and deallocation and generally requires only one or two parameters, unlike are not supported. interfacing directly to Btrieve with other languages such as Clarion is extensible through multiple languages BASIC or Pascal. For example: ADD(filename) PUT(filename) (especially the TopSpeed family of languages including C, C++, DELETE(filename) which will INSERT, UPDATE and DELETE Pascal and Modula-2) and through itself. The optimizing Btrieve records, respectively. The Btrieve Extended Functions compiler can produce Clarion code that is as tight and fast as C. are currently not supported.

22 Btrieve Developer's Journal Vol. II, No. 2 April-June 1994 (800) 828-7438 or (615) 860-3500 FAX: (615) 868-5397 Although not strictly relational in design, Clarion can support classical relational database theory through its procedural Btrieve Data Type Clarion Data Type code. Multiple database drivers can be used within a single application and relational links can be established between STRING (1 byte) BYTE different database file formats. Multi-user contention, optimistic INTEGER (2 bytes) SHORT concurrently and referential integrity can be implemented INTEGER (4 bytes) LONG through the pre-tested source code produced by the application FLOAT (4 bytes) SREAL generator. This allows the developer to think at the “design- FLOAT (8 bytes) REAL level” and to hide the complexity of the underlying procedural BFLOAT (4 bytes) BFLOAT code. Because of Clarion’s code flexibility, the developer is not BFLOAT (8 bytes) BFLOAT8 strictly bound to the relational database model. It is also possible DECIMAL PDECIMAL to code networked and hierarchical style database structures. STRING STRING Although the “computational speed” of Clarion is equal ZSTRING CSTRING to other languages such as C of Pascal, the “database speed” is LSTRING PSTRING similar to other database products. You will generally see a slight DATE DATE to moderate improvement in database performance when TIME TIME compared to other DBMS systems. Where Clarion really shines is UNSIGNED (2 bytes) USHORT in handling applications that require computationally intensive UNSIGNED (4 bytes) ULONG operations. Using Clarion Version 3.0, I wrote a simple NOTE MEMO command line utility that will count the number of words in an ASCII. On a test file that was 64K bytes in size and contained The Btrieve data types LOGICAL, MONEY, and NUMERIC 12,000 words, the Clarion 3.0 utility performed the word count in are not directly supported but can be emulated by using other 1 second! Using an older version of Clarion (Clarion Professional Clarion data types. Developer 2.1) the same test took 177 seconds to complete. A FIGURE 1: BTRIEVE DATA TYPES IN CLARION similar test using Clipper took even longer. This kind of “computational” performance makes Clarion especially a good choice for developing applications that require intensive mathematical and logical operations such as accounting, finance, BTRIEVE/N Version 5.10a (included with statistical, scientific and real time data collection. Clarion Database Developer) With the Btrieve database driver, Clarion stores data and NetWare Btrieve NLM 5.x all KEYs in a single file. The data files default to a file extension NetWare Btrieve NLM 6.x of .DAT, this can be overridden by the use of the Clarion NAME attribute. Keys are created by Clarion as “supplemental” keys and FIGURE 2: VERSIONS OF BTRIEVE SUPPORTED BY CLARION are dynamic. That is, they are automatically updated whenever the data file is changed. Keys can be rebuilt one at a time using the Clarion BUILD command. The Btrieve AUTOINCREMENT Clarion key attribute is not currently available with Clarion. However, if Btrieve a pre-existing Btrieve file that uses the AUTOINCREMENT key dBase III attribute is used, the Btrieve record manager will continue to dBase IV autoincrement marked fields when new records are added. FoxPro Temporary static keys (Clarion INDEXes) can be created. Clipper INDEXes are stored in separate files and are given a temporary Paradox 3.5 file name. They are deleted from the disk when the program ASCII - delimited by carriage-return/line-feed terminates normally. Because of their static and temporary Basic - delimited by comma and quotes nature, INDEXes must be created when needed using the Clarion DOS - binary, byte addressable BUILD command. MEMO fields are either stored in one file separately FIGURE 3: CURRENT DATABASE DRIVERS from the data, or in the data file if the driver string MEMO is set to SINGLE, LVAR or NOTE. The equivalent Clarion file open * Zip Code Library. commands can be used to open Btrieve files in five different * Communications Library. formats: NORMAL, ACCELERATED, READ-ONLY, VERIFY * Other TopSpeed languages such as C, C++, or EXCLUSIVE. A file owner name can be specified and Modula-2 and Pascal. encryption can be used. A variety of addon products and pre-packaged bundles Future addons will include a standalone report writer are available, including: and additional database drivers for client/server access. * A GUI screen library kit. Who uses Clarion? I have observed that Clarion is extremely * VGA Color kit. flexible and used by a variety of developers and programmers, * DOS Extender for Protected Mode. including: * Graphics Library. 1. Commercial - producers of srink-wrapped * Finance Library. software and vertical market applications.

(800) 828-7438 or (615) 860-3500 FAX: (615) 868-5397 Vol. II, No. 2 April-June 1994 Btrieve Developer's Journal 2. Corporate - for in-house business applications From page 5 and database maintenance. IVIS 3. Custom - consultants who produce customized uses tools supplied by other vendors, such as the Realia COBOL applications for their clients or who need to compiler and CICS environments from Computer Associates integrate new applications to pre-existing International Inc., as well as hardware and network databases. configurations, to provide complete downsizing solutions. The 4. Casual - those who are essentially self-users or company recognizes that downsizing is as much a process as a serious hobbyists. product, however, and a large portion of their solution package Clarion Software intends to supply (at additional cost) consists of services and training. The process, which the database dictionaries for popular accounting software including company calls “IVISizing,” involves first an on-site evaluation Platinum and Great Plains. This allows accounting software and application assessment. The systems to be downsized are VARs to customize applications and create addon modules for identified and source code and data are forwarded to Raleigh for their clients. transfer to the LAN environment. Only after the ported A specialized PenDOS version of Clarion Database application has been tested and approved by the customer at the Developer (Pen Developer) is available for pen-based systems Raleigh lab is the reconfigured system installed at the client site. application development. The development environment allows The company offers follow-up consulting, training, and support programmers to create, test and debug pen applications on a services. “We usually do the first project,” said Mr. Zajac, “I standard PC by simulating the pen environment. Clarion’s Pen ported a system for Financial Services Associates in about four Developer is the only full-featured DOS database product that days which represented 300,000 to 400,000 lines of code, to a can be used to produce pen-based applications without using 486/33 server, and the tests that we ran with their people were third party addon libraries. Handwriting recognition and multiple comparable to the times they saw on the mainframe, better in database drivers are supported. some cases. We implemented a client-assisted program with A variety of technical support options are available from them, where we give the client MIS people time in our lab and Clarion Software Corporation including prepaid support plans, personnel assistance, and essentially train them to do the process on-demand support and corporate support programs. Scheduled themselves in the future.” classes are available at the company’s headquarters in Florida The Fixed Assets Accounting division of General and in select cities. A support forum is available on CompuServe, Electric ported over 500,000 lines of CICS and Batch COBOL GO CLARION. An annual Developers Conference is held programs with IVIS last year. Keith Patenaud, Functional annually near the company’s headquarters in Florida. Third party Coordinator for the division, noted that, “We have experienced books and training materials are starting to emerge. Video reduced run times over the delivered mainframe based FA system Training Tapes for Clarion 3.0 are now available from RJS for most application jobs, with the control of the system now in International, Ft. Lauderdale, Florida. the hands of the local users and programmers, as opposed to a A Windows version of Clarion is now in Beta test and data center thousands of miles away. Our cost for the mainframe should be released later this year. Additional features will include is greatly reduced as well.” true multi-threading, support for Visual Basic VBX custom The concept of downsizing or “rightsizing” has received controls, ODBC connectivity, SQL Server and Oracle database mixed reviews in the past, for every company with a shining drivers and runtime expression evaluation. A conversion utility success story, it seems, there are others whose experience has will be provided to move the DOS version code to the Windows been less than satisfactory. When asked about the downside of product. ² downsizing, Mr. Zajac replied, “When companies think about downsizing, they think about re-engineering applications, Clarion Database Developer, Version 3 creating workgroup based systems using SQL and GUI interface Clarion Software technology. We see our products as an interim solution; they 150 East Sample Road allow a company to take systems that are working on the Pompano Beach, Florida 33064-9990 mainframe, and move them virtually unchanged to a less (800) 354-5444 or (305) 785-4555 expensive platform. They can use the cost savings to re-engineer FAX: (305) 946-1650 their systems if that’s what they want to do.” According to Mr. Zajac, IVIS chose Btrieve for its data management system on the basis of its data security and transaction processing capabilities, Get your message out to the its client server architecture, and because it offered the speed and file size capacities required for large legacy databases. Data Btrieve Community! model independence was also attractive. “Our API is a ‘COBOL VSAM to Btrieve’ transparency module. We also have an API Call Carolyn Lighty, Advertising Manager, for SQL under development.” at (800) 685-2403 or (201) 712-0044 for Contact IVIS International at (919) 781-7778. ² more information on advertising in Btrieve Developer’s Journal and The SourceBook catalog.

24 Btrieve Developer's Journal Vol. II, No. 2 April-June 1994 (800) 828-7438 or (615) 860-3500 FAX: (615) 868-5397 told me: Product Review... By Scott A. Smith I was never able to get past this message on either the “bdj_vendors” table nor the “bdj_subscriptions” table. The strange part was that I had no trouble opening the Microsoft Access, Version 2 “customer_database.” Once the table was opened, I was presented with a fabulous sight: Microsoft has recently introduced a new version of their popular database development system, Access 2.0, which is part of their Microsoft Office suite of products which includes Word for Windows 6.0 and Excel 5.0. While there have been some major improvements in the overall package, and even some enhancements in the product’s ability to interface with Btrieve data, several critical limitations Records from this table which contains several thousand records still exist. In this brief review, let me tell you about my personal actually immediately appeared on the screen. As nice as this experience with using Access to get into some of the Btrieve initially appeared, I soon discovered that one of my main Developer’s Journal Btrieve databases. complaints about Access still remains in Version 2.0: It still The installation process went smoothly, as do most apparently must scan the entire table. So, although the first part installations of Microsoft products. Since the box clearly states of the table did appear, it was quite obvious by the exceptionally that I need to install the Btrieve DLL’s from another source and sluggish nature of my usually peppy 486/66DX2 that Access was that I need to use Xtrieve or Smithware’s DDF Builder for continuing its pass through the entire file. As far as I can tell, it Windows to access Btrieve data, I was not expecting Access to does this to establish how many records are in the table. One install the Btrieve DLL’s. The Btrieve DLL’s had already been wonders why they did not perform a Status call to the Btrieve installed on my computer (an IBM ValuePoint 466DX2) and of DLL to do this. This feature makes table editing in Access on course we already have DDF’s defined for all of our BDJ large files, practically useless. databases. The best feature of Access 2.0 is the collection of My first excursion through the On-Line help document “Wizards” that are available throughout was a pleasant one: There was an entire, fairly comprehensive the database design process. These section on Btrieve issues. The first new feature that I found wizards automatically build common interesting was that Access 2.0 allows you to access Btrieve forms, reports, and queries by asking version 5.x and 6.x files (Access 1.x was limited to Btrieve you fairly straightforward questions. version 5.x files for some reason). Later in the help document, Although I could not access the there was a clear discussion about how to set up the Btrieve “bdj_vendor” table through the table DLL’s, the difference between the local and requester versions of editor, I did have success using one of the Form Wizards to build Btrieve, and the correct WIN.INI and NOVDB.INI settings. an auto form of the table. The automatically generated form, I decided that I wanted to access three tables from the although it took a long time, again to scan all of the records in the system: The BDJ Subscriber Database, the BDJ Potential file, looked quite nice and actually worked: Advertisers Database, and the Smithware/BDJ Customer Database. After I chose to create a new Acess database, I chose the Attach Table option from the File Menu. This gave me the option to attach to about 10 different external database formats including Btrieve. After choosing “Btrieve,” I was instructed to point to the correct FILE.DDF that defined the tables that I wished to access. After I did so, I was presented with a list of tables. Success! I chose all three tables and presto, I was in business. The first order of business was to attempt to open each table and just view the tables. OK, I chose Access 2.0 is certainly a wonderful product for building the “bdj_vendors” database because it is relatively small (about fairly small database systems. They have indeed improved their 500 records). When I pressed the open button, I was presented access to Btrieve, especially in their recognition of Btrieve with the message: version 6.x tables. But it still sorely lacks when it comes to large databases. Other limitations apply including a fairly poor use of Btrieve indexes. If you need simple access to small Btrieve files, then Microsoft Access 2.0 is for you. If you require access to larger When I press the Help button, a vague message appeared that files, stick with products that directly and completely support Btrieve. (800) 828-7438 or (615) 860-3500 FAX: (615) 868-5397 Vol. II, No. 2 April-June 1994 Btrieve Developer's Journal Please let us hear from you! We want to make Btrieve Developer’s Journal just right for you. Send us any news, information, comments, suggestions, or anything else to Letters and Comments... BDJ - Letters, PO Box 50002, Nashville, TN 37205 Dear Btrieve Developer’s Journal, I have just received my second issue of the Btrieve Developer’s Journal and wish to congratulate you on an excellent start toward a successful publication. I have a suggestion for an addition to the physical preparation of the publication. I would like to see a three- hole punch for permanent storage of the Journal as is being done by Inside Visual Basic for Windows by the Cobb Group. Larry Cartee Magical Custom Programming Houston, TX

Dear Btrieve Developer’s Journal, After reading the “Special Assignment” article on file recovery by Doug Reilly and Scott Smith, it occurred to me what a nice gesture it would be if Btrieve Technologies, Inc. produced more detailed documentation of the internal file structures so that developers would not have to rely on “sketchy official information.” Mark Schroeder MHS:CRASH@PSI-AIEA BDJ Responds: Look forward to the near fusture when Btrieve Technologies follows through on their pledge to be more responsive to requests for more detailed information like yours. SAS

Dear Btrieve Developer’s Journal, Although this issue Jan-March 1994 isn’t really worth the money, I expect it to become a lot better in the future. E.g. an important issue like Btrieve.exe V6.x is mentioned in just one sentence of 26 words! A bit short, don’t you think? Some other reports are stretched to fill the magazine, e.g. Btrieve V6, page 21, para 2, last sentence: ‘The time it takes to add an index, as in pre 6.0 versions, will depend on the number of records in the file, the file size, and the length of the index to be added.’ Sorry, but this is copied straight out of the manual forgetting that this is a magazine trying to talk to Btrieve developers. Same report, same page, last but one column, about the map root stuff. ‘What tremendous advantage accrues from this development is lost on this reviewer...’ I tell you. Your harddisk holds a subdirectory called ‘INTERNAL’, map rooted, with all the stuff again as in ‘DEVELOP’. Also map rooted. The programs on a customer site will be installed of the root. So the test version of this program will be in the map rooted directory ‘RELEASE’ and the training version in ‘TRAINING’. Map root helps to organize your server harddisk without the user noticing and you can use the same installation file everywhere. Understood? But after all this moaning, now to the good bits. Your report writer review is important and interesting. Pls keep this up to date with continuous reports. The report ‘DDF’s explained’ was interesting and helped me a lot on design decisions of my database. Very interesting was the report and the results of compressed files. I was compressing all my files, but am now seriously thinking about undoing it. The compression rate is not very good at all and the reduction in speed is by far too high. Disk Space is not that expensive nowadays, but speed is always an issue. Your adverts are also interesting, as it is not easy to find companies dealing with Btrieve. As this magazine is read worldwide, could you pls ask your advertisers to put their CompuServe account if they have got one. Rainer Seifert

Dear Btrieve Developer’s Journal, With regard to future items for BDJ, I have a couple of suggestions. 1. A description and discussion of the various Btrieve parameters that are used by the NLM. How to set up the parms and the results if the parms are set to a ‘bad’ value. 2. A list of current patches that should be applied to the various Btrieve modules. This should be in the Novell/Btrieve Technologies literature, but if they don’t do it perhaps it should be a standard section in the BDJ. 3. A list of shareware programs which users could use in the development of Btrieve applications. Ideas for Btrieve Technologies: 1. Have FTP site where the Btrieve fixes/patches could reside. 2. Have a Listserv (sic) that Btrieve developers could use, similar to NOVELL@SUVM. 3. Btrieve should allow variable length, repeating fields. This would allow Btrieve, Xtrieve, etc. to search for information in repeating fields without having the complete record returned to the user application program for processing. 4. There is currently no real security for Btrieve files under NetWare. If a user is to be allowed to modify a database record, that user must be given the correct rights in NetWare. Since he then has the rights, the user can corrupt the database outside of the Btrieve environment and nothing can currently be done — a large security hole for Btrieve applications. Bill Speary

26 Btrieve Developer's Journal Vol. II, No. 2 April-June 1994 (800) 828-7438 or (615) 860-3500 FAX: (615) 868-5397