CA-Clipper 5.2 Tech Notes ========== QUESTION #1 My pre 5.2 application hangs now that I have upgraded to MS-DOS 6.0. ANSWER: If the user installs DOS 6 and uses the MEMMAKER utility to help them load things high it will ask them if they are using programs that use EMS. If they answer NO, MEMMAKER will add the NOEMS parameter to the EMM386 driver line, which increases the amount of high memory by 64K (i.e., the size of the pageframe - nice if you have lots of drivers to load high). Unfortunately this parameter has a different meaning with DOS 6 than it did with DOS 5. One of the standard ways to determine if an EMS driver is installed is to check a particular location in memory for the string 'EMMXXXX0' - well, under DOS 5, with the NOEMS switch, the string isn't there, so CA-Clipper thinks there is no EMS - which is good - it just doesn't use any. Under DOS 6 however, even if the NOEMS switch is specified, the string 'EMMXXXX0' is still present, so CA-Clipper thinks there is EMS, and in fact there is, but there is no pageframe (which CA-Clipper needs). CA-Clipper's detection of the EMS pageframe in the various versions of 5.0x runs afoul of this scheme. In 5.01 and 5.01a the error return code is ignored - and CA-Clipper uses a 'random' segment address as the pageframe address (actually the address with these versions is 'number of free EMS pages':0000, which is usually an address in low memory - when VM kicks in it writes to this address and trashes low memory which results in a hang), in 5.2 and 5.2a this was corrected. When 'NOVCPI' is used in conjunction with NOEMS, EMM386 leaves out the signature string 'EMMXXXX0' - so CA-Clipper doesn't think there is an EMS driver there at all. That is why NOVCPI solves the problem. So, if they have NOEMS on the EMS driver line, they *must* have NOVCPI with *all* versions of CA-Clipper 5.0n (or else set //E:0). There is a similar problem with the EMS driver switch FRAME=NONE (in fact its the same problem), but in this case the NOVCPI switch has no effect, so if you have FRAME=NONE, you *must* use //E:0. ========== QUESTION # 2 Why do I get :C3049 string space exhausted" when compiling? ANSWER: The CA-Clipper 5.2 compiler has less space for string constant storage. The space was expanded in 5.2A and is explained in detail in 52A.TXT in LIB 0 of this forum. Download 52A.TXT and either 52AUS.EXE or 52AINT.EXE, read 52A.TXT and apply the apropriate patch. ========== QUESTION #3 The MDX RDD does not perform automatic file locking the way that dBase IV does. ANSWER: The CA-Clipper 5.2 MDX RDD supports the DBF-MDX file structure and locking mechanism. It does not support the dBase IV automatic locking strategy. You must explicitly manage locking events. The compiler kit for dBase IV does support the dBase IV locking strategy. ========== QUESTION #4 Why do I get "DBCMD/1010 Illegal characters in alias" when I attempt to assign an alias name with a numeric as the first character? ANSWER: The following is taken from the Clipper 5.01a >> Release Notes Change Summary Runtime Errors DBCMD 1010 Illegal characters in alias (USE command) PROBLEM: An attempt was made to create an alias that was not a valid identifier. This occurs if the system creates a default alias based on the filename and the filename contains illegal characters (i.e., TEST$.DBF) or is otherwise an invalid identifier (i.e., 123FILE.DBF). SOLUTION: Provide a valid alias identifier via the ALIAS clause. NOTE: A legal identifier can contain alphabetic characters, numbers, or the underscore symbol (_); but must begin with an alphabetic character. ========== QUESTION #5 The Drivers Guide states that "the default extension for DBFCDX is (.idx)" but OrdBagExt() always returns "CDX." ANSWER: The documentation is incorrect, (.cdx) is the default extension. Since (.idx) and (.cdx) files can be opened in the same workarea, the driver cannot determine which extension should be returned. Therefore it always returns (.cdx) ========== QUESTION #6 I get: You can't uninstall the Norton Guides in pass-through mode. Exit the current application to uninstall. when I try to uninstall the Norton Instant Access engine. ANSWER: The C52G01B.NG that came with 5.2 cannot be uninstalled. This is due to the title in the .NG being too long and not NULL terminated. The character at offset 47 needs to be changed to a chr(0). The following code will fix the problem: #include "Fileio.ch" LOCAL nHandle nHandle := FOPEN( "C52G01B.NG", FO_READWRITE ) IF nHandle != -1 FSEEK( nHandle, 24 ) FWRITE( nHandle, "The Guide To CA-Clipper" + chr(0) ) FCLOSE( nHandle ) ? "All done." ELSE " "Error opening the file. DOS error: ", FERROR() ENDIF RETURN NIL ========== QUESTION #7 I get "VM integrity error" when I run a 5.2 application; I did not get this in 5.01. ANSWER: Many VM integrity errors can be avoided by keeping OBJ file sizes to well under 64k. Applications that are compiled via CLP files tend to generate this error. CLP files were a good thing in Clipper Summer 87, but are a definite bad practice in 5.x. Also, many VM integrity errors that occur due to CA-Clipper subsystem misuse of the VM system have been fixed. Download the latest CA-Clipper 5.2 patch. ========== QUESTION #8 Why is my index file larger if I INDEX ON an EVAL()? ANSWER: The EVAL() return value becomes the index key which can require more disk space than a simple character key. The difference in size is typical because different algorithms are used to create indexes depending on if a clause (EVAL, FOR, WHILE, etc.) is used or not. When creating indexes WITHOUT a clause: - The entire database is scanned - A big merge sort is performed on all the key - An index is built from this sorted list The result is a "balanced" tree. Using this method, all pages in the index are usually full. When records are added, new pages will usually have to be created because the existing pages are so full. (This may cause it to be slow during updates.) When creating indexes WITH a clause, First, an "empty" index is created, then, each record is evaluated, and the key is stuck into the index AS IT GOES, producing a tree that is sparse... usually leaving enough space to add new keys to existing pages. In this method, index size will not grow as fast when records are appended as in the previous method. This approach is used because it was felt to be the only way to produce an accurate progress meter/gauge using EVAL(). Although it is slower in creation and creates a larger index, the updates will generally be faster because it will normally find room on the page for the new key. For the same reason, these indexes will not grow as fast. Summary: Indexes with a clause use a different algorithm than those without. Those indexes using a clause will generally be larger in size, but faster during updates, than those not using a clause. ========== QUESTION #9 I get "UE 650" when I run my 5.2 application. ANSWER: Check for and rename any "SYSINIT" UDFs you may have. "SYSINIT" should be considered a reserved word. See question #7 (above) for other situations which might generate the UE 650 error. ========== QUESTION #10 How do I determine the current NetWare print queue? ANSWER: Use the CA-Tools NNETPJQ() function. ========== [End]