What's Up DOCumentation Robelle Consulting Ltd. Unit 201, 15399-102A Ave. Surrey, B.C. Canada V3R 7K1 Phone: (604) 582-1700 Fax: (604) 582-1799 Email: support%robelle@mcimail.com Date: January 11, 1994 From: Robert M. Green, CEO David J. Greer, President Michael Shumko, Editor To: Users of Robelle Software Re: News of the HP 3000 and HP-UX, 1994 #1 What You Will Find in This News Memo: News Tidbits Use Suprtool to Export MPE Data to Paradox Insight -- Software to Increase Reliability Technical Tips Calendar of Events About Robelle Shameless Plugs Robelle Products: Problems, Solutions, and Suggestions News Tidbits Very Important Notice. IMAGE/SQL is the next generation successor to TurboIMAGE. TurboIMAGE development is frozen, but IMAGE/SQL will continue to receive enhancements. HP is offering IMAGE/SQL to the entire HP 3000 install base via increased support costs. You may remember that we users voted for this last year. Unfortunately, you must ask HP to add IMAGE/SQL to your support contract; it is not the default. And you only get one chance! It is simple to miss out on IMAGE/SQL and all future IMAGE enhancements. The following statement by Jim Sartain, HP SQL Program Manager, appeared on the Internet recently: When support contracts are up for renewal customers are given the option of upgrading from TurboIMAGE to IMAGE/SQL. The product support cost is from $10 to $325 per month depending on the MPE/iX user level and whether the customer is on basic line or response line. Customers who decline this offer will continue to receive a functionally stable version of TurboIMAGE (no future enhancements). Should the customer want to upgrade to IMAGE/SQL in the future they must purchase the upgrade and pay for IMAGE/SQL support. HP is rolling this out at the rate of 1/12 of the customer base per month, and several months are gone already. Better warn purchasing today. If you don't ask for IMAGE/SQL now, asking for it later will be expensive. [David Greer] Use Suprtool to Export MPE Data to Paradox Recently at Robelle, we were concerned about having access to our customer data in the event of a disaster. If there was a system failure involving our HP 3000s, we realized the benefit of being able to access a recent copy of the data on a PC. Since we use our own products in our internal operations, we naturally turned to Suprtool. We also knew that we could import Suprtool PRN files into Paradox, a PC database product from Borland International. With the two products working together, we came up with the means to meet our goal of having a PC backup system for our customer data. Here is an example based on our methods, using an IMAGE database named Custdb. The first step is to create the PRN file with Suprtool. Then in step two, download the file to the PC using Reflection. * Step 1: Extract data and create PRN file :run suprtool.pub.robelle >base custdb.db.mis,5,reader >get m-customer >output mcust,prn >exit * Step 2: Download the PRN file to the PC receive mcust.prn from mcust ascii Step 3: Import into a Paradox table Press F10 to access command line menu Press T for Tools Press E for Export Press I for Import Press A for Ascii Press D for Delimited Supply the filename when prompted c:\mcust.prn Supply the new table name when prompted c:\cust With Paradox, PRN files are imported into tables. For step three, press the necessary keys on the PC as outlined above. Then, specify the PRN filename. Finally, provide the name of the new table into which you are importing the PRN data. Paradox reads the PRN file twice. The first time it determines the maximum length of each field. The second time, it loads the data into the table. After the file is loaded, you must define the rest of the table structure (i.e., the field names and possibly the field types), replacing the generic default names. By importing the PRN file into a new table, instead of an existing one, you help protect the Paradox application from any changes that may have been made in the original database file (M-Customer). As well, each field is allocated only enough space for the largest value, which saves you disc space. Importing into a new table in Paradox is best for when you are making a read-only copy of HP 3000 data. However, if you will be changing the data in the future, and thus will need the ability to extend data fields, you must import the PRN file into an existing table. The table must have been set up with all the field names, field lengths, and field types. As long as the HP 3000 data structure doesn't change, this method works fine. Loading is faster and it is less work than using a new table, since you only have to set up the table structure once. Step 4: Use Record Script to Restructure Fields Press F10 then S for Scripts Press B for Begin Record Enter Convertfor the Script Name Press F10 then M for Modify Press R for Restructure Supply the table name CUST Enter new field names Press F10 then D for Doit {this may take awhile} Press F10 then S for Scripts and E for End Record Fortunately, when importing into new tables in Paradox, you may automate the process of defining field names and field types by using a script. The above example shows how to rename the fields in the new table from the names that Paradox automatically assigns (such as "Field-1"). You will notice that we have recorded our actions into a "script" file called Convert. This step only needs to be done once. The next time you import a file with the same structure to a new table, you merely have to replay the script. This can be done by pressing F10 to get to the command line, then S for Scripts, P for Play (the script) and then supplying the proper filename (Convert). This replays the Convert script and changes the field names to the ones you created on the first restructure. Insight -- Software to Increase Reliability by David Greer At the San Francisco Interex meeting, I picked up a free trial of Insight, a debugger from ParaSoft for C code on HP-UX. I am glad that I did. Two Insight features are invaluable for helping debug and test software written in C. First, Insight monitors all memory references. By doing so, Insight can report on many common C programming problems. These include dereferencing a pointer that points to memory no longer allocated (this could just be an inadvertent use of "*"), memory leakage (allocating memory in a procedure and never returning a pointer to it), and freeing invalid pointers. Insight also monitors calls to all HP-UX routines (MPE users would think of these as intrinsics). Like most versions of UNIX, HP-UX tends to be sloppy about checking if parameters are valid. Using Insight, you can find calls where incorrect values or parameters were passed. We used Insight to test Qedit/UX. It caught two different errors. Neither were serious, but we were happy to fix them before we released the production version of Qedit/UX. We now run Insight as a regular part of our testing. Insight does add overhead to your program -- I would not recommend distributing Insight in your production code (it would likely violate the license agreement anyway). The error messages are clear and they show the actual line of source code where the failure occurred. Insight costs $995 US for a single machine license (unlimited users) and support is $300/year. You can contact ParaSoft at (818) 792-9941 or by E-mail at insight@parasoft.com. Technical Tips Omnidex and CIU. The May 1993 issue of What's Up, DOCumentation? reported that Omnidex did not correctly handle the new Critical Item Update (CIU) feature of TurboIMAGE in MPE/iX 4.0. DISC reports that CIU is fully supported in the latest version of Omnidex, available now as Beta release 3.1. Contact DISC at (303) 444-6610. A list of all HP-UX files. Our nightly backup produces the file "/allfiles" which has a list of all files on our HP-UX machine. This makes it easy to search for a particular file. This example uses grep to search for the string "syslog" in our file "/allfiles". This will list any file, directory, or portion with the substring "syslog": grep syslog /allfiles The following command will create "/allfiles": find / -fsonly hfs -hidden > /allfiles Note that our backup script logs on as super user. If you try this without being logged on as super user, you may not get a list of all files on your HP-UX system due to security constraints. We prefer the file to be in the root directory so that it's easy to see (e.g., an ls / will show the file "/allfiles"). Some system managers prefer to keep the root directory as clean as possible. In this case, you might want to call the file: /tmp/allfiles Performance Gotcha on Multi-CPU Systems. Don't ship software with breakpoints! One of our customers was having performance problems on a large multi-CPU MPE/iX system. The HP Response Center eventually tracked it down to third-party software (not ours, whew!) that had been shipped with the SYMDEBUG compiler option active. This option inserts "breakpoint" calls into the program for each procedure. These apparently go into the system breakpoint table even when the program is run without debugging and can seriously slow down a multi-CPU system such as a 980/200. HP-UX Tip: Here-Documents. One useful feature of UX shells are "here-documents". Here-documents work like input redirection, except that the sources of the new input are the following lines in the file. Think of them as data attached to a command line. Here are two useful examples of using here-documents. The first is to create a data file in a script. Instead of creating a data file with echo commands, echo "line1" >data echo "line2" >>data echo "line3" >>data create it using cat and a here-document, cat >data <item unit-cost,decimal,2 When specifying numeric constants for a field with implied decimal places, you can use different formats. For example, the following are examples of constant values for unit-cost: 0 {zero value padded as necessary} 1 {$1.00} 0.01 {$0.01} .01 {also acceptable for $0.01} Qedit Version 4.1-4.2 Fancy String Searches. In screen mode you can find the n-th (first, fifth, tenth) occurrence of a string in a file by typing the string in quotes, then the position to start looking, followed by an occurrence count. For example, to find the fifth $page starting at the beginning of the file: ===> "$page" [ 5 Or to find the third occurrence of "xyz" before the current position: ===> ^"xyz" * 3 A Powerful Two-line Command File. Here is a simple Qedit Command file, phone, that does something really useful. It scans a data file of phone numbers and prints the ones that match some search string. The data file is maintained manually using Qedit. Phone.Cmd.Ops: parm searchkey /listq phone.data.mis "!searchkey" (upshift) You invoke the Command file by typing "phone", plus the search name: /phone mike Speed dial 45 Mike Shumko (home) 555-4079 Shumko, Mike (fax) 555-4080 2 lines found The Command file has one parameter and contains one Qedit command. The /Listq command searches the phone book file, prints any lines that match the parameter value, and prints the number of matching lines found. The !name syntax to substitute variables is not supported for Line-mode Qedit commands, but is supported on ANY command within a Command file. The Qedit command is preceded by a slash ("/"), to distinguish it from MPE commands. Can't Find the Right Word? Qedit has a built-in command to look up words in an English dictionary. This Word command can also show you words starting with a certain spelling. For example, to find words starting with "access", type: /word "access@" word : access prefix : access : accessed : accesses : accessibilities . . . : accessories : accessorily : accessoriness : accessory 16 matches If you aren't even certain how the spelling starts, you can do a phonetic lookup. To find words that sound like "access", type: /word "access!" word : access soundex : acacia : aces . . . : ashes : assess : axes : axis 23 matches Xpress Version 3.0 Global Distribution Lists. In Xpress version 3.0, Helpman can now define global distribution lists that are accessible to all Xpress users. To create a global list, access the Xpress Config program as Helpman and select the "Distribution List" menu. This menu has three sub-functions: 1 - Exit, 2 - Maintain Lists, and 3 - Maintain Users. Use option 2 to define a new distribution list, and then use option 3 to add users to the list. The new distribution list then appears on your user menus. Global distribution lists are shared by all Xpress users on the same machine. Users can still have their own personal distribution lists. In the "Maintain Distribution Lists" menu, there are five functions available for maintaining distribution lists. ADD prompts for a distribution list name and number. The number of a distribution list is like the number for a user or group. Distribution list names and numbers must be different from any existing user/group names and numbers. Global distribution list names must have a minimum of two letters to distinguish them from the names of personal distribution lists. If you assign a single letter name, you can only send to the list by using its number. CHANGE, like ADD, allows Helpman to change either the name or number of a distribution list. DELETE removes the distribution list and the list of users on the distribution list. LIST prints a compact report of all currently defined distribution lists. To see the users on a specific distribution list, use the List function under 3 - Maintain Users. After creating a distribution list, you must add one or more users to it. In the "Maintain Distribution List of Users" menu, there are four functions for maintaining user lists. ADD prompts for a distribution list name. You are prompted for one or more users to add to the distribution list. Typing a question mark at this prompt will display a list of all Xpress users in your database. Note that a distribution list may only contain user names; it cannot include other distribution lists. DELETE prompts you for the distribution list name. You will then see all the users on the distribution list. Enter the number or name of the user to delete from the distribution list. LIST prints a list of all the users on a specific distribution list.