home *** CD-ROM | disk | FTP | other *** search
/ Shareware Overload / ShartewareOverload.cdr / database / db31186.zip / DB31186.TXT
Text File  |  1987-02-01  |  57KB  |  1,460 lines

  1. dBASE III PLUS
  2.  
  3. Anomalies and Workarounds
  4.  
  5. >>> @...CLEAR TO
  6.  
  7. @...CLEAR TO does not erase a single line from the screen, although the @...TO
  8. draws a single line on the screen.  The minimum vertical area @...CLEAR TO can
  9. erase is two lines.  For example,
  10.  
  11.       @ 2,0 TO 2,79
  12.       @ 2,5 CLEAR TO 2,25
  13.  
  14. draws a line from 2,0 to 2,79, but does not erase from 2,5 to 2,25.
  15.  
  16. To work around, use @ <row>,<col> with no parameter to erase the entire line. To
  17. erase portions, use @ <row>,<col> SPACE(<number of column positions>).
  18.  
  19. >>> @...GET...READ
  20.  
  21. Performing a GET on a PRIVATE memory variable that you created in a lower
  22. program does not allow input when you RETURN to the calling program and issue a
  23. READ.  For example,
  24.  
  25.       DO WHILE .T.
  26.         DO Test
  27.         READ           && Test.PRG sets up a PRIVATE variable.
  28.       ENDDO
  29.  
  30.       * ---Test.PRG
  31.       mem1 = SPACE(2)
  32.       @ 12,41 GET mem1  && This GET will never be READ.
  33.       RETURN
  34.  
  35. Under certain circumstances, this causes the PICTURE template of some @...GET
  36. commands to be read into the GET as a literal value.  This occurs if the command
  37. @...SAY DATE() is executed before READing the PRIVATE memory variable, and if
  38. the PICTURE template meets its own criteria as valid input.  For example, a "9"
  39. is valid input to the PICTURE template "9."  Once this error condition has
  40. occurred, every PICTURE template that meets its own criteria is READ as a
  41. literal value.  READ ignores the GET and the value of the field or memory
  42. variable is not changed.  The only way to stop this is to reload dBASE III PLUS.
  43.  For example,
  44.  
  45.       DO WHILE .T.
  46.         mem = SPACE(6)
  47.         @ 10,41 SAY DATE()
  48.         @ 11,41 GET mem PICTURE "999999"
  49.         READ
  50.         DO Test
  51.         READ      && Test.PRG sets up a PRIVATE variable.
  52.       ENDDO
  53.  
  54. In this example, the memory variable "mem" always READs as "999999" until you
  55. reload dBASE III PLUS.
  56.  
  57. >>> @...SAY/GET
  58.  
  59. Using @...SAY/GET to display information or scrolling text to line 0 with SET
  60. SCOREBOARD ON and SET STATUS OFF, will cause the information to remain on line 0
  61. and not scroll off the top of the screen as new information is displayed. For
  62. example, the following block of code will cause this anomaly.
  63.  
  64.       SET SCOREBOARD ON
  65.       SET STATUS OFF
  66.       item = "123456789"
  67.       @ 0,15 SAY "This is a test."
  68.       @ 5,10 SAY "What is this?" GET item
  69.       READ
  70.  
  71. In order to erase this line, you must use @ 0,0, CLEAR, SET SCOREBOARD ON/OFF,
  72. or SET STATUS ON/OFF.
  73.  
  74. To prevent conflict, avoid the use of line 0 with SET SCOREBOARD ON.  Be aware,
  75. however, when using CREATE SCREEN that the first line on the blackboard is line
  76. 0.  Additionally, IMPORT also writes to line 0 when creating its format file.
  77.  
  78. >>> ASSIST
  79.  
  80. 1. Performing any full-screen edit on a record found with the Locate option of
  81. the Position menu disables the Continue option.  When you return from a
  82. full-screen operation, Continue is no longer highlighted and so cannot be
  83. accessed.
  84.  
  85.  
  86.  If you need to LOCATE and CONTINUE, specify the LOCATE in ASSIST and CONTINUE
  87. at the dot prompt.  If you are EDITing FOR a condition, you can also EDIT with a
  88. FOR clause from the dot prompt.  If you wish to remain in the ASSIST, CREATE a
  89. QUERY, and EDIT from this subset of records.
  90.  
  91. 2. Whenever you choose a drive from any menu of available drives, that drive
  92. becomes the default.
  93.  
  94.  
  95.  
  96. >>> CREATE REPORT
  97.  
  98. Pressing Return twice when highlighting the contents area of the Columns menu,
  99. creates an empty column in your REPORT FORM.  Although you get no error message
  100. in CREATE REPORT, when you subsequently run the report, the error message
  101. "Syntax error in field expression" is returned.
  102.  
  103. To work-around, MODIFY the REPORT and delete the empty column with Ctrl-U.  You
  104. will find the location of the empty column in the Report Format area designated
  105. by a question mark.
  106.  
  107. >>> CREATE SCREEN
  108.  
  109. 1. If you are editing on the blackboard and you press Ctrl-T with the cursor on
  110. a line and column to the left of a special character (!,?,.,@), the computer
  111. freezes requiring a warm boot.
  112.  
  113. 2. If you terminate a box at column 79 and a row greater than 21 and then press
  114. PgUp, the box breaks into two sections, overwrites the menu line, and you cannot
  115. access line zero to edit it.  A subsequent save of the screen and re-entering
  116. CREATE/MODIFY SCREEN does not correct the problem.
  117.  
  118.  Note that this problem occurs only when SET STATUS is ON.  If you must
  119. terminate a box at this location, SET STATUS OFF before entering CREATE/MODIFY
  120. SCREEN.
  121.  
  122. >>> CREATE/MODIFY SCREEN
  123.  
  124. When you use the <NewField> option of the Contents submenu of the Modify menu to
  125. add a new field to the current database file, it is automatically created as a
  126. character field with a length of one and all the records of the previous
  127. structure are APPENDed into the new one at that point.  To create a new field
  128. that is not character type or has a length of greater than one, you must modify
  129. the attributes of the new field after it has been created. Be aware that if you
  130. are MODIFYing the STRUCTURE of a database file with a large number of records,
  131. each time you add or change an attribute of a field, the entire database file
  132. will be APPENDed into the new structure.  Multiple changes necessitates multiple
  133. APPENDs.  If you are anticipating making extensive changes to your database file
  134. structure from within CREATE/MODIFY SCREEN, use the following method:
  135.  
  136.    COPY STRUCTURE TO <a temporary database file>
  137.    USE <temporary database file>
  138.    CREATE/MODIFY SCREEN <your screen>
  139.  
  140.  
  141.  
  142. >>> CREATE/MODIFY VIEW
  143.  
  144. 1. You cannot permanently delete a filter formula in MODIFY VIEW.  It
  145.    appears to allow you to delete the filter and then SAVE the VIEW, but
  146.    the next time MODIFY VIEW is invoked with the same (.VUE) file, the
  147.    original filter formula will still be there.  The only way to delete the
  148.    filter formula is to SET VIEW TO the (.VUE) file, SET FILTER TO, and
  149.    CREATE VIEW FROM ENVIRONMENT.
  150.  
  151. 2. You cannot include a file from any subdirectory other than the current
  152.    directory using CREATE VIEW FROM ENVIRONMENT.  The default alias name is
  153.    included in the view file, returning "Alias already in use" when the
  154.    file is accessed with the SET VIEW TO command.
  155.  
  156.  
  157.  
  158. >>> FIND
  159.  
  160. You may receive the message "No find" when you use FIND with a macro (&) and
  161. in-line comments (&&) even though there are matching records in the index file.
  162.  
  163. FIND works correctly if the macro variable contains the entire key value, or if
  164. the key contains an embedded space and the variable contains key information up
  165. to the embedded space.  For example, if the key field contains "FIRST" or "FIRST
  166. LAST," the commands
  167.  
  168.       x = "FIRST"
  169.       FIND &x       && This is a comment.
  170.  
  171. execute correctly.  If, however, the variable contains "FIR," the example above
  172. returns the message "No find."  Terminating the macro with a period does not
  173. change the result.
  174.  
  175. To include in-line comments with a FIND and a macro, the comment must begin
  176. flush against the macro or terminator.  For example,
  177.  
  178.       x = "FIR"
  179.       FIND &x       && This does not work.
  180.       No find.
  181.       FIND &x.      && This does not work either.
  182.       No find.
  183.       FIND &x&&     This works.
  184.       FIND &x.&&    This works, as well.
  185.  
  186. >>> FOUND()
  187.  
  188. If you have SET DELETED ON and perform FIND or SEEK on a key with multiple
  189. occurrences, where the first occurrence is deleted, the FOUND() function will
  190. return a .F., even though a matching record has been found.
  191.  
  192. The same test can be made with the EOF() function.  After the SEEK or FIND
  193. command, EOF() will return a true value (.T.), if there is not a match.
  194.  
  195.  
  196.  
  197. >>> INDEX
  198.  
  199. INDEX or REINDEX may produce the error message "File is not accessible" and
  200. damage index files in use.  This occurs when the length of the key field and
  201. path to the .NDX file exceed 100 characters.  This does not occur with small
  202. database files, but adding records eventually produces the error.
  203.  
  204. For example, if the key length is 85 characters,
  205.  
  206.       INDEX ON <field> TO \Division\Three
  207.  
  208. returns the error message "File is not accessible," where
  209.  
  210.       INDEX ON <field> TO \Division\Four
  211.  
  212. creates the index file as expected.  The first path name is 15 characters and
  213. the second path name is 14.  The length of the filenames and directory names are
  214. not important individually as long as the combined length of the path name does
  215. not exceed, in this example, 14 characters.  Note that, not all key expression
  216. and path name combinations exceeding 100 characters produce this error.
  217.  
  218. >>> INDEX
  219.  
  220. The SET CENTURY ON command and the DTOC() function are not compatible for the
  221. purpose of creating an index file.  INDEXing ON the DTOC() of a date field with
  222. SET CENTURY ON will appear to index the file correctly.  The file may be
  223. accessed, the FIND or SEEK commands may be used, but any attempt to BROWSE,
  224.  
  225. >>> ON ERROR
  226.  
  227. ON ERROR does not execute correctly if TALK is ON and you encounter an error
  228. using LOCATE.  The situation occurs when two workstations are using the same
  229. database file.  For example, workstation one locks record five and then
  230. workstation two executes the following commands:
  231.  
  232.       ON ERROR ? "This is an error"
  233.       SET TALK ON
  234.       LOCATE FOR RECNO() = 10
  235.  
  236. LOCATE encounters record five as locked and returns the error message, "Record
  237. is in use by another."  The ON ERROR statement is not executed.
  238.  
  239. To work around, SET TALK OFF, and then ON ERROR executes as expected.
  240.  
  241. Protect sometimes creates encrypted .CRP files with embedded end-of-file
  242. characters.  The original .DBF file, however, is not affected.  At times, it
  243. appears that encrypting a 1000 record database file creates a .CRP file with
  244. between one and four embedded end-of-file characters.
  245.  
  246. To work-around, first COPY the STRUCTURE of the database file you want to
  247. encrypt.  Then in Protect, encrypt this new and empty database file.  When you
  248. return to the Administrator, USE the empty .CRP file and then APPEND FROM the
  249. original database file containing your data.  The result is the same as
  250. encrypting the original database file directly.
  251.  
  252. >>> READ
  253.  
  254. dBASE III PLUS stops execution when you issue a READ command with no active GETs
  255. until you press a key.  When this happens, the cursor is positioned to the right
  256. of its last screen position.
  257.  
  258. >>> READKEY()
  259. CompuServe              ASH-1727
  260.  
  261.  
  262.  
  263. If a full-screen operation is terminated by Ctrl-W or Ctrl-End in dBASE III
  264. PLUS, the READKEY() function will always return the value 270, regardless of
  265. whether the contents have been altered or not.  The READKEY() function should
  266. return a value of 14 if any of the pending GETs were not changed and Ctrl-W or
  267. Ctrl-End was pressed.
  268.  
  269. The Developer's Release, READKEY() returns the expected value 14.
  270.  
  271.  
  272.  
  273. >>> REINDEX
  274.  
  275. 1. Occasionally, SET INDEX TO works, but a subsequent REINDEX returns the error
  276. message "File is not accessible."  Other times, SET INDEX TO appears to work,
  277. but a GOTO returns the error message "Record is not in index."
  278.  
  279. 2. On rare occasions, SET TALK has been shown to affect REINDEXing large
  280. database files returning the error message "File is not accessible."  If you
  281. subsequently USE the database file with the index, the error message "Index
  282. damaged.  REINDEX should be done before using data" is returned.  If SET TALK is
  283. ON, however, REINDEX may work properly.
  284.  
  285. >>> SET
  286.  
  287. If SET HELP is ON, and an error occurs with any SET command, responding "Yes" to
  288. the HELP prompt returns the HELP screen relevant to the full-screen SET command,
  289. not the specific command that caused the error.
  290.  
  291. >>> SET CATALOG TO
  292.  
  293. 1. If you SET CATALOG TO <filename> when the maximum number of files is already
  294. open deletes all entries from the catalog, except those referring to files
  295. currently open.
  296.  
  297. 2. If you SET PATH TO to the root directory of any drive, SET CATALOG TO
  298. <filename> returns the error message "File is not accessible," if it must create
  299. a catalog file on a directory other than the default directory.  For example,
  300.  
  301.  
  302.    .SET PATH TO B:\         * ---dBASE III PLUS is not on the root directory.             * ---C:\Test.CAT does not already exist.
  303.    .SET CATALOG TO C:\Test         
  304.    File is not accessible.  <---Error message.
  305.  
  306. >>> SET COLOR TO
  307.  
  308. If SET STATUS is OFF and SET SCOREBOARD is ON, issuing the SET COLOR TO command
  309. from the dot prompt paints the SCOREBOARD area with the new color. Line 0 to the
  310. left of the SCOREBOARD area remains in the old color.  Scrolling the screen will
  311. not paint the left half of line 0 with the new color.  Issue a CLEAR, @ 0,0, SET
  312. STATUS, or SET SCOREBOARD command to paint that area of the screen with the
  313. chosen.
  314.  
  315. >>> SET FILTER TO
  316.  
  317. The following sequence of commands places your workstation in an endless loop,
  318. requiring you to warm boot your computer.
  319.  
  320.       SET EXCLUSIVE OFF
  321.       USE <database file>
  322.       SET FILTER TO <condition>
  323.       GO TOP
  324.       EDIT
  325.  
  326. The first EDIT screen appears and you can EDIT the record.  Once, however, you
  327. reach the last record that matches the FILTER condition, a PgDn or any other key
  328. that advances to the next record places your workstation in an endless loop.
  329.  
  330. To work-around, USE <database file> EXCLUSIVE or with an index file.
  331.  
  332. >>> SET HISTORY TO
  333.  
  334. SETting HISTORY TO a number greater than the default of 20 interferes with
  335. DISPLAY HISTORY.  The message "Press any key to continue..." appears, sometimes
  336. repeatedly, before the commands in HISTORY are displayed.  The message also
  337. appears intermittently as HISTORY scrolls.
  338.  
  339. >>> SET MESSAGE TO
  340. SET MESSAGE TO accepts any length message, although only the first 79 characters
  341. display.
  342.  
  343. >>> SET PRINT ON
  344.  
  345. There have been reported instances of the "Printer not ready" error message
  346. appearing on parallel as well as serial printers.  This occurs when you use SET
  347. PRINT ON, SET DEVICE TO PRINT, TO PRINT, or SET PRINTER TO to output to the
  348. printer.  Printing from DOS or other software packages works properly. There is
  349. no work-around if you experience this condition consistently.
  350.  
  351. >>> SET PRINTER TO
  352.  
  353. 1. SETting PRINTER TO a serial port works only intermittently.  Any attempt to
  354. SET PRINTER TO COM1 or SET PRINTER TO COM2 may return the error message "Printer
  355. not ready" although the printer is on-line and ready to print.
  356.  
  357.         The work-around is to use the RUN command to load the resident portion
  358. of PC-DOS MODE into memory.  For example,
  359.  
  360.         RUN MODE LPT1=COM1
  361.  
  362.         This work-around may fail, however, you running under COMPAQ DOS.
  363.  
  364. 2. Issuing SET PRINTER TO with no parameters stops all subsequent output to the
  365. printer.  Commands such as LIST TO PRINT and REPORT FORM TO PRINT echo to the
  366. screen but do not print.  In fact, while DISPLAY STATUS shows that output is
  367. assigned to the default port, LPT1, it has not been assigned to any device and
  368. therefore no printing can occur.  A SET DEVICE TO PRINT may appear to freeze the
  369. computer, but you are still fully functional, except that no data is being
  370. output to the printer.
  371.  
  372.         To resume, SET PRINTER TO <device name>.
  373.  
  374. 3. With a serial printer properly configured with MODE, if a SET PRINT ON
  375. command is issued, a later SET PRINT ON or SET DEVICE TO PRINT command return
  376. the "Printer not ready" error message.  SET PRINT OFF must be issued first. SET
  377. DEVICE TO PRINT followed by SET PRINT ON works as expected.  This problem does
  378. not occur with a parallel printer.
  379.  
  380.  
  381. >>> SET UNIQUE ON
  382.  
  383. INDEXing with SET UNIQUE ON or INDEX ON UNIQUE works with small database files
  384. (less than 100 records), but fails in one of several ways when INDEXing larger
  385. database files.
  386.  
  387.    1. INDEX with UNIQUE may seem to execute properly, but creates an index
  388.       file that is neither unique nor complete.
  389.  
  390.    2. INDEXing UNIQUE can freeze the computer causing one lost cluster on the
  391.       disk.  This leaves behind two files, an .NDX file containing 0 bytes and
  392.       a larger .W44 file.  The .W44 file is a temporary file created during
  393.       the indexing process.  Under normal circumstances, it is deleted when
  394.       INDEX terminates.
  395.  
  396.    3. INDEX with UNIQUE sometimes does not freeze the computer, but continues
  397.       to create an index file until all the available disk storage is
  398.       consumed, generating a "Disk is full" error message.  If an INDEX ON
  399.       UNIQUE command seems to take an inordinate amount of time and you
  400.       suspect that it is runaway, press Esc to terminate the INDEX command
  401.       operation and ERASE the incomplete .NDX and .W44 files.
  402.  
  403. >>> TOTAL
  404.  
  405. If you TOTAL ON <key field> TO <filename> with a database file that has no
  406. numeric fields, you may get an "Internal error: EVAL work area overflow" or
  407. "Internal error: Illegal opcode" error message.  The resultant file is created
  408. and control returns to the dot prompt.  Occasionally, this type of TOTAL
  409. operation returns the error message "Internal error: EVAL work area overflow",
  410. the DOS error message "Divide overflow," and then the computer freezes,
  411. requiring a cold boot.
  412.  
  413. >>> TRANSFORM()
  414.  
  415. If you use TRANSFORM() with an argument combining the @( and @B functions,
  416. displays extraneous characters following the output.  For example,
  417.  
  418.       ? TRANSFORM(-10,'@(B9999')
  419.       (10.00        ))                  <---Result.
  420.  
  421. The extra characters may be another parenthesis, a field name, or the argument
  422. from a previous function.
  423.  
  424. *--------------------------------------------------------------------------*
  425.  
  426. dBASE III PLUS
  427.  
  428.  Corrections in dBASE III PLUS 1.1
  429.  
  430.                         dBASE III PLUS 1.1
  431.                         Fixed Anomaly List
  432.  
  433.  This document lists the anomalies reported on dBASE III PLUS 1.0 that have been
  434. fixed for version 1.1.  The format of these items is a list of problems.  Each
  435. of the problems has been addressed by version 1.1, though this document does not
  436. say how.  In most cases, the fix would bring the software into agreement with
  437. the product documentation, and our design spec.  In some cases, the exact fix
  438. may not be obvious, and so an expanded list of bugs and their specific fixes
  439. would be useful.  Such a list will replace this one in the near future.  Until
  440. then, this is what we have. In a sense, this is a list of "negations", since
  441. nothing in this list should still be true!
  442.                              ---Kent
  443.                                 Primary Sysop
  444.                                 August 26, 1986
  445.              ----------------------------------------
  446.  
  447.  >>> @ GET / RANGE
  448.  
  449.  Pressing the SPACE bar does not clear the RANGE error message if STATUS is ON.
  450.  
  451. dBASE III PLUS
  452.  
  453.   Reference Notes
  454.  
  455. >>> "File is in use by another"
  456.  
  457. The message "File is in use by another" results from an attempt to USE a
  458. read-only database file with single-user dBASE Administrator.
  459.  
  460. To avoid this situation, use PROTECT to prevent editing of database files rather
  461. than making the files read-only.
  462.  
  463. >>> 43-Line Mode Using the Enhanced Graphics Adapter
  464.  
  465. Users of dBASE III PLUS who have the IBM Enhanced Graphics Adapter and Display
  466. will notice that this hardware is supported but not documented.  If you enter
  467. the full-screen configuration SET at the dot prompt and select the Color menu,
  468. you will notice that instead of "Color" or "Monochrome," "EColor25" and
  469. "EColor43" will be shown.   You can toggle between the regular 25-line mode and
  470. the IBM Enhanced Graphic Adapter's special 43-line mode by pressing the Return
  471. key.
  472.  
  473. Once in the 43-line mode, dBASE III uses all 43 lines of the screen in all
  474. display modes.  This includes regular display commands such as LIST or DISPLAY,
  475. as well as full-screen commands such as APPEND, EDIT, BROWSE, @..SAY, @..GET.
  476. Unfortunately, no command in dBASE III PLUS can toggle modes, other than the
  477. full-screen SET command.
  478.  
  479. In order to take advantage of this undocumented feature, set the switch settings
  480. on the IBM Enhanced Graphic Adapter should be as follows:
  481.  
  482.                SWITCHES
  483.       1       2       3       4
  484.      Off      On      On     Off
  485.  
  486. For more information on using of the IBM Enhanced Graphic Adapter, consult the
  487. manual provided with the card.
  488.  
  489. >>> @...SAY
  490.  
  491. >>> @...SAY [dBASE III PLUS]
  492.  
  493. When sending control codes to the printer with @...SAY, control codes are
  494. counted as characters by dBASE III PLUS although these characters are not
  495. printed by the printer.  This causes the print position coordinates for
  496. following @...SAY commands to the same line to be offset left by the number of
  497. control code characters sent to the printer.  For instance, if one control
  498. character is sent to row 5, the column coordinate on row 5 will be less by one.
  499.  
  500.    @ 5,0 SAY CHR(15)
  501.    @ 5,12 SAY "Test"
  502.  
  503. will print "Test" starting at column 11.  The control codes for the following
  504. example are for the C-Itoh 8510A printer.
  505.  
  506.    SET DEVICE TO PRINT
  507.    @ 5,5 SAY CHR(27) + '!' + 'Test' + CHR(27) + '"'
  508.                  ^------^-----------------^------^
  509.                         |--- Each character takes one space.
  510.                         This prints the word "Test" in boldface and sets
  511.                         the type back to normal.
  512.  
  513.    @ 5,50 SAY "Test"  <------- Prints at column 46.
  514.    @ 6,50 SAY "Test"  <------- Prints at column 50.
  515.  
  516. Press <CR> for more !
  517.  
  518. CompuServe              ASH-1745
  519.  
  520.  
  521.  
  522. >>> @..SAY/GET
  523.  
  524. With SET SCOREBOARD ON, an @...SAY to line 0 in a format file will not write in
  525. the scoreboard area, but an @...GET will read from this area.  This is
  526. consistent with previous versions of dBASE III.  However, the larger size of the
  527. SCOREBOARD area in dBASE III PLUS increases the likelihood of conflict between
  528. SET SCOREBOARD ON and @...SAY...GET.
  529.  
  530. >>> Access Disk
  531.  
  532. >>> ACCESS DISK [dBASE III PLUS - Multi-User]
  533.  
  534. Because of a disk manufacturing error in which a unique access code was not
  535. recorded on System Disk #1 and System Disk #1 Back-up of dBASE III PLUS,
  536. Ashton-Tate implemented an exchange policy for the affected products.  The
  537. serial numbers of the affected products are 2500001 through 2533960. Copies of
  538. dBASE III PLUS with other serial numbers are fully functional and are not
  539. affected.
  540.  
  541. The defect involves only local area network use.  It does not affect
  542. functionality or data integrity of dBASE III PLUS when used in its stand-alone,
  543. single-user mode.  The problem was created when a special access code that
  544. permits dBASE III PLUS to be networked with other copies of dBASE III PLUS  was
  545. not placed on System Disk #1 and System Disk #1 Back-up.  All other disks
  546. packaged with the product are not affected.
  547.  
  548.  
  549.  
  550. >>> Accessing Filenames with No Extensions
  551.  
  552. In dBASE III PLUS, you can now access and create files with no extensions.  To
  553. access or create such a file, use the double period (..) in place of the
  554. extension.  For example, you can access an external file with no extension in
  555. the APPEND FROM command.  Virtually all dBASE III PLUS commands that operate on
  556. files support this capability.
  557.  
  558. The following list of command lines show a number of ways to work with these
  559. files.
  560.  
  561.    * ---Import a file with no extension.
  562.    APPEND FROM Yourfile.. SDF
  563.  
  564.    * ---Export a file with no extension.
  565.    COPY TO Yourfile.. SDF
  566.  
  567.    * ---Open a database file with no extension.
  568.    USE Yourfile..
  569.  
  570.    * ---Rename a file with no extension.
  571.    RENAME Yourfile.. TO Yourfile.TXT
  572.  
  573. Note that DIR does not respect the (..) notation.  You must instead use the
  574. standard wildcard notation.
  575.  
  576. >>> APPEND FROM
  577.  
  578. Beginning with the Developer's Release of dBASE III, APPEND FROM [DELIMITED]
  579. will import delimited files without delimiters. Formerly, delimited files
  580. without delimiters would be erroneously APPENDed into the current database file.
  581.  
  582.  
  583. >>> ASSIST
  584.  
  585. 1. In any of the submenus of the Update, Position, Retrieve, or
  586.    Organize menus that support the building of search conditions, when
  587.    building a condition for a date type field, non-date entries are
  588.    accepted as an argument for the CTOD() function without an error
  589.    message.  In the Developer"s Release and earlier versions this would
  590.    fail to locate any date field.  But since the CTOD() function in dBASE
  591.    III PLUS converts non-date entries to blank dates, searching for
  592.    non-date entries on date fields with dBASE III PLUS will position the
  593.    record pointer at the first blank date encountered.  If there are no
  594.    blank dates in the database file, dBASE III PLUS will not locate any
  595.    records.
  596.  
  597. 2. With versions of dBASE III greater than 1.1, it is not possible to build
  598.    a search condition for blank spaces from ASSIST.  The Developer"s
  599.    Release would return the user to ASSIST without comment when this was
  600.    attempted.  dBASE III PLUS will attempt to execute the command.
  601.  
  602.    However, when it constructs the command line, blank spaces are
  603.    excluded.  For example, requesting ASSIST to
  604.  
  605.       LIST FOR <Field> = "    "
  606.  
  607.    actually executes:
  608.  
  609.       LIST FOR <Field> = ""
  610.  
  611.  
  612.    Since all conditions are true when compared to a null string, this is
  613.    identical to:
  614.  
  615.       LIST ALL
  616.  
  617. >>> BACKUP and RESTORE
  618.  
  619. You can BACKUP and RESTORE all dBASE Administrator files without concern, they
  620. are not copy-protected.  The only disks copy protected in the dBASE III PLUS or
  621. LAN PACK are System Disk #1, System Disk #1 (Backup), and the Access disk.
  622.  
  623.  
  624. >>> CASE
  625.  
  626. When using the CASE structure to branch control within your command files, there
  627. are two distinct behaviors if the either the DO CASE or ENDCASE statements are
  628. missing from the construct.
  629.  
  630. 1. If a CASE statement is not preceded by a DO CASE statement, commands
  631.    following the CASE statement and preceding the ENDCASE statement will
  632.    not execute.  In the following example, the LIST and WAIT commands do
  633.    not execute but the DISPLAY MEMORY statement does.
  634.  
  635.  
  636.      DO WHILE .T.
  637.         USE Test
  638.         CASE
  639.            LIST  <--------|
  640.            WAIT  <--------| Commands do not execute.
  641.        ENDCASE
  642.        DISPLAY MEMORY  <---------- Command executes.
  643.      ENDDO
  644.  
  645. 2. A CASE structure without a terminating ENDCASE will terminate execution
  646.    of a command file and return control to the dot prompt without an error
  647.    message when the first true CASE statement executes.
  648.  
  649.  
  650.  
  651. >>> CONFIG.DB
  652.  
  653. Using the keyword COMMAND in the CONFIG.DB or loading dBASE III PLUS with DBASE
  654. <Filename> alters the initial sign on.  If this keyword is not included in the
  655. CONFIG.DB file and the command DBASE is used to call the program up, dBASE III
  656. PLUS will display the license agreement on the screen and immediately present
  657. the dot prompt.  However, if COMMAND = <command> is included in CONFIG.DB or if
  658. dBASE III PLUS is invoked with a command filename on the DOS command line, the
  659. sign-on message will remain on the screen for approximately ten seconds or until
  660. Return is pressed before executing the command from CONFIG.DB or DOing the
  661. specified file.
  662.  
  663.  
  664. >>> COPY STRUCTURE EXTENDED
  665.  
  666. Sometimes you may want to make a copy of a database file structure without
  667. making an exact duplicate as you would with the COPY STRUCTURE command.  As a
  668. typical situation, you might have database file that is usable, but you think
  669. has a corrupted header.  You would like to COPY the database file with a new
  670. header and not have to recreate the structure by hand.  With COPY STRUCTURE
  671. EXTENDED, this task can be accomplished quite easily. The following block of
  672. code shows just exactly how.
  673.  
  674.    * ---Create new file.
  675.    USE <old file>
  676.    COPY STRUCTURE EXTENDED TO <extended file>
  677.    CLOSE DATABASE
  678.    CREATE <new file> FROM <extended file>
  679.    * ---COPY old file data to new file.
  680.    USE <new file>
  681.    APPEND FROM <old file>
  682.    CLOSE DATABASE
  683.  
  684. 1. Description
  685.  
  686. dBASE III PLUS and its predecessors, the Developer's Release, version 1.1, and
  687. version 1.0, do not allow you to COPY a DELIMITED file without delimiters and
  688. commas separating fields. Using the WITH BLANK option, you can get an text file
  689. without delimiters but you also get a text file without commas separating
  690. fields.  A standard delimited file looks like this:
  691.  
  692.    "field1","field2",12,.T.
  693.    ^      ^         ^
  694.    |      |         |
  695.    |      |          ----------- Field separator.
  696.     ---------------------------- Delimiter that bounds character
  697.                                                                         
  698. fields.
  699.  
  700. If the external processor that you are interfacing only supports comma separated
  701. text files without delimiters, you can use the following command file to create
  702. one.  The resulting text file will be in the following form:
  703.  
  704.    field1,field2,12,.T.
  705.  
  706. To run this program, type the following command line in a command file or at the
  707. dot prompt:
  708.  
  709.         DO Cpdelim WITH "<database filename>","<index filename>",;              
  710.                                 "<filter condition>","<output filename>"
  711.  
  712. The resulting file will have a (.TXT) extension.
  713.  
  714. 2. Program Example
  715.  
  716. * Program ...: Cpdelim.PRG 
  717. * Author ....: Christopher White 
  718. * Date ......: May 1, 1986 
  719. * Note(s) ...: Program to COPY to a DELIMITED file without delimiters. 
  720. * PARAMETERS dbf, ndx, condition, txtfile 
  721. * ---Set environment. 
  722. SET TALK OFF 
  723. SET SAFETY OFF 
  724. * ---Open database file to copy and define the working set of 
  725. * ---records. 
  726. filexp = dbf + IIF("" <> TRIM(ndx)," INDEX " + ndx,"") 
  727. USE &filexp
  728. SET FILTER TO &condition 
  729. GO TOP 
  730. * ---Create a structure extended file. 
  731. COPY STRUCTURE EXTENDED TO Temp 
  732. SELECT B 
  733. USE Temp 
  734. * ---Find the last field that is not a memo field. 
  735. lastrec = RECCOUNT() 
  736. GO BOTTOM 
  737. DO WHILE Field_type = "M" .AND.    (.NOT. BOF())
  738.    lastrec = lastrec - 1
  739.    SKIP -1 
  740. ENDDO 
  741. * ---Open output text file. 
  742. SET ALTERNATE TO &txtfile 
  743. SET ALTERNATE ON 
  744. * ---Output records. 
  745. SELECT A 
  746. DO WHILE .NOT. EOF()
  747.    SELECT B
  748.    GO TOP
  749.    * ---Output fields.
  750.    DO WHILE .NOT. EOF()
  751.       fld_nme = TRIM("A->" + Field_name)
  752.       DO CASE
  753.       CASE field_type = "C"
  754.          * ---Character field.
  755.          ?? TRIM(&fld_nme)
  756.       CASE field_type = "D"
  757.          * ---Date field.
  758.          ?? STR( YEAR(&fld_nme),4 ) +;
  759.             RIGHT( STR(100 + MONTH(&fld_nme),3),2 ) +;
  760.             RIGHT( STR(100 +   DAY(&fld_nme),3),2 )
  761.       CASE field_type = "N"
  762.          * ---Numeric field.
  763.          ?? LTRIM(STR(&fld_nme,Field_len,Field_dec))
  764.       CASE field_type = "L"
  765.          * ---Logical field.
  766.          ?? &fld_nme
  767.       ENDCASE
  768.       * ---Insert field separator.
  769.       ?? IIF(RECNO() = lastrec,"",",")
  770.       SKIP
  771.    ENDDO
  772.    * ---Insert record separator.
  773.    ?
  774.    * ---Get next output record.
  775.    SELECT A
  776.    SKIP 
  777. ENDDO 
  778. * ---Clean up. 
  779. CLOSE ALTERNATE 
  780. CLOSE DATABASES 
  781. ERASE Temp.DBF
  782. RETURN 
  783. * EOP Cpdelim.PRG
  784.  
  785.  
  786.  
  787. >>> CREATE FROM
  788.  
  789. The CREATE FROM command is used to create a database file from a database file
  790. that contains the target database file structure as records.  This a very useful
  791. but not well understood aspect of dBASE III PLUS.  It can be used as a vehicle
  792. for transferring file structures from other processors such as spreadsheets,
  793. word processors, and mainframes.  As an example, your mainframe consultant could
  794. add the target dBASE III database file structure as a delimited file to the
  795. download package he sends you.  It then would be an easy matter to CREATE the
  796. target database file structure FROM the extended structure definition, and then
  797. APPEND FROM the downloaded delimited data file.  Quite nicely this would free
  798. you from knowing or having to CREATE the target database file structure
  799. yourself.
  800.  
  801. If this prospect intrigues you, the structure of the delimited extended file
  802. must be as follows:
  803.  
  804.    Field  Field Name  Type       Width    Dec
  805.        1  Field_name  Character     10
  806.        2  Field_type  Character      1
  807.  
  808. Press <CR> for more !
  809.  
  810. CompuServe              ASH-1771
  811.  
  812.        3  Field_len   Numeric        3
  813.        4  Field_dec   Numeric        3
  814.    ** Total **                      28
  815.  
  816. Each record of the delimited extended file must have fields equivalent to the
  817. one listed above.  The file should be a standard delimited file obeying all the
  818. rules of the delimited file structure.  The following demonstrates what a
  819. typical delimited extended file looks like.
  820.  
  821.           ---------------- Field name
  822.                 |       --------- Data type
  823.          |      |    ----- Field length
  824.          |      |   |
  825.          v      v   v v -- Number of decimal places if numeric
  826.    "Field_one","C",15
  827.    "Field_two","N",10,2
  828.  
  829. To import this structure into dBASE III PLUS and translate it into a database
  830. file structure, perform the following steps.
  831.  
  832.    * ---Create mechanism for structure translation.
  833.    USE <any file>
  834.    COPY STRUCTURE EXTENDED TO Temp
  835.    USE Temp
  836.    ZAP
  837.    * ---Bring the structure to translate into the mechanism.
  838.    APPEND FROM <your structure> DELIMITED
  839.    USE
  840.    * ---Translate your structure into a database file.
  841.    CREATE <your file> FROM Temp
  842.    ERASE Temp.DBF
  843.  
  844. >>> Debugging Install Problems
  845.  
  846. There are several commands in dBASE III PLUS that can assist in debugging
  847. installation problems. The following is a list of command and debugging
  848. strategies.
  849.  
  850. 1. Is the dBASE Administrator running under a network?
  851.  
  852.         The dBASE Administrator can run in single-user or LAN mode.  Use the
  853.    command DISPLAY USERS to test if dBASE Administrator is operating under a
  854.    network.  In single-user mode, DISPLAY USERS returns no messages.  In LAN
  855.    mode, it lists the current users in the system.
  856.  
  857. 2. Are you executing dBASE III PLUS or the dBASE Administrator?
  858.  
  859.         The VERSION() function can be used to determine this.  It returns either
  860.    "dBASE III PLUS version 1.0" or "dBASE Administrator version 1.0" depending
  861.    on what software you are running.
  862.  
  863. 3. What operating are you running under?
  864.  
  865.         The OS() function can help you determine this information.  It returns
  866. the
  867.    version of DOS you are running under.  Note, however, it does return any
  868.    network information.
  869.  
  870. 4. What is read-write status of a file?
  871.  
  872.         The DOS 3.1 command ATTRIB <filename> can be used to display the
  873. read-write
  874.    status of the specified file.  If there is an uppercase R in front of the
  875.    filename, the file is read-only.  If there is no uppercase R, then the file
  876.    is read-write.  If you are operating on Novell, use the Novell FLAG
  877.    <filename> command.  It functions similarly to ATTRIB but lists more
  878.    detailed information about the file's attributes.
  879.  
  880. 5. What is the lock status of shared files?
  881.  
  882.         The IBM PC-NET command NET FILE, if executed on the server, will list
  883.    information on the lock status of shared files.
  884.  
  885. 6. What logical drives are assigned on the network?
  886.  
  887.         The IBM PC-NET command NET USE, lists all logical drives assigned to
  888. that
  889.    user.  The Novell command MAP the is equivalent command for NET USE on
  890.    Novell.
  891.  
  892. >>> DO WHILE
  893.  
  894. In versions of dBASE III earlier than the Developer's Release, the DO WHILE
  895. command will stop evaluating it's condition as soon as the expression is
  896. complete, ignoring characters beyond that point.  This makes it possible for
  897. conditions with a seemingly invalid expression to be executed.  For example,
  898.  
  899.    DO WHILE EOF() = .T.
  900.    DO WHILE EOF() = .F.   both equal   DO WHILE EOF()
  901.  
  902. and,
  903.  
  904.    DO WHILE .T. = EOF()   equals       DO WHILE .T.
  905.    DO WHILE .F. = EOF()   equals       DO WHILE .F.
  906.  
  907. In the Developer's Release and dBASE III PLUS the above conditions will return
  908. the error message, "Invalid operator."
  909.  
  910.  
  911.  
  912. >>> Documentation Error
  913.  
  914. 1. Page 5-25 of the Networking section of the dBASE III PLUS Reference Manual
  915.    shows the following command line.
  916.  
  917.                 CASE ERROR() = 158
  918.  
  919.         This command is supposed to trap the "File is in use by another"
  920.    condition.  The error number, however, is incorrect and the command line
  921.    should read:
  922.  
  923.                 CASE ERROR() = 108
  924.  
  925. 2. There are coding errors on pages 4-18, 5-27, and 5-30 of the Networking
  926.    section of the dBASE III PLUS Reference Manual.  The command line,
  927.  
  928.                 IF TIME = 250
  929.  
  930.         purports to test if an attempt to lock a database file failed.  It is
  931. not, however, a reliable coding method and should be changed to
  932.  
  933.                 IF .NOT. FLOCK()
  934.  
  935. 3. On page 4-18 of the Networking section of the dBASE III PLUS Reference
  936.    Manual, the command
  937.  
  938.                 times = 1
  939.  
  940.         should be inserted immediately before the SKIP command.  The routine on
  941. the
  942.    following page is an error handling routine executed if SKIP encounters a
  943.    locked record and expects the variable, times, to be reset each time it is
  944.    called.
  945.  
  946. 4. On page 5-30 of the Networking section of the dBASE III PLUS Reference
  947.    Manual, the UNLOCK command should be placed after the READ command.
  948.  
  949. >>> For 256K Machines
  950.  
  951. dBASE III PLUS runs with PC-DOS version 2.xx if you have 256K installed memory
  952. in your computer.  If you have a minimum of 384K of installed memory, dBASE III
  953. PLUS runs with PC-DOS version 3.xx as well as version 2.xx.
  954.  
  955. For 256K operation, two files are provided, CONFI256.SYS and CONFI256.DB, on
  956. System Disk #1.  These two files set system parameters for maximum overall
  957. performance of dBASE III PLUS in a 256K environment.
  958.  
  959. The CONFI256.SYS file contains:
  960.  
  961.    FILES = 20
  962.    BUFFERS = 4
  963.  
  964. Copy the CONFI256.SYS file to the root directory of the disk you boot DOS from
  965. or the directory set by the DOS COMSPEC command and rename it to CONFIG.SYS.  If
  966. CONFIG.SYS already exists, modify the file to include FILES = 20 and BUFFERS =
  967. 4.
  968.  
  969. The CONFI256.DB file contains:
  970.     COMMAND = ASSIST
  971.     STATUS = ON
  972.     BUCKET = 1
  973.     GETS = 35
  974.     MVARSIZ = 3
  975.     HISTORY = 10
  976.     TYPEAHEAD = 10
  977.  
  978. Copy CONFI256.DB into be placed in the same directory as DBASE.COM and rename it
  979. to CONFIG.DB.
  980.  
  981. The CONFI256.DB settings reduce the memory-intensive parameters allowing dBASE
  982. III PLUS to work in a 256K environment.  The smaller settings place the
  983. following limitations on dBASE III PLUS.
  984.  
  985. MVARSIZ is reduced to 3,000 bytes which is half the normal default size of 6,000
  986. bytes.  This reduces the amount of space available for memory variables and may
  987. cause incompatibilities with programs written with earlier versions of dBASE
  988. III.  Refer to the SAVE and RESTORE commands for ways to optimize use of memory
  989. variable space.
  990.  
  991. BUCKET size is reduced to 1,024 bytes, half the normal default size.  This
  992. reduces the amount of memory available for the PICTURE and RANGE options of the
  993. @...GET command, and may cause incompatibilities with programs written with
  994. earlier versions of dBASE III.
  995.  
  996. CREATE SCREEN is limited to one screen, with a maximum of 35 pending GETs.
  997. Format files created on machines with more memory may not work when moved to a
  998. 256K machine.  The limitation of 35 pending GETs may also cause
  999. incompatibilities with programs written with earlier versions of dBASE III.
  1000.  
  1001. The RUN command is not supported on computers with 256K of memory.  dBASE III
  1002. PLUS requires 256K, the RUN command requires additional memory for COMMAND.COM
  1003. plus the memory required by the external program.  This is consistent with
  1004. earlier versions of dBASE III.
  1005.  
  1006. The "Insufficient memory" message is an indication that some memory must be
  1007. released to allow dBASE III PLUS to continue with the operation.  When using
  1008. dBASE III PLUS with 256K RAM this message may result from a combination of
  1009. factors and varies with the size and number of database files, index files,
  1010. format files, and the HISTORY and TYPEAHEAD buffer sizes.
  1011.  
  1012. If the "Insufficient memory" message is received:
  1013.  
  1014. 1. Ensure that you are using the correct CONFIG.SYS and CONFIG.DB
  1015.    files, as listed above for 256K operation.
  1016.  
  1017. 2. Close one or more open files and then proceed.
  1018.  
  1019. Increasing the amount of RAM in your computer will significantly enhance the
  1020. performance of dBASE III PLUS.
  1021.  
  1022.  
  1023. >>> INKEY()
  1024.  
  1025. 1. The INKEY() function in the Developer's Release and dBASE III PLUS seems to
  1026.    return the wrong answer after a WAIT command has been executed.  For
  1027.    example,
  1028.  
  1029.                 WAIT            
  1030.         i = INKEY()             
  1031.         ? i
  1032.  
  1033.         The memory variable "i" will always contain the value zero no matter
  1034. what key was last pressed.  The reason for this is that WAIT pauses and waits
  1035.    for a key value from the keyboard or type-ahead buffer.  Once the key is
  1036.    sensed, it is taken from the buffer.  The INKEY() function also looks at
  1037.    this buffer for a key, but finds that the last key has been taken by the
  1038.    WAIT command and so returns a zero value.
  1039.  
  1040.    The correct method to poll the keyboard for a key press is to use either
  1041.    the WAIT command or the INKEY() function but not both in combination.  For
  1042.    example,             
  1043.  
  1044. * ---Use the WAIT command.              
  1045. WAIT TO choice 
  1046. DO CASE
  1047.     CASE choice = 19                        
  1048.         ...     
  1049.     CASE choice = 27                        
  1050.         ...             
  1051. ENDCASE
  1052.  
  1053. * ---Use the INKEY() function.                  
  1054. key = INKEY()   
  1055. DO WHILE key = 0                        
  1056.     key = INKEY()           
  1057. ENDDO
  1058.    
  1059. DO CASE             
  1060.     CASE key = 19               
  1061.         ...             
  1062.     CASE key = 27            
  1063.         ...             
  1064. ENDCASE
  1065.  
  1066. 2. The following program can be used to help you determine the key code for
  1067.    each key pressed.
  1068.         
  1069. SET ESCAPE OFF                  
  1070. SET TALK OFF            
  1071. esc = 27
  1072.                 
  1073. DO WHILE .T.                    
  1074.     key = INKEY()           
  1075.     DO WHILE key = 0                                
  1076.         key = INKEY()           
  1077.     ENDDO                   
  1078.     ? key                   
  1079.     IF key = esc                    
  1080.     EXIT                    
  1081.     ENDIF           
  1082. ENDDO           
  1083. SET TALK ON     
  1084. SET ESCAPE ON           
  1085. RETURN
  1086.  
  1087. >>> INPUT
  1088.  
  1089. The INPUT command behaves differently in different versions of dBASE III. In
  1090. versions 1.0 and 1.1, it accepts a carriage return as a valid response and does
  1091. not create a variable. If one exists, it is left intact.  Control is then
  1092. returned to the calling program or the dot prompt.  In the Developer's Release
  1093. and dBASE III PLUS, however, INPUT does not accept a carriage return as a valid
  1094. response.  It scrolls the screen up one line and awaits valid input each time a
  1095. carriage return is entered and control is not returned to the calling program or
  1096. dot prompt until a valid input is accepted.
  1097.  
  1098.  
  1099. >>> Interactive Mode
  1100.  
  1101. In dBASE III PLUS, you cannot continue command lines issued at the dot prompt
  1102. with a semicolon.  Previous versions supported this feature.
  1103.  
  1104. To continue a line beyond the width of the screen keep typing and the command
  1105. will scroll left.  In dBASE III PLUS, the command line is an editable 254
  1106. character, single line, horizontal scroll space.  All keys that are valid in
  1107. full-screen modes are valid at command line.
  1108.  
  1109.  
  1110. >>> LIST
  1111.  
  1112. The LIST command is designed to display "Record in use by another" if a record
  1113. is locked by a different workstation with RLOCK().  This performs according to
  1114. expectation unless record number 1 is locked with RLOCK(), in which case blank
  1115. data is displayed for the record.
  1116.  
  1117. There is no work-around for this situation.
  1118.  
  1119. >>> MODIFY STRUCTURE
  1120.  
  1121. 1. MODIFY STRUCTURE generates the error "NET 803: Network path not found" if
  1122.    the database file is in the root directory of any physical drive or logical
  1123.    drive.  Even if network drive F: is attached to the subdirectory \DBASE on
  1124.    the file server, it is still belongs to the logical root directory of drive
  1125.    F:.  The work-around is to move the file to a subdirectory or
  1126.  
  1127.         COPY TO Temp            
  1128.     MODIFY STRUCTURE
  1129.  
  1130.         After receiving the "NET 803" error message, the user must press A to
  1131.    abort.  The database file structure will have been modified but zero
  1132.    records will remain in file, then
  1133.  
  1134.                 APPEND FROM Temp
  1135.  
  1136. 2. MODIFY STRUCTURE generates the error "File is already open" if the database
  1137.    structure contains a memo field and there are no records in the file.
  1138.  
  1139.         The work-around is to add one blank record to file.
  1140.  
  1141. >>> Precedence of File Attributes
  1142.  
  1143. Page 3-24 of the Networking section of the dBASE III PLUS Reference Manual
  1144. states that "File and field privileges can be used to override the file access
  1145. read/write attribute established at the operating system or network shell
  1146. level."  This is incorrect.  Attributes of directories and files established at
  1147. the network level always have precedence over the dBASE Administrator Protect
  1148. mechanism.
  1149.  
  1150. >>> REPLACE
  1151.  
  1152. In addition to the ability to change the contents of fields in work areas other
  1153. than the currently selected one by creating a global field pool with SET FIELDS
  1154. TO <field list> and then REPLACEing into the remote area, you can also REPLACE
  1155. into the remote area by specifying the alias before the target field name.  For
  1156. example,
  1157.  
  1158.    * ---REPLACE with SET FIELDS.
  1159.  
  1160.    SELECT 1
  1161.    USE Fileone
  1162.    SELECT 2
  1163.    USE Filetwo
  1164.    SET FIELDS TO Fileone->Fieldone, Fieldtwo
  1165.    REPLACE Fieldone WITH Fieldtwo
  1166.  
  1167.    * ---REPLACE without a fields list.
  1168.    SELECT 1
  1169.    USE Fileone
  1170.    SELECT 2
  1171.    USE Filetwo
  1172.    REPLACE Fileone->Fieldone WITH Fieldtwo
  1173.  
  1174. >>> RESTORE
  1175.  
  1176. The dBASE III Reference Manual for all versions incorrectly states about the
  1177. RESTORE command that any memory variables STOREd as PUBLIC remain PUBLIC if the
  1178. ADDITIVE option is used.  The ADDITIVE option to RESTORE will allow the user to
  1179. RESTORE variables as PUBLIC only if they are declared PUBLIC before the RESTORE
  1180. FROM <Filename> ADDITIVE command is issued.  If the variables are not explicitly
  1181. declared PUBLIC, they will be RESTOREd as PRIVATE variables, regardless of their
  1182. status when STOREd and SAVEd.  For example,
  1183.  
  1184.    PUBLIC one, two
  1185.    STORE 1 TO one, two
  1186.    SAVE TO Mem
  1187.    CLEAR ALL
  1188.    RESTORE FROM Mem ADDITIVE  <-- Variables are RESTOREd
  1189.                                without being redeclared    PUBLIC.
  1190.  
  1191. will create PRIVATE variables "one" and "two," while,
  1192.  
  1193.    PUBLIC one, two
  1194.    STORE 1 TO one, two
  1195.    SAVE TO Mem
  1196.    CLEAR ALL
  1197.    PUBLIC one, two            <-- Variable is redeclared PUBLIC.
  1198.    RESTORE FROM Mem ADDITIVE
  1199.  
  1200. creates PUBLIC variables "one" and "two."
  1201.  
  1202. >>> SET COLOR
  1203.  
  1204. The SET COLOR TO command changed somewhat in the Developer's Release and dBASE
  1205. III PLUS.  Formerly, colors could be referenced by number or letter code.  With
  1206. the Developer's Release and dBASE III PLUS, only letter codes are accepted.
  1207. Additionally, there are several new options.  Black can now be referenced with
  1208. the letter code N, inverse video with the letter code I, and the screen can be
  1209. blanked with the code X.  The following table shows all the default color
  1210. attributes for dBASE III from version 1.0 through dBASE III PLUS.
  1211.  
  1212.                                                         Color Attribute Table
  1213.  
  1214.                                          Developer's Release
  1215.                   dBASE III              dBASE III PLUS
  1216.  
  1217. Color             Letter   Number        Letter Only
  1218.  
  1219. Black             <space>    0      |    N or <space> 
  1220. Blue              B         1      |    B 
  1221. Green             G          2      |    G 
  1222. Cyan              BG         3      |    BG 
  1223. Red               R          4      |    R 
  1224. Magenta          BR         5      |    BR 
  1225. Brown             GR         6      |    GR 
  1226. White          W or RB    7      |    W or RB
  1227.  
  1228. Other
  1229. Blank                               |    X 
  1230. Blinking          *                 |    * 
  1231. High intensity    +                 |    + 
  1232. Inverse video                       |    I 
  1233. Underline         U                 |    U
  1234.  
  1235. Three other capabilities are added to color in dBASE III PLUS. First, there is a
  1236. new function, ISCOLOR(), that returns a true value (.T.), if your monitor is in
  1237. color mode.  Second, SET COLOR supports a toggle syntax, ON/OFF, to toggle your
  1238. monitor between color and monochrome modes, if your machine supports both.
  1239. Lastly, a background option is added for machines that cannot set the background
  1240. of individual characters with the standard and enhanced options.
  1241.  
  1242. >>> SET DATE FRENCH
  1243.  
  1244.  
  1245.  
  1246. The format of date variable display varies between versions 1.1 and the
  1247. Developer's Release and dBASE III PLUS, when SET DATE is FRENCH.  For example,
  1248.                                      Developer's Release
  1249.                        Version 1.1       dBASE III PLUS
  1250.  
  1251.      SET DATE FRENCH    DD.MM.YY          DD/MM/YY
  1252.  
  1253. The Developer's Release and the dBASE III PLUS displays are identical to SET
  1254. DATE BRITISH.
  1255.  
  1256.  
  1257.  
  1258. >>> SET DELETED ON
  1259.  
  1260. SET DELETED ON can affect the FIND command when there is more than one record in
  1261. the database file with the same index key.  For example, suppose there are two
  1262. "Johnsons" in the database file.  The first is marked for deletion and the
  1263. second is locked with RLOCK() at a different workstation.  If SET DELETED is ON,
  1264. and you try to FIND "Johnson", you will get the message "No find" instead of the
  1265. expected "Record is in use by another."  Under any other circumstance, a FIND on
  1266.  
  1267.  
  1268. a record locked with RLOCK() returns the message "Record is in use by another"
  1269. and positions the record pointer to that record.
  1270.  
  1271. There is no work-around at this time.
  1272.  
  1273. >>> SET FIELDS TO
  1274.  
  1275. Issuing the SET FIELDS TO <Field list> command automatically SETs FIELDS ON,
  1276. regardless of the FIELDS status prior to issuing the SET FIELDS TO command.
  1277.  
  1278. The dBASE III PLUS Reference Manual states on page 5-169 of the Using section,
  1279. under the SET FIELDS TO command, "The list of fields is not active unless the
  1280. SET FIELDS command is ON."  This statement implies that the command SET FIELDS
  1281. ON must be executed explicitly to activate the current field list after creating
  1282. it.  Anytime the command SET FIELDS is executed either to create a fields list
  1283. or to add to one, FIELDS are SET ON.
  1284.  
  1285.  
  1286.  
  1287. >>> SET ORDER TO
  1288.  
  1289.  
  1290.  
  1291.  
  1292. You must reposition the record pointer after executing SET ORDER TO in dBASE III
  1293. PLUS.  The easiest way to do this is to issue the command:
  1294.  
  1295.    GO RECNO()
  1296.  
  1297. This will cause the record pointer to reposition itself to the current record
  1298. position updating the internal record pointer.  If, however, EOF() returns true
  1299. (.T.), this won't work.  In this case, use the following command:
  1300.  
  1301.    GO IIF(EOF(), RECCOUNT(), RECNO())
  1302.  
  1303.  
  1304.  
  1305. >>> SET RELATION TO
  1306.  
  1307. Throughout the documentation for dBASE III PLUS, there is some ambiguity about
  1308. the various ways you can link database files with SET RELATION TO.
  1309.  
  1310.  
  1311.  
  1312. SET RELATION TO relates two database files in three different ways.
  1313.  
  1314. 1. You can relate two database files with a key expression allowing you to
  1315.    create connections between database files based on value.  It is important
  1316.    to stress that you are not confined to a single common field.  The linking
  1317.    expression can be any legitimate dBASE III PLUS expression.  To work, the
  1318.    key expression must return a value from the source work area that matches a
  1319.    value in the master index file of the target work area.  Because the
  1320.    relation is created by an expression, you can take two dissimilar database
  1321.    file structures that contain common values and create a relation between
  1322.    them.  In exactly the same way, you can create a relation between database
  1323.    files that have common fields.  In both cases, the mechanism is the same:
  1324.    the relation is created by an expression.
  1325.  
  1326. 2. Another way to relate database files is by record number.  This type of
  1327.    relation allows you to link two database files having no common field
  1328.    values but have a one-to-one relation based on physical position.  Record
  1329.    one in the source corresponds to record one in the target file and so on.
  1330.    Generally, you will use this formulation to create a virtual database file
  1331.    where you need a number of fields greater than the dBASE III PLUS limit of
  1332.  
  1333.  
  1334.    128 per database file.
  1335.  
  1336.         When the record pointer moves in the source database file, the record
  1337.    pointer in the target moves to the same record number as the source
  1338.    record.  For example,
  1339.  
  1340.         * ---Setup and syntax with a physical relation.
  1341.         SELECT B
  1342.         USE File2
  1343.         SELECT A
  1344.         USE File1 INDEX File1
  1345.         SET RELATION TO RECNO() INTO File2
  1346.         * ---List records from File1 and File2.
  1347.         DO WHILE .NOT. EOF()
  1348.                 ? Field1, Field2, File2->Field1, File2->Field2
  1349.                 * ---Advance File1 and File2 pointer.
  1350.                 SKIP
  1351.         ENDDO
  1352.  
  1353.         * ---Setup and syntax with no relation.
  1354.  
  1355.  
  1356.         SELECT B
  1357.         USE File2
  1358.         SELECT A
  1359.         USE File1 INDEX File1
  1360.         * ---List records from File1 and File2.
  1361.         DO WHILE .NOT. EOF()
  1362.                 ? Field1, Field2, File2->Field1, File2->Field2
  1363.                 * ---Advance the File1 pointer.
  1364.                 SKIP
  1365.                 * ---Advance the File2 pointer.
  1366.                 recpos = RECNO()
  1367.                 SELECT B
  1368.                 GO recpos
  1369.                 SELECT A
  1370.         ENDDO
  1371.  
  1372.         In order to build various index sort orders, put all of your key fields
  1373. in
  1374.    the master database file as the diagram below indicates.  This is important
  1375.    since a relation based on RECNO() precludes the use of an index file in the
  1376.  
  1377.  
  1378.    target work area.
  1379.  
  1380.                 Master -----> Sub1 ------> Sub2                 (Keys)  
  1381.  (Non-keys)   (Non-keys)
  1382.  
  1383. 3. The last type of relation is a physical link between database files based
  1384.    on a numeric expression.     If the linking expression evaluates to numeric
  1385.    and the target database file is not INDEXed, then the target record pointer
  1386.    moves to the record number returned by the linking expression each time the
  1387.    source database file pointer moves.
  1388.  
  1389.         For example, the following linking expression relates two unINDEXed
  1390.    database files so each pair of adjacent records in the source database file
  1391.    points to a single record in the target file.
  1392.  
  1393.                 IIF(MOD(RECNO(),2)=1,INT(RECNO()/2)+1,INT(RECNO()/2))
  1394.  
  1395.    Record numbers one and two in the source point to record number one in the
  1396.    target, three and four in the source point to two in the target, and so on.
  1397.  
  1398.    This type of relation can be used to build virtual data structures based on
  1399.    a link that is a combination of value and physical location.
  1400.  
  1401. In general, it is important to your mastery of dBASE to understand the truly
  1402. dynamic nature of relating database files with SET RELATION TO.
  1403.  
  1404. For more information on SET RELATION TO, refer to the page D3-11 of the April
  1405. 1985 issue of TechNotes.
  1406.  
  1407. >>> SET RELATION TO
  1408.  
  1409. In versions 1.0 and 1.1 of dBASE III, a relation could be released with the
  1410. command SET RELATION.  In the Developer's Release and dBASE III PLUS, this
  1411. command returns a syntax error although it releases the RELATION.  The proper
  1412. and supported command syntax to release a relation is SET RELATION TO.
  1413.  
  1414. >>> SET SCOREBOARD/SET STATUS
  1415.  
  1416. The SET SCOREBOARD ON/OFF and SET STATUS ON/OFF commands will clear the entire
  1417. screen when issued in dBASE III PLUS.  In previous versions, SET SCOREBOARD
  1418. ON/OFF would affect only the SCOREBOARD area of the screen.
  1419.  
  1420. >>> SET VIEW TO
  1421.  
  1422. If any change has been made to any of the component parts of a view, invoking
  1423. that view file with SET VIEW TO will return an error message.  The specific
  1424. message will depend on the error in the view file.
  1425.  
  1426. For example, if the name of field in the fields of the view has been changed by
  1427. MODIFYing the STRUCTURE of one of the constituent database files, issuing the
  1428. SET VIEW TO command will return "Variable not found." Once this condition has
  1429. occurred, there is no way to open the view file and modify it, as MODIFY VIEW
  1430.  
  1431.  
  1432. will return the same error message.  The file must be deleted and re-created, or
  1433. the environment must be made consistent with the view file once more.
  1434.  
  1435.  
  1436.  
  1437. >>> UPDATE
  1438.  
  1439. If you are trying to UPDATE one database file from another and the relation
  1440. between them is many-to-one, you may have found that the UPDATE command does not
  1441. support this formulation.  The UPDATE command only updates the first instance in
  1442. the target database file.  This means that the UPDATE command is useful only
  1443. when the relation between the source and the target database files is
  1444. one-to-one.  To update your many-instance file from the single-instance file,
  1445. use the REPLACE command in combination with SET RELATION.  For example,
  1446.  
  1447.    SELECT 2
  1448.    USE <source> INDEX <source index>
  1449.    SELECT 1
  1450.    USE <target> INDEX <target index>
  1451.    SET RELATION TO <key> INTO <source>
  1452.  
  1453.  
  1454.    REPLACE ALL <target field1> WITH <source>-><field1>,;
  1455.                         <target field2> WITH <source>-><field2>,;
  1456.                         <target field3> WITH <source>-><field3>
  1457.  
  1458. the target file and so on.
  1459.    Generally, you will use this formulation to create a virtual database file
  1460.