home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 18 REXX / 18-REXX.zip / rxbas223.zip / rexxbase.INF (.txt) < prev    next >
OS/2 Help File  |  1999-03-31  |  90KB  |  4,089 lines

  1.  
  2. ΓòÉΓòÉΓòÉ 1. RexxBase The dBase Database For Rexx ΓòÉΓòÉΓòÉ
  3.  
  4. RexxBase and "The dBase Database for Rexx" are trademarks of American Coders, 
  5. LTD. 
  6.  
  7. OS/2 is a registered trademark of the International Business Machines 
  8. Corporation. 
  9.  
  10. dBase, dBase III and dBase IV are trademarks of Borland Corporation. 
  11.  
  12. Other trademarks are the trademarks of their respective trademark owners. 
  13.  
  14. Contacts: 
  15.  
  16. American Coders, LTD. 
  17.  
  18. Post Office Box 97462 
  19.  
  20. Raleigh, NC 27624 
  21.  
  22. (919) 846-2014 
  23.  
  24. Internet Mail: support@americancoders.com 
  25.  
  26. Spring 1999 Edition.  Version 2.23. 
  27.  
  28. Copyright 1993-99 American Coders LTD Raleigh NC USA 
  29.  
  30.  
  31. ΓòÉΓòÉΓòÉ 1.1. Rights and Limitations ΓòÉΓòÉΓòÉ
  32.  
  33. American Coders, LTD makes no warranties as to the information in this guide. 
  34. Additionally, American Coders Ltd is not responsible or liable for any loss or 
  35. damage of any kind resulting from use of this product. 
  36.  
  37. The Software is protected by the Copyright laws of the United States of 
  38. America, as well as by the Copyright laws of many other countries pursuant to 
  39. international treaties.  All rights reserved.  No part of the RexxBase computer 
  40. program, documentation or related files may be reproduced photocopied, stored 
  41. on a retrieval system, or transmitted except as provided by U. S. Copyright 
  42. law. 
  43.  
  44.  
  45. ΓòÉΓòÉΓòÉ 1.2. System Overview. ΓòÉΓòÉΓòÉ
  46.  
  47. RexxBase is a REXX external function DLL to be used by your command files to 
  48. access dBase files. RexxBase offers database access functions to Rexx command 
  49. procedures.  By using the RexxBase functions, Rexx programs gain access to tens 
  50. of thousands of database files written, primarily, for the PC/MS Dos 
  51. environment. 
  52.  
  53. RexxBase generates dBase field names and values that are available directly to 
  54. a Rexx program.  The Rexx program can change this data and update dBase files 
  55. directly.  Also database file control information is available to the Rexx 
  56. program.  This information includes such data as last date the database was 
  57. updated, number of records on file, field names, etc. 
  58.  
  59.  
  60. ΓòÉΓòÉΓòÉ 1.3. Version and Requirements. ΓòÉΓòÉΓòÉ
  61.  
  62. Version 2.23. 
  63.  
  64. RexxBase runs under 
  65.  
  66. o OS/2 2.x or higher and Warp 
  67.  
  68. o requires a minimum of 6 megabytes of RAM. 
  69.  
  70. o requires 500k of disk space. 
  71.  
  72.  
  73. ΓòÉΓòÉΓòÉ 1.4. Version History. ΓòÉΓòÉΓòÉ
  74.  
  75. The following is a basic history of changes for each version and release. 
  76.  
  77.  
  78. ΓòÉΓòÉΓòÉ 1.4.1. Version 2.23 March 31, 1999 ΓòÉΓòÉΓòÉ
  79.  
  80. Date routine would not allow a date of 2000/02/29. 
  81.  
  82.  
  83. ΓòÉΓòÉΓòÉ 1.4.2. Version 2.22 July 31, 1998 ΓòÉΓòÉΓòÉ
  84.  
  85. Corrected 3175 removed auto file closure from update header code.  This was 
  86. causing a stack overflow if the header could not be written. 
  87.  
  88. Corrected crash in CreateIndex function. 
  89.  
  90. Improved indexing logic 
  91.  
  92. Verified Y2K situation 
  93.  
  94.  
  95. ΓòÉΓòÉΓòÉ 1.4.3. Version 2.21 Apr 30, 1997 ΓòÉΓòÉΓòÉ
  96.  
  97. Documentation update.  Removed references to Assocication of Shareware 
  98. Professionals and UUNET access. 
  99.  
  100. CreateIndex and AddTagToMDX ignored the RexxBase.Unique value. 
  101.  
  102. Memo Field wiped out during update if the field is preceded by a date field 
  103.  
  104.  
  105. ΓòÉΓòÉΓòÉ 1.4.4. Version 2.20 Sept 30, 1996 ΓòÉΓòÉΓòÉ
  106.  
  107. MDX Tag file logic control improved. 
  108.  
  109. Added new Control variable RexxBase.IncludeCentury.  If it is set to YES then 
  110. all date logic and routines require century to be used in date fields. 
  111.  
  112. Corrected date calculation logic. 
  113.  
  114. ScanForRecord (rv) failed to set file positioning parameters when BOF was 
  115. reached. 
  116.  
  117. SummarizeDBF correction. 
  118.  
  119. GotoRecord function failed with MDX files. 
  120.  
  121. Added ADDON.EXT file for VisPro REXX users. 
  122.  
  123.  
  124. ΓòÉΓòÉΓòÉ 1.4.5. Version 2.11 May 1, 1996 ΓòÉΓòÉΓòÉ
  125.  
  126. Unique logic corrected,  duplicate keys were added to indexes even with unique 
  127. switch set to true. 
  128.  
  129. Simplified and improved export/import functions. 
  130.  
  131. Current key not set correctly. Broke update logic. 
  132.  
  133. Improved indexing logic for tags. 
  134.  
  135. Packing logic improved. 
  136.  
  137.  
  138. ΓòÉΓòÉΓòÉ 1.4.6. Version 2.10 March 21, 1996 ΓòÉΓòÉΓòÉ
  139.  
  140.  Added new function to registered DLL.  RexxBase_WriteDBFWithLock. This will 
  141. allow serialization of database writes and prevent errors when multiple hits 
  142. occur to the same database file and associated index and text files. 
  143.  
  144. Added database variable "databasename".dbasefileformat.   This returns dBase3 
  145. or dBase4, based on the dbf's format.  Note: without MDX files or MEMO fields a 
  146. DBF file format defaults to dBase3. 
  147.  
  148. Added internal record locking to registered version (rv) through the use of 
  149. semaphores. 
  150.  
  151. Added database variable "databasename".dbasefileformat.   This returns dBase3 
  152. or dBase4, based on the dbf's format.  Note: without MDX files or MEMO fields a 
  153. DBF file format defaults to dBase3. 
  154.  
  155. Recompiled INSTALL.EXE and REXXBASE.EXE with newest version of VisPro/REXX. 
  156. (3.01). 
  157.  
  158. DLL program would allow for only 3 MDX tags. 
  159.  
  160. EXE program could not create indexes with numeric fields. 
  161.  
  162. Modify function was using the current file's dBaseFileFormat field instead of 
  163. the global field.  Thereby, preventing conversions of files from one format to 
  164. another. 
  165.  
  166. Documentation failed to fully describe the RexxBase.ERROR control variable. 
  167.  
  168. Corrected documentation with regards to specifying a TAG name when opening a 
  169. file. 
  170.  
  171. Writes followed immediately by an Update would not create valid indexes and 
  172. caused SYS3175 errors. 
  173.  
  174. Corrected EXE errors when catalog file contained a DBF that doesn't exist. 
  175.  
  176. Corrected problem when adding an MDX tag in the EXE.  The tag name would not 
  177. show up. 
  178.  
  179. PackDBF function didn't update the header correctly. 
  180.  
  181.  
  182. ΓòÉΓòÉΓòÉ 1.4.7. Version 2.06 January 22, 1996 ΓòÉΓòÉΓòÉ
  183.  
  184.  Install program was marked as not executable. 
  185.  
  186.  
  187. ΓòÉΓòÉΓòÉ 1.4.8. Version 2.05 January 2, 1996 ΓòÉΓòÉΓòÉ
  188.  
  189.  Install program now looks for config.sys in BOOTed drive. 
  190.  
  191.  If unable to allocate memory in OPEN function was causing a 3175 error. 
  192.  
  193.  Enhanced record scope. 
  194.  
  195.  Added logic to allow binary data to be stored in CHAR and MEMO fields. 
  196. RexxBase.UseStringLengths = "YES|NO" 
  197.  
  198.  Corrected ModifyDBF function causing a 3175 error. 
  199.  
  200.  Added code to registered version to prevent copyright notice from being 
  201. displayed. 
  202.  
  203.  Improved Export/Import function handling of signed numeric data. 
  204.  
  205.  
  206. ΓòÉΓòÉΓòÉ 1.4.9. Version 2.04  Sept 30, 1995 ΓòÉΓòÉΓòÉ
  207.  
  208. ReadPrevDBF and others failed when GOTORecord(bottom) was used. 
  209.  
  210. UpdateDBF failed for both NDX and MDX indexes. 
  211.  
  212. Packing dBase IV style DBT files used incorrect blocking factor. This could and 
  213. most likely did create exception conditions. 
  214.  
  215. Packing dBase IV MDX files got larger in size. 
  216.  
  217. Reset Index Logic failed to verify if any TAGs were in use. 
  218.  
  219.  
  220. ΓòÉΓòÉΓòÉ 1.4.10. Version 2.03  July 31, 1995 ΓòÉΓòÉΓòÉ
  221.  
  222. The switch AllowDuplicateIndexes now works in conjunction with the index file 
  223. indicator Duplicates Allowed. 
  224.  
  225. MDX indexing algorithm improved and corrected. 
  226.  
  227. NDX file links updated incorrectly for large files. 
  228.  
  229. SummarizeDBF function corrupted field that was before a numeric field. 
  230.  
  231. Added VX-Rexx macro facility. 
  232.  
  233. INSTALL program was not HPFS aware. 
  234.  
  235.  
  236. ΓòÉΓòÉΓòÉ 1.4.11. Version 2.02  June 15, 1995 ΓòÉΓòÉΓòÉ
  237.  
  238. Corrected documentation error. RexxBase.SkipDeleted switches use ON or OFF. 
  239.  
  240. Corrected DLL to reflect documentation: RexxBase.dBaseFileType should be 
  241. RexxBase.dBaseFileFormat.  Use RexxBase.dBaseFileFormat. 
  242.  
  243. Corrected DLL to reflect documentation: RexxBase.dBaseFileType default value is 
  244. "dbase3". 
  245.  
  246. Improved GotoRecord function.  Specifically TOP parameter and indexes now in 
  247. synch. 
  248.  
  249. CREATE and PACKING functions failed for dBase IV memo fields. 
  250.  
  251. Corrected documentation error.  References to RexxBase.AllowDuplicateIndex 
  252. corrected to RexxBase.AllowDuplicateIndexes. 
  253.  
  254. Corrected Reindex problem. Not building control blocks correctly. Function 
  255. required closing DBF before using again. 
  256.  
  257. Patched Reindex function memory leak. 
  258.  
  259. CreateDBFFrom function required closing source DBF before using again. 
  260.  
  261. Restored CloseAllDBF to unregistered version. 
  262.  
  263. Filter routines recalculated dates twice to produce incorrect results(rv). 
  264.  
  265. REXXBASE.EXE concatenated INDEX filenames incorrectly. 
  266.  
  267.  
  268. ΓòÉΓòÉΓòÉ 1.4.12. Version 2.01 May 16, 1995 ΓòÉΓòÉΓòÉ
  269.  
  270.  Shareware zip files missing component files for install process. 
  271.  
  272.  
  273. ΓòÉΓòÉΓòÉ 1.4.13. Version 2.00 May 15, 1995 ΓòÉΓòÉΓòÉ
  274.  
  275. Corrected bug with filtering routines. 
  276.  
  277. Corrected bug with duplicate indexes not being caught. 
  278.  
  279. Corrected bug in Rexxbase_DateCalc. 
  280.  
  281. Added function Rexxbase_DayOfWeek to registered version. 
  282.  
  283.  
  284. ΓòÉΓòÉΓòÉ 1.4.14. Version 2.00 BETA Apr. 15, 1995 ΓòÉΓòÉΓòÉ
  285.  
  286.  Introduced dBase IV MDX files and the following new functions: 
  287.  
  288. o RexxBase_SetIndexTagName 
  289.  
  290. o RexxBase_CreateMultipleIndexFile 
  291.  
  292. o RexxBase_AddTagToIndex 
  293.  
  294. o RexxBase_DropTagFromIndex 
  295.  
  296. o RexxBase_LockRecord 
  297.  
  298. o RexxBase_FindAndLockRecord 
  299.  
  300. o RexxBase_GotoAndLockRecord 
  301.  
  302. Introduced several new control fields: 
  303.  
  304. o RexxBase.AllowDuplicateIndexes 
  305.  
  306. o Rexxbase.Logical 
  307.  
  308. o RexxBase.SkipDeleted 
  309.  
  310. o RexxBase.dBaseFileType 
  311.  
  312. Introduced several new database control variables: 
  313.  
  314. o dbfname.IndexCount 
  315.  
  316. o dbfname.IndexFilename 
  317.  
  318. o dbfname.IndexFileType.xxx 
  319.  
  320. o dbfname.IndexFields.xxx 
  321.  
  322. o dbfname.IndexTagname.xxx.yyy 
  323.  
  324. o dbfname.IndexTagFields.xxx.yyy 
  325.  
  326. o dbfname.IndexValue.xxx(.yyy) 
  327.  
  328. Corrected several bugs and documentation errors. 
  329.  
  330. Bug in subroutine db3_create_index failed to generate valid anchor block. 
  331.  
  332. Documentation failed to inform that the filter string of the RexxBase_FilterDBF 
  333. and RexxBase_ScanForRecord must be enclosed in quotes. 
  334.  
  335.  
  336. ΓòÉΓòÉΓòÉ 1.5. American Coders Ltd. ΓòÉΓòÉΓòÉ
  337.  
  338. American Coders, LTD. 
  339.  
  340. Post Office Box 97462 
  341.  
  342. Raleigh, NC 27624 
  343.  
  344. (919) 846-2014 
  345.  
  346. Internet: support@americancoders.com 
  347.  
  348. Programming Solutions For Your Business 
  349.  
  350.  
  351. ΓòÉΓòÉΓòÉ 1.6. How To Install ΓòÉΓòÉΓòÉ
  352.  
  353. Use the INSTALL.EXE that came with this program 
  354.  
  355. The install program allows you to specify if you want your CONFIG.SYS file 
  356. updated.  If you chose this you will be prompted for a backup filename. 
  357.  
  358. You can specify if you want all the files moved to the target directory. 
  359.  
  360. Copy the RXBASCAT.DBF and RXBASCAT.MDX files to the target directory. 
  361.  
  362. Have the RexxBase Front-End program copied to the desktop. 
  363.  
  364. RexxBase is distributed using the shareware system. Every shareware copy of the 
  365. program comes with a 30 day trial offer.  If after 30 days the user finds the 
  366. RexxBase product acceptable they are expected to register and pay $95.00 plus 
  367. shipping/handling/taxes.  Registered users of the product receive a free 
  368. upgrade to the current release, 90 days free support via Internet Email and 30 
  369. days free telephone support. 
  370.  
  371.  
  372. ΓòÉΓòÉΓòÉ 1.7. What Registering Gets You. ΓòÉΓòÉΓòÉ
  373.  
  374. When you register you receive: 
  375.  
  376. o The registered user DLL. 
  377.  
  378. o Limited rights to distribute the DLL. 
  379.  
  380. o Upgrade to the next release and immediate bug fixes. 
  381.  
  382. o Hardcopy documentation. 
  383.  
  384. o One months telephone and e-mail support. 
  385.  
  386.  
  387. ΓòÉΓòÉΓòÉ 1.8. How To Register Your Copy ΓòÉΓòÉΓòÉ
  388.  
  389. We have several methods for you to register your copy of RexxBase. 
  390.  
  391. o Registration Form. 
  392.  
  393. o BMT - BMT Micro - 800/Fax/WWW Credit Card Orders 
  394.  
  395. There is also a shipping and handling charge.  For U.S. and Canada 
  396. registrations it is $5.00. For all other international orders $10.00. 
  397.  
  398. If you are planning to order ten (10) or more copies use the SITELICE.DOC in 
  399. your package. 
  400.  
  401.  
  402. ΓòÉΓòÉΓòÉ 1.8.1. Registration Form. ΓòÉΓòÉΓòÉ
  403.  
  404. Print out the file REGISTER.FRM.  Attach a check and mail to us using the 
  405. address on the form (or see above). 
  406.  
  407.  
  408. ΓòÉΓòÉΓòÉ 1.8.2. BMT - BMT Micro - 800/Fax/WWW Credit Card Orders ΓòÉΓòÉΓòÉ
  409.  
  410. American Coders is using the services of BMT Micro. They provide a service for 
  411. all shareware authors, for a small fee, paid by the author, they will take 
  412. credit card orders through their BBS, Internet Web site, 800 number and Fax. 
  413. Once BMT has notified us of your order, we will ship it within two days. 
  414. BMT Micro 
  415. PO Box 15016 
  416. Wilmington, NC 28408 U.S.A. 
  417.  
  418. Voice Orders: 8am - 7pm EST (-5 GMT) 
  419. (800) 414-4268 (orders only) 
  420. (910) 791-7052 
  421.  
  422. Fax Orders: (910) 350-2937  24 hours / 7 Days 
  423.        (800) 672-1672  24 hours / 7 Days 
  424.  
  425. Online Orders via modem (910) 350-8061  10 lines, all 14.4K 
  426.               (910) 799-0923  Direct 28.8K line 
  427.  
  428.  
  429. Ordering and general ordering questions: 
  430.    Via AOL bmtmicro 
  431.    Via MSN bmtmicro 
  432.    Via Prodigy HNGP66D 
  433.    Via Compuserve 74031,307 
  434.    via Internet orders@bmtmicro.com 
  435.          telnet@bmtmicro.com 
  436.          http://www.wilmington.net/bmtmicro 
  437.  
  438.  BMT accepts Visa, Mastercard, Discover, American Express, Money Order, 
  439. Cashiers Check, Personal Check.  Please do not send cash in the mail.  Personal 
  440. checks are subject to clearance. 
  441.  
  442. Any questions about the status of the shipment of the order, refunds, 
  443. registration options, product details, technical support, volume discounts, 
  444. dealer pricing, site licenses, etc, must be directed to 919-846-2014 or write 
  445. American Coders at our address. -or- Internet Mail: support@americancoders.com 
  446.  
  447.  
  448. ΓòÉΓòÉΓòÉ 2. RexxBase File Structures. ΓòÉΓòÉΓòÉ
  449.  
  450. Every attempt has been made to keep the RexxBase DBF, DBT, MDX and NDX files 
  451. similar. But due to the inherent differences between DOS, OS2, REXX and PRG 
  452. files we could not make the fully functional features of a MDX or NDX file 
  453. similar.  For example, no dBase functions are allowed in index definitions. 
  454.  
  455.  
  456. ΓòÉΓòÉΓòÉ 2.1. File Naming. ΓòÉΓòÉΓòÉ
  457.  
  458. RexxBase does not assume default file extensions.  This due to the inherent 
  459. nature of HPFS files with its flexible file names. When opening and creating 
  460. files be sure to use the DBF, NDX and MDX suffix. Since memo files are never 
  461. defined, DBT files are the exception to this rule. 
  462.  
  463.  
  464. ΓòÉΓòÉΓòÉ 2.2. Database (DBF) File. ΓòÉΓòÉΓòÉ
  465.  
  466. There should be no difference between RexxBase DBF files and other xBase DBF. 
  467. If you feel that you found an inconsistency with RexxBase DBF files, please 
  468. notify us immediately. 
  469.  
  470.  
  471. ΓòÉΓòÉΓòÉ 2.3. Memo (DBT) File. ΓòÉΓòÉΓòÉ
  472.  
  473. There two different formats for DBT files. Both are dependent on which file 
  474. type was used when the DBF file is created. 
  475.  
  476. DBT files used to store MEMO field data, look like regular variables to Rexx. 
  477. With our testing, we have stored fields up to 262144 bytes in length. The 
  478. theoretical limit is 2^32-1.  This may incompatible with other xBase products. 
  479. Please refer to the Memo and binary data storage sections for more information. 
  480.  
  481.  
  482. ΓòÉΓòÉΓòÉ 2.3.1. Memo (DBT) File for dBase III format. ΓòÉΓòÉΓòÉ
  483.  
  484. dBase III files use a less dynamic storage algorithm. These files tend to get 
  485. rather large if the DBF file is not packed often. 
  486.  
  487. DBT files used to store MEMO field data.  With our testing, we have stored 
  488. fields up to 262144 bytes in length. The theoretical limit is 2^32-1. This may 
  489. incompatible with other xBase products. Please refer to the Memo and binary 
  490. data storage sections for more information. 
  491.  
  492.  
  493. ΓòÉΓòÉΓòÉ 2.3.2. Memo (DBT) File for dBase IV format. ΓòÉΓòÉΓòÉ
  494.  
  495. dBase IV files use a garbage collection algorithm to reuse space from formerly 
  496. used memo disk space. The algorithm is a LRU. While the files won't grow as 
  497. rapidly as dBase III DBTs. It's still a good idea to pack the associated DBF. 
  498.  
  499.  
  500. ΓòÉΓòÉΓòÉ 2.4. Index (NDX) File Field Differences. ΓòÉΓòÉΓòÉ
  501.  
  502. The ability to use index files is an integral part of any good database system. 
  503. We have introduced, what we feel, is an improved, yet limited, features to 
  504. index files in RexxBase. 
  505.  
  506. ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ
  507. ΓöéDifferenceΓöéDescription                                  Γöé
  508. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  509. ΓöéSimple    ΓöéRexxBase does not use xBase functions within Γöé
  510. ΓöéData TypesΓöéindex functions.  Nor does it use inverse    Γöé
  511. Γöé          Γöédefinitions, i.e. using a minus sign to move Γöé
  512. Γöé          Γöéin a reverse key scan.                       Γöé
  513. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  514. ΓöéMixing    ΓöéRexxBase allows the mixing of Character,     Γöé
  515. ΓöéData TypesΓöéNumeric and Date data types.  All data in    Γöé
  516. Γöé          Γöéthis format are treated as Character by      Γöé
  517. Γöé          ΓöéRexxBase.                                    Γöé
  518. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  519. ΓöéDate Data ΓöéDate data types are treated as Character dataΓöé
  520. ΓöéTypes     Γöéand stored in the index in the native format.Γöé
  521. Γöé          ΓöéDate data types can be concatenated together Γöé
  522. Γöé          Γöéwith other data types. Some xBase products   Γöé
  523. Γöé          Γöéstore date in the index in a floating point  Γöé
  524. Γöé          Γöéformat.  By removing the floating point      Γöé
  525. Γöé          Γöéformat you should see a improvement in index Γöé
  526. Γöé          Γöéfile accessing for data types.               Γöé
  527. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  528. ΓöéNumeric   ΓöéNumeric data types are stored in a floating  Γöé
  529. ΓöéData TypesΓöépoint format.  When a key is defined as      Γöé
  530. Γöé          Γöénumeric all of the fields are summed         Γöé
  531. Γöé          Γöétogether.                                    Γöé
  532. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  533. ΓöéAccessing ΓöéThe only time you may access NDX files from  Γöé
  534. ΓöéxBase NDX Γöéother xBase programs is if the dBase index   Γöé
  535. Γöéfiles.    Γöéfile is strictly Character or Numeric fields Γöé
  536. Γöé          ΓöéONLY. Indexes using xBase functions are not  Γöé
  537. Γöé          Γöésupported by RexxBase.                       Γöé
  538. ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ
  539.  
  540. See also Rexxbase.Unique. 
  541.  
  542. See also Rexxbase.AllowDuplicateIndexes. 
  543.  
  544.  
  545. ΓòÉΓòÉΓòÉ 2.5. Multiple Index (MDX) File Field Differences. ΓòÉΓòÉΓòÉ
  546.  
  547. The ability to use index files is an integral part of any good database system. 
  548. We have introduced, what we feel, is an improved, yet limited, features to 
  549. index file in RexxBase. 
  550.  
  551. ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ
  552. ΓöéDifferenceΓöéDescription                                  Γöé
  553. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  554. ΓöéSimple    ΓöéRexxBase does not use xBase functions within Γöé
  555. ΓöéData TypesΓöéindex functions.  Nor does it use inverse    Γöé
  556. Γöé          Γöédefinitions, i.e.  using a minus sign to moveΓöé
  557. Γöé          Γöéin a reverse key scan.                       Γöé
  558. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  559. ΓöéMixing    ΓöéRexxBase allows the mixing of Character,     Γöé
  560. ΓöéData TypesΓöéNumeric and Date data types.  All data in    Γöé
  561. Γöé          Γöéthis format are treated as Character by      Γöé
  562. Γöé          ΓöéRexxBase.                                    Γöé
  563. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  564. ΓöéDate Data ΓöéDate data types are treated as Character dataΓöé
  565. ΓöéTypes     Γöéand stored in the index in the native format.Γöé
  566. Γöé          ΓöéDate data types can be concatenated together Γöé
  567. Γöé          Γöéwith other data types. Some xBase products   Γöé
  568. Γöé          Γöéstore date in the index in a floating point  Γöé
  569. Γöé          Γöéformat.  By removing the floating point      Γöé
  570. Γöé          Γöéformat you should see a improvement in index Γöé
  571. Γöé          Γöéfile accessing for data types.               Γöé
  572. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  573. ΓöéNumeric   ΓöéNumeric data types are stored in a floating  Γöé
  574. ΓöéData TypesΓöépoint format.  When a key is defined as      Γöé
  575. Γöé          Γöénumeric all of the fields are summed         Γöé
  576. Γöé          Γöétogether.                                    Γöé
  577. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  578. ΓöéAccessing ΓöéThe only time you may access MDX files from  Γöé
  579. ΓöéxBase MDX Γöéother xBase programs is if the dBase index   Γöé
  580. Γöéfiles.    Γöéfile is strictly Character or Numeric fields Γöé
  581. Γöé          ΓöéONLY. Indexes using xBase functions are not  Γöé
  582. Γöé          Γöésupported by RexxBase.                       Γöé
  583. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  584. ΓöéFOR       ΓöéThe FOR logical filter is not supported.     Γöé
  585. Γöéfilters.  Γöé                                             Γöé
  586. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  587. ΓöéDescendingΓöéDescending indexes are not supported.        Γöé
  588. ΓöéIndexes   Γöé                                             Γöé
  589. ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ
  590.  
  591. See also Rexxbase.Unique. 
  592.  
  593. See also Rexxbase.AllowDuplicateIndexes. 
  594.  
  595.  
  596. ΓòÉΓòÉΓòÉ 3. How Initialize REXX For RexxBase Functions. ΓòÉΓòÉΓòÉ
  597.  
  598. Before calling any RexxBase functions your REXX command file must register the 
  599. RexxBase DLL.  To do this use the REXX command RXFUNCADD.  You need to register 
  600. only one RexxBase function - Rexxbase_Init.  Rexxbase_Init, when called, will 
  601. register all of the other RexxBase routines.  Since Rexxbase_Init cannot 
  602. register itself, your Rexx program must register it. 
  603.  
  604. Use RXFUNCADD to register the Rexxbase_Init function. 
  605.  
  606. Once registered, RexxBase will not have to be registered until the next time 
  607. you restart OS/2. 
  608.  
  609. If you want your REXX program can register the RexxBase functions. 
  610.  
  611. The format of the command is RXFUNCADD(FUNCTION, DLL, PROCEDURE) 
  612.  
  613. FUNCTION is the name of the RexxBase routine as your procedure will call it. 
  614.  
  615. DLL is the name of the RexxBase DLL file.  (Unless you rename it, it will 
  616. always be REXXBASE). 
  617.  
  618. PROCEDURE is the name of the function internal to the RexxBase DLL. 
  619.  
  620. Your program should contain the following: 
  621.  
  622. /* REXX */
  623. ret = rxfuncadd(rexxbase_init,Rexxbase,"Rexxbase_Init")
  624. ret = rexxbase_init()
  625.  
  626.  
  627. ΓòÉΓòÉΓòÉ 3.1. Example of Dropping a RexxBase Function. ΓòÉΓòÉΓòÉ
  628.  
  629. When your procedure is done with the RexxBase functions it can drop the 
  630. RexxBase functions.  This may help reduce memory requirements and free up 
  631. system resources.  Once dropped, a function will have to be reregistered if it 
  632. is to be used again. 
  633.  
  634. rxfuncdrop(rexxbase_opendbf,Rexxbase,"Rexxbase_OpenDBF") 
  635.  
  636. Return codes most likely to be returned are: 
  637.  
  638. o  0 - OK. 
  639. o  40 - function not found. 
  640.  
  641. For more information about return codes from Rexx, refer to the IBM 
  642. documentation. 
  643.  
  644.  
  645. ΓòÉΓòÉΓòÉ 4. The RexxBase Functions. ΓòÉΓòÉΓòÉ
  646.  
  647. This release of RexxBase offers several functions to read, write and update 
  648. your database records.  Also available are functions to create database, modify 
  649. database structures and to sort databases. 
  650.  
  651.  
  652. ΓòÉΓòÉΓòÉ 4.1. General Database Processing Functions. ΓòÉΓòÉΓòÉ
  653.  
  654. The following are considered general functions.  These functions allow you to 
  655. open, read, write, update, move within, and close database files. 
  656.  
  657.  
  658. ΓòÉΓòÉΓòÉ 4.1.1. Rexxbase_OpenDBF. ΓòÉΓòÉΓòÉ
  659.  
  660. Description.  Prior to processing a database file, the file must be opened. 
  661. When your procedure opens the database file several activities occur. 
  662.  
  663. o The database file is opened. 
  664. o RexxBase creates database related stem variable concerning system and file 
  665.   status. 
  666. o RexxBase creates a stem variable containing field names, types and sizes. 
  667. o If indexes are specified then these files are opened. 
  668.  
  669. Purpose. 
  670.  
  671. To open the database for processing. 
  672.  
  673. Format. 
  674.  
  675. rexxbase_opendbf('dbfname'[,'TAG=tagfieldname'index1|[,index2[,..]]]) 
  676.  
  677. Parameters. 
  678.  
  679. dbfname 
  680.           The REXX variable contains the name of your database as it is known 
  681.           to the operating system. 
  682. TAG='tagfieldname' 
  683.           If the DBF has an associated MDX file you can open the DBF and 
  684.           specify which TAG to be used as an index. Due to the interpretive 
  685.           nature of REXX, place this option in quotes. Otherwise REXX will 
  686.           interpret it as a logical statement and replace with either 1(TRUE) 
  687.           or 0(FALSE). THIS IS AN OPTIONAL PARAMETER AND MUST BE SPECIFIED 
  688.           IMMEDIATELY AFTER THE DBF OPTION. 
  689. index1 
  690.           The master index file name as it is known to the operating system. 
  691.           Unlike the dbfname, which is the REXX variable name passed within 
  692.           quotes.  The index file name is the OS/2 filename.  You can use a 
  693.           REXX variable to pass the name, just don't put it in quotes.  THIS IS 
  694.           AN OPTIONAL PARAMETER. 
  695. index2 .. 
  696.           The alternative index file names as they are known to the operating 
  697.           system. Like the master index file name, they are the OS/2 filenames. 
  698.           You can use a REXX variable to pass the name, just don't put it in 
  699.           quotes.  THIS IS AN OPTIONAL PARAMETER. 
  700.  
  701. You must set the database name in the variable prior to use.  And you must pass 
  702. the variable name in a string.  For example. 
  703.  
  704. myfilename = 'c:\xbase\machines.dbf'
  705. ret = rexxbase_opendbf('myfilename')
  706.  
  707. Return Value  Description 
  708.  
  709. ''. 
  710.           Normal 
  711.  
  712. No REXX DBF Name Specified 
  713.           The first parameter of function call is missing. 
  714.  
  715. Bad Variable Name 
  716.           The variable name passed to the routine is not valid 
  717.  
  718. No File Name Assigned To Variable. 
  719.           The variable was not assigned a value. 
  720.  
  721. Database Name Already In Use. 
  722.           The name passed is already assigned to another opened database. 
  723.  
  724. Can't Open. 
  725.           Operating System error.  File and system errors are written to the 
  726.           console, printer or  rexxbase.error  stem variable. 
  727.  
  728. Missing Index Filename, Database Is Open. 
  729.           The MDX file switch is set in the database control block, but the 
  730.           associated MDX file can not be found. 
  731.  
  732. Can't Open Index, Database File Opened. 
  733.           The RexxBase could not open any one of the index files specified. 
  734.           Depending on which file failed, any index files specified after it 
  735.           will not be opened. 
  736.  
  737. Database Tied To A Join 
  738.           The database is already in use by the RexxBase_JoinDBF function. (See 
  739.           registered user functions.) 
  740.  
  741. Missing Index Tag Name,  Database is open. 
  742.           Tag was used as second parameter but no tag field name was found. 
  743.  
  744. No Index Tag File Opened,  Database is open. 
  745.           The DBF does not have an associated MDX file. 
  746.  
  747. Tag Index File Has No Tags,  Database is open. 
  748.           The MDX file has no tags defined 
  749.  
  750. Index Tag Name Not Found,  Database is open. 
  751.           The tag field name used in the second parameter was not found in the 
  752.           tag field list of the MDX. 
  753.  
  754.  For multi-user access refer to the following RexxBase variable: 
  755.  
  756. o Rexxbase.Read 
  757.  
  758. o Rexxbase.Write 
  759.  
  760. o Rexxbase.Share 
  761.  
  762. Sample Without An Index File 
  763.  
  764. /* REXX */
  765. dbf = 'c:\users\net.dbf'
  766. ret = rexxbase_opendbf('dbf')
  767. if ret \= '' then do
  768.    say ret
  769.    exit
  770.  end
  771.  
  772. Sample With An Index File 
  773.  
  774. /* REXX */
  775. dbf = 'c:\users\net.dbf'
  776. ret = rexxbase_opendbf('dbf','c:\users\net.ndx')
  777. if ret \= '' then do
  778.   say ret
  779.   exit
  780. end
  781.  
  782. Sample With A TAG 
  783.  
  784. /* REXX */
  785. dbf = 'c:\users\net.dbf'
  786. ret = rexxbase_opendbf('dbf','TAG=NETNAME')
  787. if ret \= '' then do
  788.   say ret
  789.   exit
  790. end
  791.  
  792.  
  793. ΓòÉΓòÉΓòÉ 4.1.2. Rexxbase_CloseDBF. ΓòÉΓòÉΓòÉ
  794.  
  795. Description.  When your procedure is done using the database file it should be 
  796. closed.  This allows your program to update the file correctly. 
  797.  
  798. Purpose. 
  799.  
  800. To close the database. 
  801.  
  802. Format. 
  803.  
  804. rexxbase_closedbf('dbfname') 
  805.  
  806. Parameters. 
  807.  
  808. dbfname 
  809.           The REXX variable contains the name of your database as you defined 
  810.           it in the Rexxbase_OpenDBF function. 
  811.  
  812. The name of the database is defined in a REXX variable.  You must pass the 
  813. variable name in a string.  For example. 
  814.  
  815. myfilename = 'c:\xbase\machines.dbf'
  816. ret = rexxbase_closedbf('myfilename')
  817.  
  818. Return Value  Description 
  819.  
  820. ''. 
  821.           Normal 
  822.  
  823. No REXX DBF name Specified 
  824.           The first parameter of function call is missing. 
  825.  
  826. Unknown Database Name. 
  827.           The name found, in the passed parameter, is not the same used to open 
  828.           a database. 
  829.  
  830. Database Tied To A Join 
  831.           The database is already in use by the RexxBase_JoinDBF function. (See 
  832.           registered user functions.) 
  833.  
  834. Sample. 
  835.  
  836. /* REXX */
  837. dbf = 'c:\users\net.dbf'
  838. ret = rexxbase_opendbf('dbf')
  839. if ret \= '' then do
  840.    say ret
  841.    exit
  842.  end
  843. ret = rexxbase_closedbf('dbf')
  844. if ret \= '' then do
  845.   say ret
  846.   exit
  847.  end
  848. say the number of dbf record(s) are dbf.recordcount
  849.  
  850. Trick. Since the REXX environment is an integral part of the operating system 
  851. and persistent nature of the REXX variable pool, you will run into trouble if 
  852. you inadvertently leave a database open. One trick to get around this problem 
  853. is to close the DBF before you open it.  If you ignore the return code from 
  854. RexxBase your program will continue to operate as normal. 
  855.  
  856.  
  857. ΓòÉΓòÉΓòÉ 4.1.3. Rexxbase_CloseAllDBF. ΓòÉΓòÉΓòÉ
  858.  
  859. Description.  When your procedure is done using all of the database files they 
  860. should be closed.  This allows your program to update the files correctly. 
  861.  
  862. Purpose. 
  863.  
  864. To close all opened databases. 
  865.  
  866. Format. 
  867.  
  868. rexxbase_closealldbf() 
  869.  
  870. Parameters. 
  871.  
  872. N/A 
  873.           N/A 
  874.  
  875. The function does not use any parameters. For example, 
  876.  
  877. rexxbase_closealldbf()
  878.  
  879. Return Value  Description 
  880.  
  881. ''. 
  882.           Normal 
  883.  
  884. Even though there are no other return values.  The internal processing errors 
  885. may be found in the  rexxbase.error  stem variable. 
  886.  
  887. Sample. 
  888.  
  889. /* REXX */
  890. dbf = 'c:\users\net.dbf'
  891. ret = rexxbase_opendbf('dbf')
  892. if ret \= '' then do
  893.   say ret
  894.   exit
  895.  end
  896. dbf2 = 'c:\users\addr.dbf'
  897. ret = rexxbase_opendbf('dbf2',addr.ndx)
  898. if ret \= '' then do
  899.   say ret
  900.   exit
  901.  end
  902. ret = rexxbase_closealldbf)
  903. if ret \=''  then do
  904.   say ret
  905.   exit
  906.  end
  907.  
  908.  
  909. ΓòÉΓòÉΓòÉ 4.1.4. Rexxbase_ReadDBF. ΓòÉΓòÉΓòÉ
  910.  
  911. Description.  Read the database fields into the REXX variables.  This commands 
  912. reads the next record in the file. 
  913.  
  914. Purpose. 
  915.  
  916. To read the next sequential record in the database. 
  917.  
  918. If the database was opened with an index, then the next record in the index 
  919. list is read. 
  920.  
  921. Format. 
  922.  
  923. rexxbase_readdbf('dbfname') 
  924.  
  925. Parameters. 
  926.  
  927. dbfname 
  928.           The REXX variable contains the name of your database as you defined 
  929.           it in the Rexxbase_OpenDBF function. 
  930.  
  931. This function can avoid reading deleted records by setting 
  932. Rexxbase.SkipDeleted. 
  933.  
  934. The name of the database is defined in a REXX variable.  You must pass the 
  935. variable name in a string.  For example. 
  936.  
  937. /* REXX */
  938. myfilename = 'c:\xbase\machines.dbf'
  939. rexxbase_readdbf('myfilename')
  940.  
  941. Return Value  Description 
  942.  
  943. ''. 
  944.           Normal 
  945.  
  946. No REXX DBF Name Specified 
  947.           The first parameter of function call is missing. 
  948.  
  949. BOF. 
  950.           End of file condition.  No record is read.  Record field values 
  951.           remain unchanged. 
  952.  
  953. Unknown Database Name. 
  954.           The name found in the passed parameter is not the same used to open 
  955.           the database. 
  956.  
  957. Internal File Processing Error. 
  958.           Record area could not be read. Find the XX error code in the 
  959.           rexxbase.error  stem variable. Where XX is a return code from OS/2. 
  960.           If XX is equal to 5 then the operating system is denying access to 
  961.           that area.  If XX is equal to 33 then the record area has been 
  962.           locked.  For other values you can type on the command line 'HELP XX' 
  963.           to find the values for XX. 
  964.  
  965. Record Locked 
  966.           The file has been locked by another process. 
  967.  
  968. Database Tied To A Join 
  969.           The database is already in use by the RexxBase_JoinDBF function. (See 
  970.           registered user functions.) 
  971.  
  972. Sample. 
  973.  
  974. /* REXX */
  975. dbf = 'c:\users\net.dbf'
  976. ret = rexxbase_opendbf('dbf')
  977. if ret \= '' then do
  978.   say ret
  979.   exit
  980.  end
  981. ret = rexxbase_readdbf('dbf')
  982. if ret = BOF then do
  983.   say end of file reached
  984.  end
  985.  
  986.  
  987. ΓòÉΓòÉΓòÉ 4.1.5. Rexxbase_ReadPrevDBF. ΓòÉΓòÉΓòÉ
  988.  
  989. Description.  Read the database fields into the REXX variables.  This commands 
  990. reads the previous record in the file. 
  991.  
  992. Purpose. 
  993.  
  994. To read the previous sequential record in the database. 
  995.  
  996. If the database was opened with an index, then the previous record in the index 
  997. list is read. 
  998.  
  999. Format. 
  1000.  
  1001. rexxbase_readprevdbf('dbfname') 
  1002.  
  1003. Parameters. 
  1004.  
  1005. dbfname 
  1006.           The REXX variable contains the name of your database as you defined 
  1007.           it in the Rexxbase_OpenDBF function. 
  1008.  
  1009. This function can avoid reading deleted records by setting 
  1010. Rexxbase.SkipDeleted. 
  1011.  
  1012. The name of the database is defined in a REXX variable.  You must pass the 
  1013. variable name in a string.  For example. 
  1014.  
  1015. myfilename = 'c:\xbase\machines.dbf'
  1016. rexxbase_readprevdbf('myfilename')
  1017.  
  1018. Return Value  Description 
  1019.  
  1020. ''. 
  1021.           Normal 
  1022.  
  1023. No REXX DBF Name Specified 
  1024.           The first parameter of function call is missing. 
  1025.  
  1026. Unknown Database Name. 
  1027.           The name found in the passed parameter is not the same used to open 
  1028.           the database. 
  1029.  
  1030. Internal File Processing Error 
  1031.           Record area could not be read. Find the XX error code in the 
  1032.           rexxbase.error  stem variable. Where XX is a return code from OS/2. 
  1033.           If XX is equal to 5 then the operating system is denying access to 
  1034.           that area.  If XX is equal to 33 then the record area has been 
  1035.           locked.  For other values you can type on the command line 'HELP XX' 
  1036.           to find the values for XX. 
  1037.  
  1038. TOF. 
  1039.           Top of file condition.  No record is read.  Record field values 
  1040.           remain unchanged. 
  1041.  
  1042. Record Locked 
  1043.           The file has been locked by another process. 
  1044.  
  1045. Database Tied To A Join 
  1046.           The database is already in use by the RexxBase_JoinDBF function. (See 
  1047.           registered user functions.) 
  1048.  
  1049. Sample. 
  1050.  
  1051. /* Read the 10th and 9th records*/
  1052. dbf = 'c:\users\net.dbf'
  1053. ret = rexxbase_opendbf('dbf')
  1054. if ret \= '' then do
  1055.   say ret
  1056.   exit
  1057.  end ret =
  1058. rexxbase_gotorecord('dbf',10)
  1059. ret = rexxbase_readprevdbf('dbf')
  1060. ret = rexxbase_closedbf('dbf')
  1061.  
  1062. Trick. 
  1063.  
  1064. If you must have reverse indexes, open the database with the intended index, go 
  1065. to the BOTTOM of the database and readprev until TOF. 
  1066.  
  1067.  
  1068. ΓòÉΓòÉΓòÉ 4.1.6. Rexxbase_GoToRecord. ΓòÉΓòÉΓòÉ
  1069.  
  1070. Description.  The command will position at a specified record and read it. 
  1071.  
  1072. Purpose. 
  1073.  
  1074. To read a particular record in the database. 
  1075.  
  1076. Format. 
  1077.  
  1078. rexxbase_gotorecord('dbfname',recordnumber) 
  1079.  
  1080. Parameters. 
  1081.  
  1082. dbfname 
  1083.           The REXX variable contains the name of your database as you defined 
  1084.           it in the Rexxbase_OpenDBF function. 
  1085. recordnumber 
  1086.           The record number to read, or the following words 
  1087.  
  1088.            TOP - to go to the top of the database. 
  1089.  
  1090.            BOT or BOTTOM - to go to the bottom of the database. 
  1091.  
  1092. This function can avoid reading deleted records by setting 
  1093. Rexxbase.SkipDeleted. 
  1094.  
  1095. The name of the database is defined in a REXX variable.  You must pass the 
  1096. variable name in a string.  For example. 
  1097.  
  1098. myfilename = 'c:\xbase\machines.dbf'
  1099. rexxbase_gotorecord('myfilename',1)
  1100.  
  1101. Return Value  Description 
  1102.  
  1103. ''. 
  1104.           Normal 
  1105.  
  1106. No REXX DBF Name Specified 
  1107.           The first parameter of function call is missing. 
  1108.  
  1109. No Record Number Specified. 
  1110.           You did not pass a record number in the second argument. 
  1111.  
  1112. Unknown Database Name. 
  1113.           The name found in the passed parameter is not the same used to open 
  1114.           the database. 
  1115.  
  1116. Bad Record Number. 
  1117.           You passed a record number that is invalid or is less than one.  No 
  1118.           record is read. 
  1119.  
  1120. BOF. 
  1121.           You passed a record number that is greater than the number on the 
  1122.           file or used the BOT or BOTTOM option.  No record is read.  Record 
  1123.           field values remain unchanged. BOF is a good return code if you used 
  1124.           the BOT or BOTTOM option. 
  1125.  
  1126. TOF. 
  1127.           You used the TOP option in the record number field.  This is a good 
  1128.           return code. 
  1129.  
  1130. Record Locked 
  1131.           The file has been locked by another process. 
  1132.  
  1133. Database Tied To A Join 
  1134.           The database is already in use by the RexxBase_JoinDBF function. (See 
  1135.           registered user functions.) 
  1136.  
  1137. Sample. 
  1138.  
  1139. /* REXX */
  1140. /* assume the database has a field name AMOUNT.  */
  1141. /* this example will get the last AMOUNT on file*/
  1142. dbf = 'c:\users\net.dbf'
  1143. ret = rexxbase_opendbf('dbf')
  1144. if ret \= '' then do
  1145.   say ret
  1146.   exit
  1147.  end
  1148. ret = rexxbase_gotorecord('dbf',dbf.recordcount)
  1149. if ret = '' then say dbf.amount
  1150. ret = rexxbase_closedbf('dbf')
  1151.  
  1152.  
  1153. ΓòÉΓòÉΓòÉ 4.1.7. Rexxbase_WriteDBF. ΓòÉΓòÉΓòÉ
  1154.  
  1155. Description.  This will add a new record to the end of the database. 
  1156.  
  1157. Purpose. 
  1158.  
  1159. To add records to the database. 
  1160.  
  1161. Format. 
  1162.  
  1163. rexxbase_writedbf('dbfname') 
  1164.  
  1165. Parameters. 
  1166.  
  1167. dbfname 
  1168.           The REXX variable contains the name of your database as you defined 
  1169.           it in the Rexxbase_OpenDBF function. 
  1170.  
  1171. The name of the database is defined in a REXX variable.  You must pass the 
  1172. variable name in a string.  For example. 
  1173.  
  1174. /* */
  1175. myfilename = 'c:\xbase\machines.dbf'
  1176. ret = rexxbase_opendbf('myfilename')
  1177. rexxbase_writedbf('myfilename')
  1178. ret = rexxbase_closedbf('myfilename')
  1179.  
  1180. Return Value  Description 
  1181.  
  1182. ''. 
  1183.           Normal 
  1184.  
  1185. No REXX DBF Name Specified 
  1186.           The first parameter of function call is missing. 
  1187.  
  1188. Unknown Database Name. 
  1189.           The name found in the passed parameter is not the same used to open 
  1190.           the database. 
  1191.  
  1192. Record With Duplicate Key Not Written 
  1193.           The control variable RexxBase.AllowDuplicatesIndexes has been set to 
  1194.           NO.  A  matching index has been found.  Therefore, the record was 
  1195.           written to the DBF file.  Remember, deleted records do not have their 
  1196.           index entries removed until the database has been packed.  Also, do 
  1197.           not confuse this with the control variable RexxBase.Unique, which 
  1198.           allows all records to be written to the database but prevents a 
  1199.           duplicate index entry from being created. See 
  1200.           Rexxbase.AllowDuplicateIndexes. 
  1201.  
  1202. Database Tied To A Join 
  1203.           The database is already in use by the RexxBase_JoinDBF function. (See 
  1204.           registered user functions.) 
  1205.  
  1206. Sample. 
  1207.  
  1208. /* REXX */
  1209. /* this example copies the first record of the database to the end */
  1210. dbf = 'c:\users\net.dbf'
  1211. ret = rexxbase_opendbf('dbf')
  1212. if ret \= '' then do
  1213.   say ret
  1214.   exit
  1215.  end
  1216. ret = rexxbase_readdbf('dbf')
  1217. if ret \= '' then do
  1218.   say read failed with ret
  1219.   exit
  1220.  end
  1221. ret = rexxbase_writedbf('dbf')
  1222. if ret \  = '' then do
  1223.   say write failed with ret
  1224.   exit
  1225.  end
  1226. ret = rexxbase_closedbf('dbf')
  1227. if ret \  = '' then do
  1228.   say close failed with ret
  1229.   exit
  1230.  end
  1231.  
  1232.  
  1233. ΓòÉΓòÉΓòÉ 4.1.8. Rexxbase_UpdateDBF. ΓòÉΓòÉΓòÉ
  1234.  
  1235. Description.  This function will rewrite data at the current record position. 
  1236.  
  1237. Purpose. 
  1238.  
  1239. To update a record. 
  1240.  
  1241. Format. 
  1242.  
  1243. rexxbase_updatedbf('dbfname') 
  1244.  
  1245. Parameters. 
  1246.  
  1247. dbfname 
  1248.           The REXX variable contains the name of your database as you defined 
  1249.           it in the Rexxbase_OpenDBF function. 
  1250.  
  1251. The name of the database is defined in a REXX variable.  You must pass the 
  1252. variable name in a string.  For example. 
  1253.  
  1254. myfilename = 'c:\xbase\machines.dbf' ret =
  1255. rexxbase_updatedbf('myfilename')
  1256.  
  1257. Return Value  Description 
  1258.  
  1259. ''. 
  1260.           Normal 
  1261.  
  1262. No REXX DBF Name Specified 
  1263.           The first parameter of function call is missing. 
  1264.  
  1265. Unknown Database Name. 
  1266.           The name found in the passed parameter is not the same used to open 
  1267.           the database. 
  1268.  
  1269. Invalid Record Position 
  1270.           The current record pointer is either at TOF or BOF. It is not 
  1271.           pointing to any particular record. 
  1272.  
  1273. Record With Duplicate Key Not Updated 
  1274.           The control variable RexxBase.AllowDuplicatesIndexes has been set to 
  1275.           NO.  A  matching index has been found.  Therefore, the record was 
  1276.           written to the DBF file.  Remember, deleted records do not have their 
  1277.           index entries removed until the database has been packed.  Also, do 
  1278.           not confuse this with the control variable RexxBase.Unique, which 
  1279.           allows all records to be written to the database but prevents a 
  1280.           duplicate index entry from being created. See 
  1281.           Rexxbase.AllowDuplicateIndexes. 
  1282.  
  1283. Database Tied To A Join 
  1284.           The database is already in use by the RexxBase_JoinDBF function. (See 
  1285.           registered user functions.) 
  1286.  
  1287. Sample. 
  1288.  
  1289. /* REXX */
  1290. /* this example update the field AMOUNT on the first record of the database*/
  1291. dbf = 'c:\users\net.dbf'
  1292. ret = rexxbase_opendbf('dbf')
  1293. if ret \= '' then do
  1294.   say ret
  1295.   exit
  1296.  end
  1297. ret = rexxbase_readdbf('dbf')
  1298. if ret \= '' then do
  1299.   say read failed with ret
  1300.   exit
  1301.  end
  1302. dbf.AMOUNT = dbf.AMOUNT * 2
  1303. ret = rexxbase_updatedbf('dbf')
  1304. if ret \  = '' then do
  1305.   say update failed with ret
  1306.   exit
  1307.  end
  1308. ret = rexxbase_closedbf('dbf')
  1309. if ret \  = '' then do
  1310.   say close failed with ret
  1311.   exit
  1312.  end
  1313.  
  1314.  
  1315. ΓòÉΓòÉΓòÉ 4.2. Create and Modify Database Functions. ΓòÉΓòÉΓòÉ
  1316.  
  1317. The following functions allow you to create new or modify existing databases. 
  1318.  
  1319.  
  1320. ΓòÉΓòÉΓòÉ 4.2.1. Rexxbase_CreateDBF ΓòÉΓòÉΓòÉ
  1321.  
  1322. Description.  This will create a new database file. 
  1323.  
  1324. If the file is created with the RexxBase.dBaseFileFormat set to 'dbase4' a MDX 
  1325. file is created. 
  1326.  
  1327. Prior to calling the RexxBase Create function you must specify the fields and 
  1328. the characteristics for each field.  You do this by creating field names using 
  1329. the database variable name concatenated with the FIELD string. 
  1330.  
  1331. ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ
  1332. ΓöéDatabase  Γöé*.FIELDCOUNT   ΓöéThe number of  Γöé               Γöé          Γöé
  1333. ΓöéField     Γöé               Γöéfields to be   Γöé               Γöé          Γöé
  1334. ΓöéCount     Γöé               Γöéused for       Γöé               Γöé          Γöé
  1335. Γöé          Γöé               Γöécreating the   Γöé               Γöé          Γöé
  1336. Γöé          Γöé               Γöédatabase.      Γöé               Γöé          Γöé
  1337. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  1338. ΓöéField NameΓöé*.FIELDNAME.1  ΓöéThe first fieldΓöéAny valid dBaseΓöé          Γöé
  1339. Γöé1         Γöé               Γöéname.          Γöéfield name.    Γöé          Γöé
  1340. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  1341. Γöé*.'field  ΓöéThe first fieldΓöéSpecify C for  Γöé               Γöé          Γöé
  1342. Γöéname      Γöétype           Γöécharacter, L   Γöé               Γöé          Γöé
  1343. Γöé1'.TYPE   Γöé               Γöéfor Logical, M Γöé               Γöé          Γöé
  1344. Γöé          Γöé               Γöéfor Memo, N forΓöé               Γöé          Γöé
  1345. Γöé          Γöé               ΓöéNumeric and D  Γöé               Γöé          Γöé
  1346. Γöé          Γöé               Γöéfor date.  Any Γöé               Γöé          Γöé
  1347. Γöé          Γöé               Γöéother value    Γöé               Γöé          Γöé
  1348. Γöé          Γöé               Γöéwill cause the Γöé               Γöé          Γöé
  1349. Γöé          Γöé               Γöécreate functionΓöé               Γöé          Γöé
  1350. Γöé          Γöé               Γöéto fail.       Γöé               Γöé          Γöé
  1351. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  1352. Γöé*.'field  ΓöéThe first fieldΓöéSpecify the    Γöé               Γöé          Γöé
  1353. Γöéname      Γöésize or length.Γöéfield length.  Γöé               Γöé          Γöé
  1354. Γöé1'.LENGTH Γöé               ΓöéFor Logical,   Γöé               Γöé          Γöé
  1355. Γöé          Γöé               ΓöéMemo and Date  Γöé               Γöé          Γöé
  1356. Γöé          Γöé               Γöéfield the size Γöé               Γöé          Γöé
  1357. Γöé          Γöé               Γöéfield is       Γöé               Γöé          Γöé
  1358. Γöé          Γöé               Γöéignored and    Γöé               Γöé          Γöé
  1359. Γöé          Γöé               ΓöéRexxBase uses  Γöé               Γöé          Γöé
  1360. Γöé          Γöé               Γöéthe default    Γöé               Γöé          Γöé
  1361. Γöé          Γöé               Γöévalues.  For   Γöé               Γöé          Γöé
  1362. Γöé          Γöé               ΓöéCharacter      Γöé               Γöé          Γöé
  1363. Γöé          Γöé               Γöéfields specify Γöé               Γöé          Γöé
  1364. Γöé          Γöé               Γöéa value from 1 Γöé               Γöé          Γöé
  1365. Γöé          Γöé               Γöéto 254.  For   Γöé               Γöé          Γöé
  1366. Γöé          Γöé               ΓöéNumeric fields Γöé               Γöé          Γöé
  1367. Γöé          Γöé               Γöéspecify the    Γöé               Γöé          Γöé
  1368. Γöé          Γöé               Γöélength in the  Γöé               Γöé          Γöé
  1369. Γöé          Γöé               Γöéformat of      Γöé               Γöé          Γöé
  1370. Γöé          Γöé               Γöélength.decimal,Γöé               Γöé          Γöé
  1371. Γöé          Γöé               Γöéwhere length isΓöé               Γöé          Γöé
  1372. Γöé          Γöé               Γöéa value from 1 Γöé               Γöé          Γöé
  1373. Γöé          Γöé               Γöéto 19 and      Γöé               Γöé          Γöé
  1374. Γöé          Γöé               Γöédecimal (no of Γöé               Γöé          Γöé
  1375. Γöé          Γöé               Γöédecimal        Γöé               Γöé          Γöé
  1376. Γöé          Γöé               Γöépositions) is 0Γöé               Γöé          Γöé
  1377. Γöé          Γöé               Γöéto 9 (one less Γöé               Γöé          Γöé
  1378. Γöé          Γöé               Γöéthan the       Γöé               Γöé          Γöé
  1379. Γöé          Γöé               Γöélength).       Γöé               Γöé          Γöé
  1380. Γöé          Γöé               ΓöéNumeric        Γöé               Γöé          Γöé
  1381. Γöé          Γöé               Γöéaccuracy is    Γöé               Γöé          Γöé
  1382. Γöé          Γöé               Γöévalid to 15    Γöé               Γöé          Γöé
  1383. Γöé          Γöé               Γöéinteger digits Γöé               Γöé          Γöé
  1384. Γöé          Γöé               Γöéand 9 decimal  Γöé               Γöé          Γöé
  1385. Γöé          Γöé               Γöéplaces.        Γöé               Γöé          Γöé
  1386. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  1387. Γöé.         Γöé.              Γöé               Γöé               Γöé          Γöé
  1388. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  1389. ΓöéField n   Γöé*.FIELDNAME.n  ΓöéThe last field Γöé               Γöé          Γöé
  1390. Γöé          Γöé               Γöéin the         Γöé               Γöé          Γöé
  1391. Γöé          Γöé               Γöédatabase.  The Γöé               Γöé          Γöé
  1392. Γöé          Γöé               Γöévalue of n     Γöé               Γöé          Γöé
  1393. Γöé          Γöé               Γöéshould be equalΓöé               Γöé          Γöé
  1394. Γöé          Γöé               Γöéto the value   Γöé               Γöé          Γöé
  1395. Γöé          Γöé               Γöéspecified in   Γöé               Γöé          Γöé
  1396. Γöé          Γöé               Γöédbname.FIELDCOUΓöé               Γöé          Γöé
  1397. ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ
  1398.  
  1399. Purpose. 
  1400.  
  1401. To create a database. 
  1402.  
  1403. Format. 
  1404.  
  1405. rexxbase_createdbf('dbfname') 
  1406.  
  1407. Parameters. 
  1408.  
  1409. dbfname 
  1410.           The REXX variable contains the name of the database similar in 
  1411.           function to the database field in the Rexxbase_OpenDBF function. 
  1412.  
  1413. The name of the database is defined in a REXX variable.  You must pass the 
  1414. variable name in a string.  For example. 
  1415.  
  1416. myfilename = 'c:\xbase\newmachn.dbf'
  1417. rexxbase_createdbf('myfilename')
  1418.  
  1419. Return Value  Description 
  1420.  
  1421. ''. 
  1422.           Normal 
  1423.  
  1424. No REXX DBF Name Specified 
  1425.           The first parameter of function call is missing. 
  1426.  
  1427. Bad Variable Name 
  1428.           Variable used to pass database name is not a valid REXX variable 
  1429.           name. 
  1430.  
  1431. No Filename Assigned To Variable. 
  1432.           Variable used to pass database name is empty or unassigned. 
  1433.  
  1434. Database name Already In Use. 
  1435.           Database name passed is already in use. 
  1436.  
  1437. Create Failed 
  1438.           refer to the following: 
  1439.  
  1440.           Unknown Field Type 
  1441.  
  1442.           Use C, D, L, M, and N only for field types. 
  1443.  
  1444.           Invalid field size 
  1445.  
  1446.           For character fields use a size from 1 through 249.  For numeric 
  1447.           fields use a size of specification of xx.yy where xx is a value from 
  1448.           1 to 19 and yy is from 0 to 9 and yy is one less than xx.  All other 
  1449.           field type length specifications default to:  8 for D, 1 for L and 10 
  1450.           for M. 
  1451.  
  1452.           Too many fields. 
  1453.  
  1454.           Only 128 fields are allowed per database. 
  1455.  
  1456.           Record size too large 
  1457.  
  1458.           Records sizes are limited to 4000 bytes. 
  1459.  
  1460. To prevent unwanted destruction of a database file refer to the RexxBase 
  1461. variable Rexxbase.Safety 
  1462.  
  1463. Sample. 
  1464.  
  1465. /* REXX */
  1466. dbf.fieldcount = 4
  1467. dbf.fieldname.1 = location
  1468. dbf.location.type = 'c'
  1469. dbf.location.length = '10'
  1470. dbf.fieldname.2 = inuse
  1471. dbf.inuse.type = 'l'
  1472. dbf.fieldname.3 = startuse
  1473. dbf.startuse.type = 'd'
  1474. dbf.fieldname.4 = prchcost
  1475. dbf.prchcost.type = 'n'
  1476. dbf.prchcost.length = '9.2'
  1477. dbf = 'invntry.dbf'
  1478. ret = rexxbase_createdbf('dbf')
  1479.  
  1480.  
  1481. ΓòÉΓòÉΓòÉ 4.2.2. Rexxbase_CreateFromDBF ΓòÉΓòÉΓòÉ
  1482.  
  1483. Description.  This will create a new database file structure only.  No data is 
  1484. added to the file.  No structure modifications may be made. 
  1485.  
  1486. Purpose. 
  1487.  
  1488. To create a database structure. 
  1489.  
  1490. Format. 
  1491.  
  1492. rexxbase_createfromdbf('dbfname','newdbfname') 
  1493.  
  1494. Parameters. 
  1495.  
  1496. dbfname 
  1497.           The REXX variable contains the name of the database similar in 
  1498.           function to the database field in the Rexxbase_OpenDBF function. 
  1499. newdbfname 
  1500.           The REXX variable contains the name of the new database. 
  1501.  
  1502. The name of the database is defined in a REXX variable.  You must pass the 
  1503. variable name in a string.  For example. 
  1504.  
  1505. oldfilename = 'c:\xbase\machn.dbf'
  1506. newfilename ='c:\xbase\newmachn.dbf'
  1507. rexxbase_createfromdbf('oldfilename','newfilename')
  1508.  
  1509. Return Value  Description 
  1510.  
  1511. ''. 
  1512.           Normal 
  1513.  
  1514. No REXX DBF Name Specified 
  1515.           The first parameter of function call is missing. 
  1516.  
  1517. Unknown Database Name. 
  1518.           The name found in the passed parameter is not the same used to open 
  1519.           the database. 
  1520.  
  1521. No DBF Name To Copy Structure To 
  1522.           This functions expects a second parameter which contains the name of 
  1523.           the file to be created. 
  1524.  
  1525. Bad Variable Name 
  1526.           Variable used to pass database name is not a valid REXX variable 
  1527.           name. 
  1528.  
  1529. No Filename Assigned To Variable. 
  1530.           Variable used to pass database name is empty or unassigned. 
  1531.  
  1532. Database Name Already In Use. 
  1533.           Database name passed is already in use. 
  1534.  
  1535. CreateFrom Failed 
  1536.           Refer to the  rexxbase.error  stem variable.: 
  1537.  
  1538. To prevent unwanted destruction of a database file refer to the RexxBase 
  1539. variable Rexxbase.Safety 
  1540.  
  1541. Sample. 
  1542.  
  1543. /* REXX */
  1544. parse arg olddbf newdbf
  1545. ret = rexxbase_opendbf('olddbf')
  1546. ret = rexxbase_createfromdbf('olddbf','newdbf')
  1547.  
  1548.  
  1549. ΓòÉΓòÉΓòÉ 4.2.3. Rexxbase_ModifyDBF ΓòÉΓòÉΓòÉ
  1550.  
  1551. Description.  This will modify the structure of a database file that is 
  1552. currently open. 
  1553.  
  1554. When a database is opened the database fields descriptions are loaded into REXX 
  1555. Variables.  By changing the values in these REXX variables you can alter the 
  1556. characteristics of a database field, remove a database field and add new 
  1557. database fields. 
  1558.  
  1559. ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ
  1560. ΓöéDatabase  Γöé*.FIELDCOUNT   ΓöéThe number of  Γöé               Γöé
  1561. ΓöéField     Γöé               Γöéfields in the  Γöé               Γöé
  1562. ΓöéCount     Γöé               Γöédatabase.      Γöé               Γöé
  1563. Γöé          Γöé               ΓöéIncrease the   Γöé               Γöé
  1564. Γöé          Γöé               Γöécount of this  Γöé               Γöé
  1565. Γöé          Γöé               Γöéfield when     Γöé               Γöé
  1566. Γöé          Γöé               Γöéadding new     Γöé               Γöé
  1567. Γöé          Γöé               Γöérecords.  If   Γöé               Γöé
  1568. Γöé          Γöé               Γöéyou decrease   Γöé               Γöé
  1569. Γöé          Γöé               Γöéthe count, the Γöé               Γöé
  1570. Γöé          Γöé               Γöétrailing fieldsΓöé               Γöé
  1571. Γöé          Γöé               Γöéwill be        Γöé               Γöé
  1572. Γöé          Γöé               Γöéremoved.  To   Γöé               Γöé
  1573. Γöé          Γöé               Γöéremove fields  Γöé               Γöé
  1574. Γöé          Γöé               Γöéin the         Γöé               Γöé
  1575. Γöé          Γöé               Γöébeginning and  Γöé               Γöé
  1576. Γöé          Γöé               Γöéthe middle of  Γöé               Γöé
  1577. Γöé          Γöé               Γöéthe field      Γöé               Γöé
  1578. Γöé          Γöé               Γöéchange the     Γöé               Γöé
  1579. Γöé          Γöé               Γöéfield type 'P'.Γöé               Γöé
  1580. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  1581. ΓöéField NameΓöé*.FIELDNAME.1  ΓöéThe first fieldΓöé               Γöé
  1582. Γöé1         Γöé               Γöéname.          Γöé               Γöé
  1583. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  1584. Γöé*.'field  ΓöéThe first fieldΓöéSpecify C for  Γöé               Γöé
  1585. Γöéname      Γöétype.          Γöécharacter, L   Γöé               Γöé
  1586. Γöé1'.TYPE   Γöé               Γöéfor Logical, M Γöé               Γöé
  1587. Γöé          Γöé               Γöéfor Memo, N forΓöé               Γöé
  1588. Γöé          Γöé               ΓöéNumeric and D  Γöé               Γöé
  1589. Γöé          Γöé               Γöéfor date.      Γöé               Γöé
  1590. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  1591. Γöé*.'field  ΓöéThe first fieldΓöéSpecify the    Γöé               Γöé
  1592. Γöéname      Γöésize or length.Γöéfield length.  Γöé               Γöé
  1593. Γöé1'.LENGTH Γöé               ΓöéFor Logical,   Γöé               Γöé
  1594. Γöé          Γöé               ΓöéMemo and Date  Γöé               Γöé
  1595. Γöé          Γöé               Γöéfield the size Γöé               Γöé
  1596. Γöé          Γöé               Γöéfield is       Γöé               Γöé
  1597. Γöé          Γöé               Γöéignored and    Γöé               Γöé
  1598. Γöé          Γöé               ΓöéRexxBase uses  Γöé               Γöé
  1599. Γöé          Γöé               Γöéthe default    Γöé               Γöé
  1600. Γöé          Γöé               Γöévalues.  For   Γöé               Γöé
  1601. Γöé          Γöé               ΓöéCharacter      Γöé               Γöé
  1602. Γöé          Γöé               Γöéfields specify Γöé               Γöé
  1603. Γöé          Γöé               Γöéa value from 1 Γöé               Γöé
  1604. Γöé          Γöé               Γöéto 254.  For   Γöé               Γöé
  1605. Γöé          Γöé               ΓöéNumeric fields Γöé               Γöé
  1606. Γöé          Γöé               Γöéspecify the    Γöé               Γöé
  1607. Γöé          Γöé               Γöélength in the  Γöé               Γöé
  1608. Γöé          Γöé               Γöéformat of      Γöé               Γöé
  1609. Γöé          Γöé               Γöélength.decimal,Γöé               Γöé
  1610. Γöé          Γöé               Γöéwhere length isΓöé               Γöé
  1611. Γöé          Γöé               Γöéa value from 1 Γöé               Γöé
  1612. Γöé          Γöé               Γöéto 19 and      Γöé               Γöé
  1613. Γöé          Γöé               Γöédecimal (no of Γöé               Γöé
  1614. Γöé          Γöé               Γöédecimal        Γöé               Γöé
  1615. Γöé          Γöé               Γöépositions) is 0Γöé               Γöé
  1616. Γöé          Γöé               Γöéto 9 (one less Γöé               Γöé
  1617. Γöé          Γöé               Γöéthan the       Γöé               Γöé
  1618. Γöé          Γöé               Γöélength).       Γöé               Γöé
  1619. Γöé          Γöé               ΓöéNumeric        Γöé               Γöé
  1620. Γöé          Γöé               Γöéaccuracy is    Γöé               Γöé
  1621. Γöé          Γöé               Γöévalid to 15    Γöé               Γöé
  1622. Γöé          Γöé               Γöéinteger digits Γöé               Γöé
  1623. Γöé          Γöé               Γöéand 9 decimal  Γöé               Γöé
  1624. Γöé          Γöé               Γöéplaces.        Γöé               Γöé
  1625. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  1626. Γöé.         Γöé.              Γöé               Γöé               Γöé
  1627. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  1628. ΓöéField n   Γöé*.FIELDNAME.n  ΓöéThe last field Γöé               Γöé
  1629. Γöé          Γöé               Γöéin the         Γöé               Γöé
  1630. Γöé          Γöé               Γöédatabase.  The Γöé               Γöé
  1631. Γöé          Γöé               Γöévalue of n     Γöé               Γöé
  1632. Γöé          Γöé               Γöéshould be equalΓöé               Γöé
  1633. Γöé          Γöé               Γöéto the value   Γöé               Γöé
  1634. Γöé          Γöé               Γöéspecified in   Γöé               Γöé
  1635. Γöé          Γöé               Γöédbname.FIELDCOUΓöé               Γöé
  1636. ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ
  1637.  
  1638. Purpose. 
  1639.  
  1640. To modify a database. 
  1641.  
  1642. Format. 
  1643.  
  1644. rexxbase_modifydbf('dbfname') 
  1645.  
  1646. Parameters. 
  1647.  
  1648. dbfname 
  1649.           The REXX variable contains the name of the database similar in 
  1650.           function to the database field in the Rexxbase_OpenDBF function. 
  1651.  
  1652. The name of the database is defined in a REXX variable.  You must pass the 
  1653. variable name in a string.  For example. 
  1654.  
  1655. myfilename = 'c:\xbase\machn.dbf'
  1656. rexxbase_modifydbf('myfilename')
  1657.  
  1658. Return Value  Description 
  1659.  
  1660. ''. 
  1661.           Normal 
  1662.  
  1663. No REXX DBF Name Specified 
  1664.           The first parameter of function call is missing. 
  1665.  
  1666. Unknown Database Name. 
  1667.           The name found in the passed parameter is not the same used to open 
  1668.           the database. 
  1669.  
  1670. Modify Failed 
  1671.           refer to the following: 
  1672.  
  1673.           Unknown Field Type 
  1674.  
  1675.           Use C, D, L, M, and N only for field types. 
  1676.  
  1677.           Invalid field size 
  1678.  
  1679.           For character fields use a size from 1 through 249.  For numeric 
  1680.           fields use a size of specification of xx.yy where xx is a value from 
  1681.           1 to 19 and yy is from 0 to 9 and yy is one less than xx.  All other 
  1682.           field type length specifications default to:  8 for D, 1 for L and 10 
  1683.           for M. 
  1684.  
  1685.           Too many fields. 
  1686.  
  1687.           Only 128 fields are allowed per database. 
  1688.  
  1689.           Record size too large 
  1690.  
  1691.           Records sizes are limited to 4000 bytes. 
  1692.  
  1693. Database Tied To A Join 
  1694.           The database is already in use by the RexxBase_JoinDBF function. (See 
  1695.           registered user functions.) 
  1696.  
  1697. Sample. 
  1698.  
  1699. /* REXX */
  1700. dbf = 'c:\xbase\newmachn.dbf'
  1701. rexxbase_opendbf('dbf')
  1702. dbf.fieldcount = 4
  1703. dbf.fieldname.1 = location
  1704. dbf.location.type = 'c'
  1705. dbf.location.length = '10'
  1706. dbf.fieldname.2 = inuse
  1707. dbf.inuse.type = 'l'
  1708. dbf.fieldname.3 = startuse
  1709. dbf.startuse.type = 'd'
  1710. dbf.fieldname.4 = prchcost
  1711. dbf.prchcost.type = 'n'
  1712. dbf.prchcost.length = '9.2'
  1713. ret = rexxbase_modifydbf('dbf')
  1714.  
  1715.  
  1716. ΓòÉΓòÉΓòÉ 4.3. Deleting and Packing Databases. ΓòÉΓòÉΓòÉ
  1717.  
  1718. The following function allow your REXX programs to logically delete, undelete 
  1719. and physically remove records from a database. 
  1720.  
  1721.  
  1722. ΓòÉΓòÉΓòÉ 4.3.1. Rexxbase_DeleteRecord. ΓòÉΓòÉΓòÉ
  1723.  
  1724. Description.  Marks the current record as deleted. 
  1725.  
  1726. Purpose. 
  1727.  
  1728. To logically delete a record. 
  1729.  
  1730. Format. 
  1731.  
  1732. rexxbase_deleterecord('dbfname') 
  1733.  
  1734. Parameters. 
  1735.  
  1736. dbfname 
  1737.           The REXX variable contains the name of your database as you defined 
  1738.           it in the Rexxbase_OpenDBF function. 
  1739.  
  1740. The name of the database is defined in a REXX variable.  You must pass the 
  1741. variable name in a string.  For example. 
  1742.  
  1743. ret = rexxbase_deleterecord('myfilename')
  1744.  
  1745. Return Value  Description 
  1746.  
  1747. ''. 
  1748.           Normal 
  1749.  
  1750. No REXX DBF Name Specified 
  1751.           The first parameter of function call is missing. 
  1752.  
  1753. Unknown Database Name. 
  1754.           The name found in the passed parameter is not the same used to open 
  1755.           the database. 
  1756.  
  1757. No Record Read. 
  1758.           The procedure must do a record read before deleting a record. 
  1759.  
  1760. Database Tied To A Join 
  1761.           The database is already in use by the RexxBase_JoinDBF function. (See 
  1762.           registered user functions.) 
  1763.  
  1764. Sample. 
  1765.  
  1766. /* REXX */
  1767. /*mark the last record on file as undeleted */
  1768. dbf = 'c:\users\net.dbf'
  1769. ret = rexxbase_opendbf('dbf')
  1770. if ret \= '' then do
  1771.   say ret
  1772.   exit
  1773.  end
  1774. ret = rexxbase_gotorecord('dbf',dbf.recordcount)
  1775. if ret = '' then ret = rexxbase_deleterecord('dbf')
  1776.  
  1777.  
  1778. ΓòÉΓòÉΓòÉ 4.3.2. Rexxbase_UndeleteRecord. ΓòÉΓòÉΓòÉ
  1779.  
  1780. Description.  Marks the current record as not deleted. 
  1781.  
  1782. Purpose. 
  1783.  
  1784. To logically undelete a record. 
  1785.  
  1786. Format. 
  1787.  
  1788. rexxbase_undeleterecord('dbfname') 
  1789.  
  1790. Parameters. 
  1791.  
  1792. dbfname 
  1793.           The REXX variable contains the name of your database as you defined 
  1794.           it in the Rexxbase_OpenDBF function. 
  1795.  
  1796. The name of the database is defined in a REXX variable.  You must pass the 
  1797. variable name in a string.  For example. 
  1798.  
  1799. rexxbase_undeleterecord('myfilename')
  1800.  
  1801. Return Value  Description 
  1802.  
  1803. ''. 
  1804.           Normal 
  1805.  
  1806. No REXX DBF Name Specified 
  1807.           The first parameter of function call is missing. 
  1808.  
  1809. Unknown Database Name. 
  1810.           The name found in the passed parameter is not the same used to open 
  1811.           the database. 
  1812.  
  1813. No Record Read. 
  1814.           The procedure must do a record read before undeleting a record. 
  1815.  
  1816. Database Tied To A Join 
  1817.           The database is already in use by the RexxBase_JoinDBF function. (See 
  1818.           registered user functions.) 
  1819.  
  1820. Sample. 
  1821.  
  1822. /* REXX */
  1823. /*mark the last record on file as not deleted */
  1824. dbf = 'c:\users\net.dbf'
  1825. ret = rexxbase_opendbf('dbf')
  1826. if ret \= '' then do
  1827.   say ret
  1828.   exit
  1829.  end
  1830. ret =rexxbase_gotorecord('dbf',dbf.recordcount)
  1831. if ret = '' then ret = rexxbase_undeleterecord('dbf')
  1832.  
  1833.  
  1834. ΓòÉΓòÉΓòÉ 4.3.3. Rexxbase_PackDBF. ΓòÉΓòÉΓòÉ
  1835.  
  1836. Description.  This function removes logically deleted records from the 
  1837. database. 
  1838.  
  1839. Purpose. 
  1840.  
  1841. To remove deleted records.  If the file has been opened with indexes, then the 
  1842. index will be rebuilt. 
  1843.  
  1844. If the database has associated index files and they are not opened during the 
  1845. packing process the indexes will be incorrect. 
  1846.  
  1847. Format. 
  1848.  
  1849. rexxbase_packdbf('dbfname') 
  1850.  
  1851. Parameters. 
  1852.  
  1853. dbfname 
  1854.           The REXX variable contains the name of your database as you defined 
  1855.           it in the Rexxbase_OpenDBF function. 
  1856.  
  1857. The name of the database is defined in a REXX variable.  You must pass the 
  1858. variable name in a string.  For example. 
  1859.  
  1860. myfilename = 'c:\xbase\machines.dbf'
  1861. ret = rexxbase_packdbf('myfilename')
  1862.  
  1863. Return Value  Description 
  1864.  
  1865. ''. 
  1866.           Normal 
  1867.  
  1868. No REXX DBF Name Specified 
  1869.           No argument was passed to the routine. 
  1870.  
  1871. Unknown Database Name. 
  1872.           The name found in the passed parameter is not the same used to open 
  1873.           the database. 
  1874.  
  1875. Database Tied To A Join 
  1876.           The database is already in use by the RexxBase_JoinDBF function. (See 
  1877.           registered user functions.) 
  1878.  
  1879. Record With Duplicate Key Not Updated 
  1880.           The control variable RexxBase.AllowDuplicatesIndexes has been set to 
  1881.           NO.  A  matching index has been found.  Therefore, the record was 
  1882.           written to the DBF file.  Remember, deleted records do not have their 
  1883.           index entries removed until the database has been packed.  Also, do 
  1884.           not confuse this with the control variable RexxBase.Unique, which 
  1885.           allows all records to be written to the database but prevents a 
  1886.           duplicate index entry from being created. See 
  1887.           Rexxbase.AllowDuplicateIndexes. 
  1888.  
  1889. Sample. 
  1890.  
  1891. /* REXX */
  1892. dbf = 'c:\users\net.dbf'
  1893. ret = rexxbase_opendbf('dbf')
  1894. if ret \= '' then do
  1895.   say ret
  1896.   exit
  1897.  end
  1898. ret = rexxbase_packdbf('dbf')
  1899.  
  1900.  
  1901. ΓòÉΓòÉΓòÉ 4.4. Index and Tag Functions ΓòÉΓòÉΓòÉ
  1902.  
  1903. The following functions allow you to access your database through indexes and 
  1904. to control the index files. 
  1905.  
  1906.  
  1907. ΓòÉΓòÉΓòÉ 4.4.1. Rexxbase_FindRecord. ΓòÉΓòÉΓòÉ
  1908.  
  1909. Description.  The command will position at a specified record using the master 
  1910. index file. 
  1911.  
  1912. Purpose. 
  1913.  
  1914. To read a particular record in the database using the index file. 
  1915.  
  1916. Format. 
  1917.  
  1918. rexxbase_findrecord('dbfname','string',[EXACT]) 
  1919.  
  1920. Parameters. 
  1921.  
  1922. dbfname 
  1923.           The REXX variable contains the name of your database as you defined 
  1924.           it in the Rexxbase_OpenDBF function. 
  1925. string 
  1926.           The index key string used for searching. 
  1927. EXACT 
  1928.           Optional indicator to tell RexxBase to find the exact 'string' in the 
  1929.           index.  This would cause a Hard Find.  If not specified then RexxBase 
  1930.           would execute a Soft Find. 
  1931.  
  1932. This function can avoid reading deleted records by setting 
  1933. Rexxbase.SkipDeleted. 
  1934.  
  1935. The name of the database is defined in a REXX variable.  You must pass the 
  1936. variable name in a string.  For example. 
  1937.  
  1938. myfilename = 'c:\xbase\machines.dbf'
  1939. ret = rexxbase_findrecord('myfilename','LASER 11')
  1940.  
  1941. Return Value  Description 
  1942.  
  1943. ''. 
  1944.           Normal 
  1945.  
  1946. No REXX DBF Name 
  1947.           No argument was passed to the routine. 
  1948.  
  1949. No Locate String Specified 
  1950.           Second parameter of function is missing. 
  1951.  
  1952. Unknown Database Name. 
  1953.           The name found in the passed parameter is not the same used to open 
  1954.           the database. 
  1955.  
  1956. Index File Not Opened Or Tag Set 
  1957.           When the database was opened, no index files were specified and no 
  1958.           TAG= parameter was specified. 
  1959.  
  1960. Record Not Found (when EXACT is specified) 
  1961.           You passed a string that is not on the master index.  No record is 
  1962.           read. 
  1963.  
  1964. Record Not Found (when EXACT is not specified) 
  1965.           The string entered is higher than any on the index. 
  1966.  
  1967. Internal File Processing Error. 
  1968.           Record area could not be read. Find the XX error code in the 
  1969.           rexxbase.error  stem variable. Where XX is a return code from OS/2. 
  1970.           If XX is equal to 5 then the operating system is denying access to 
  1971.           that area.  If XX is equal to 33 then the record area has been 
  1972.           locked.  For other values you can type on the command line 'HELP XX' 
  1973.           to find the values for XX. 
  1974.  
  1975. Database Tied To A Join 
  1976.           The database is already in use by the RexxBase_JoinDBF function. (See 
  1977.           registered user functions.) 
  1978.  
  1979. Sample. 
  1980.  
  1981. /* REXX */
  1982. /* this example copies the finds a record on the database */
  1983. dbf = 'c:\users\net.dbf'
  1984. ndx = 'c:\xbase\net.ndx'
  1985. ret = rexxbase_opendbf('dbf',ndx)
  1986. if ret \= '' then do
  1987.   say ret
  1988.   exit
  1989.  end
  1990. ret = rexxbase_findrecord('dbf','USA001')
  1991. if ret \= '' then do
  1992.   say find failed with ret
  1993.   exit
  1994.  end
  1995. say Network Disposition For USA001 is dbf.dispo
  1996. ret = rexxbase_closedbf('dbf')
  1997. if ret \  = '' then do
  1998.   say close failed with ret
  1999.   exit
  2000.  end
  2001.  
  2002. If you must have reverse indexes, open the database with the intended index, 
  2003. find the record to start at and readprev until TOF. 
  2004.  
  2005.  
  2006. ΓòÉΓòÉΓòÉ 4.4.2. Rexxbase_SetIndexTagName. ΓòÉΓòÉΓòÉ
  2007.  
  2008. Description.  The function provides an alternate method to specify which tag to 
  2009. use when finding records through a MDX files. 
  2010.  
  2011. Purpose. 
  2012.  
  2013. To specify which tag name to use in an MDX file. 
  2014.  
  2015. Format. 
  2016.  
  2017. rexxbase_setindextagname('dbfname','tagname') 
  2018.  
  2019. Parameters. 
  2020.  
  2021. dbfname 
  2022.           The REXX variable contains the name of your database as you defined 
  2023.           it in the Rexxbase_OpenDBF function. 
  2024. tagname 
  2025.           The name of a known tag in the associated MDX file. 
  2026.  
  2027. The name of the database is defined in a REXX variable.  You must pass the 
  2028. variable name in a string.  For example. 
  2029.  
  2030. myfilename = 'c:\xbase\machines.dbf'
  2031. ret = rexxbase_setindextagname('myfilename','location')
  2032.  
  2033. Return Value  Description 
  2034.  
  2035. ''. 
  2036.           Normal 
  2037.  
  2038. No REXX DBF Name 
  2039.           No argument was passed to the routine. 
  2040.  
  2041. No Index Tag Name Specified 
  2042.           Second parameter of function is missing. 
  2043.  
  2044. Unknown Database Name. 
  2045.           The name found in the passed parameter is not the same used to open 
  2046.           the database. 
  2047.  
  2048. No Index Tag File Opened 
  2049.           The database file does not have an associated MDX file. 
  2050.  
  2051. Primary Index Not MDX Type 
  2052.           Your program has made the primary index file an NDX file. 
  2053.  
  2054. Tag Index File Has No Tags 
  2055.           No tag has been assigned to the MDX file. 
  2056.  
  2057. Index Tag Name Not Found 
  2058.           The tag name has not been defined in the MDX file. 
  2059.  
  2060. Sample. 
  2061.  
  2062. /* REXX */
  2063. /* this example copies the finds a record on the database */
  2064. dbf = 'c:\users\net.dbf'
  2065. ret = rexxbase_opendbf('dbf')
  2066. if ret \= '' then do
  2067.   say ret
  2068.   exit
  2069.  end
  2070. ret = rexxbase_setindextagname('dbf','NETWORKS')
  2071. if ret \= '' then do
  2072.   say find failed with ret
  2073.   exit
  2074.  end
  2075. ret = rexxbase_findrecord('dbf','USA001')
  2076. if ret \= '' then do
  2077.   say find failed with ret
  2078.   exit
  2079.  end
  2080. say Network Disposition For USA001 is dbf.dispo
  2081. ret = rexxbase_closedbf('dbf')
  2082. if ret \  = '' then do
  2083.   say close failed with ret
  2084.   exit
  2085.  end
  2086.  
  2087.  
  2088. ΓòÉΓòÉΓòÉ 4.4.3. Rexxbase_CreateIndex ΓòÉΓòÉΓòÉ
  2089.  
  2090. Description.  This will create an index for an currently open database. 
  2091.  
  2092. The call to the RexxBase Create Index function requires 3 parameters:  Open 
  2093. Database Name, Index file name (FAT or HPFS format) and the string defining the 
  2094. index.  RexxBase does not verify nor add the NDX file extension.  It is 
  2095. recommended that your program specifies it. 
  2096.  
  2097. Purpose. 
  2098.  
  2099. To create an index for an open database. 
  2100.  
  2101. Format. 
  2102.  
  2103. rexxbase_createindex('dbfname',index file name,index string) 
  2104.  
  2105. Parameters. 
  2106.  
  2107. dbfname 
  2108.           The REXX variable contains the name of the database similar in 
  2109.           function to the database field in the Rexxbase_OpenDBF function. 
  2110. index file name 
  2111.           Any valid file name in FAT or HPFS format. 
  2112. index string 
  2113.           A string of characters used to specify the index. 
  2114.  
  2115. See REXXBASE.UNIQUE more information. 
  2116.  
  2117. See ndx definition more information. 
  2118.  
  2119. The name of the database is defined in a REXX variable.  You must pass the 
  2120. variable name in a string.  For example. 
  2121.  
  2122. myfilename = 'c:\xbase\newmachn.dbf'
  2123. myindexname = 'c:\xbase\newmachn.ndx'
  2124. rexxbase_opendbf('myfilename')
  2125. rexxbase_createindex('myfilename',myindexname,'num+dept')
  2126.  
  2127. Return Value  Description 
  2128.  
  2129. ''. 
  2130.           Normal 
  2131.  
  2132. No REXX DBF Name Specified 
  2133.           No argument was passed to the routine. 
  2134.  
  2135. Unknown Database Name. 
  2136.           The name found in the passed parameter is not the same used to open 
  2137.           the database. 
  2138.  
  2139. No Index File Name Specified 
  2140.           This procedure expects a second argument containing the new index 
  2141.           file name. 
  2142.  
  2143. No Index Field Names Specified 
  2144.           This procedure expects a third argument containing the index key. 
  2145.  
  2146. Index Not Built. 
  2147.           A runtime error occurred.  Review error message in  rexxbase.error 
  2148.           stem variable. 
  2149.  
  2150. Unknown Field Type 
  2151.           Use C, D, L, M, and N only for field types. 
  2152.  
  2153. Invalid Index Size 
  2154.           Indexes are limited to 100 bytes. 
  2155.  
  2156. Too Many Fields. 
  2157.           Only 100 fields are allowed per index. 
  2158.  
  2159. Data Type Mismatch 
  2160.           You can't mix numeric, character or date fields together 
  2161.  
  2162. Invalid Data Type 
  2163.           Memo fields and logic fields are not allowed to be used as indexes. 
  2164.  
  2165. Database Tied To A Join 
  2166.           The database is already in use by the RexxBase_JoinDBF function. (See 
  2167.           registered user functions.) 
  2168.  
  2169. Sample. 
  2170.  
  2171. /* REXX */
  2172. dbf = 'c:\xbase\machn.dbf'
  2173. ret = rexxbase_opendbf('dbf')
  2174. ret = rexxbase_createindex('dbf','machn.ndx','machnum')
  2175. ret = rexxbase_closedbf('dbf')
  2176.  
  2177.  
  2178. ΓòÉΓòÉΓòÉ 4.4.4. Rexxbase_CreateMultipleIndexFile ΓòÉΓòÉΓòÉ
  2179.  
  2180. Description.  This will create a multiple index for a currently open database. 
  2181.  
  2182. The call to the RexxBase Create Multiple Index File function requires 2 
  2183. parameters:  Open Database Name and an index file name (FAT or HPFS format). 
  2184. RexxBase does not verify nor add the MDX file extension.  It is recommended 
  2185. that your program specifies it. 
  2186.  
  2187. If the file was created with the RexxBase.dBaseFileType set to 'dbase4' a MDX 
  2188. file is created. 
  2189.  
  2190. This function does not create tags.  To add an index tag use 
  2191. RexxBase_AddTagToIndex function. 
  2192.  
  2193. Purpose. 
  2194.  
  2195. To create a multiple index file for an open database. 
  2196.  
  2197. Format. 
  2198.  
  2199. rexxbase_createmultipleindexfile('dbfname',index file name) 
  2200.  
  2201. Parameters. 
  2202.  
  2203. dbfname 
  2204.           The REXX variable contains the name of the database similar in 
  2205.           function to the database field in the Rexxbase_OpenDBF function. 
  2206. index file name 
  2207.           Any valid file name in FAT or HPFS format. 
  2208.  
  2209. See REXXBASE.UNIQUE more information. 
  2210.  
  2211. See MDX definition more information. 
  2212.  
  2213. The name of the database is defined in a REXX variable.  You must pass the 
  2214. variable name in a string.  For example. 
  2215.  
  2216. myfilename = 'c:\xbase\newmachn.dbf'
  2217. myindexname = 'c:\xbase\newmachn.mdx'
  2218. rexxbase_opendbf('myfilename')
  2219. rexxbase_createmultipleindexfile('myfilename',myindexname)
  2220.  
  2221. Return Value  Description 
  2222.  
  2223. ''. 
  2224.           Normal 
  2225.  
  2226. No REXX DBF Name Specified 
  2227.           No argument was passed to the routine. 
  2228.  
  2229. Unknown Database Name. 
  2230.           The name found in the passed parameter is not the same used to open 
  2231.           the database. 
  2232.  
  2233. No Index File Name Specified 
  2234.           This procedure expects a second argument containing the new index 
  2235.           file name. 
  2236.  
  2237. Create Index File Failed. 
  2238.           A runtime error occurred.  Review error message in  rexxbase.error 
  2239.           stem variable. 
  2240.  
  2241. Database Tied To A Join 
  2242.           The database is already in use by the RexxBase_JoinDBF function. (See 
  2243.           registered user functions.) 
  2244.  
  2245. Sample. 
  2246.  
  2247. /* REXX */
  2248. dbf = 'c:\xbase\machn.dbf'
  2249. ret = rexxbase_opendbf('dbf')
  2250. ret = rexxbase_createmultipleindexfile('dbf','machn.mdx')
  2251. ret = rexxbase_addtagtoindex('dbf','machnum')
  2252. ret = rexxbase_closedbf('dbf')
  2253.  
  2254.  
  2255. ΓòÉΓòÉΓòÉ 4.4.5. Rexxbase_AddTagToIndex ΓòÉΓòÉΓòÉ
  2256.  
  2257. Description.  This will add a tag index to a currently open database and MDX 
  2258. file. 
  2259.  
  2260. The call to the RexxBase Add Tag To Index function requires 3 parameters:  Open 
  2261. Database Name, tag name and the string defining the index. 
  2262.  
  2263. Purpose. 
  2264.  
  2265. To create an index tag. 
  2266.  
  2267. Format. 
  2268.  
  2269. rexxbase_addtagtoindex('dbfname',index tag name,index string) 
  2270.  
  2271. Parameters. 
  2272.  
  2273. dbfname 
  2274.           The REXX variable contains the name of the database similar in 
  2275.           function to the database field in the Rexxbase_OpenDBF function. 
  2276. index tag name 
  2277.           Any valid field name.  Follow the field name conventions. 
  2278. index string 
  2279.           A string of characters used to specify the index. 
  2280.  
  2281. See REXXBASE.UNIQUE more information. 
  2282.  
  2283. See MDX definition more information. 
  2284.  
  2285. The name of the database is defined in a REXX variable. You must pass the tag 
  2286. and variable name in a string.  For example. 
  2287.  
  2288. myfilename = 'c:\xbase\newmachn.dbf'
  2289. /* assumes there is an associated MDX file newmachn.mdx */
  2290. rexxbase_opendbf('myfilename')
  2291. rexxbase_addtagtoindex('myfilename','Num_Dept','num+dept')
  2292.  
  2293. Return Value  Description 
  2294.  
  2295. ''. 
  2296.           Normal 
  2297.  
  2298. No REXX DBF Name Specified 
  2299.           No argument was passed to the routine. 
  2300.  
  2301. Unknown Database Name. 
  2302.           The name found in the passed parameter is not the same used to open 
  2303.           the database. 
  2304.  
  2305. No Tag Name Specified 
  2306.           This procedure expects a second argument containing the new tag name. 
  2307.  
  2308. No Tag Index Field Specified 
  2309.           This procedure expects a third argument containing the index key. 
  2310.  
  2311. Tag Index File Not Opened 
  2312.           The DBF file does not have an associated MDX file that was opened 
  2313.           when the DBF was opened. 
  2314.  
  2315. Failed To Add Tag To Index 
  2316.           A runtime error occurred.  Review error message in  rexxbase.error 
  2317.           stem variable. 
  2318.  
  2319. Unknown Field Type 
  2320.           Use C, D, L, M, and N only for field types. 
  2321.  
  2322. Invalid Index Size 
  2323.           Indexes are limited to 100 bytes. 
  2324.  
  2325. Too Many Fields. 
  2326.           Only 100 fields are allowed per index. 
  2327.  
  2328. Data Type Mismatch 
  2329.           You can't mix numeric, character or date fields together 
  2330.  
  2331. Invalid Data Type 
  2332.           Memo fields and logic fields are not allowed to be used as indexes. 
  2333.  
  2334. Index Tag Name Too Long 
  2335.           The second parameter is invalid.  See above. 
  2336.  
  2337. Primary Index File Not MDX format. 
  2338.           The primary index file must be the MDX file. 
  2339.  
  2340. Database Tied To A Join 
  2341.           The database is already in use by the RexxBase_JoinDBF function. (See 
  2342.           registered user functions.) 
  2343.  
  2344. Sample. 
  2345.  
  2346. /* REXX */
  2347. dbf = 'c:\xbase\machn.dbf'
  2348. /* assume machn.mdx exists */
  2349. ret = rexxbase_opendbf('dbf')
  2350. ret = rexxbase_addtagtoindex('dbf','machnum','machnum')
  2351. ret = rexxbase_closedbf('dbf')
  2352.  
  2353.  
  2354. ΓòÉΓòÉΓòÉ 4.4.6. Rexxbase_DropTagFromIndex ΓòÉΓòÉΓòÉ
  2355.  
  2356. Description.  This will remove a tag index from a currently open database and 
  2357. MDX file. 
  2358.  
  2359. The call to the RexxBase Drop Tag From  Index function requires 2 parameters: 
  2360. Open Database Name and tag name. 
  2361.  
  2362. Purpose. 
  2363.  
  2364. To drop an index tag. 
  2365.  
  2366. Format. 
  2367.  
  2368. rexxbase_droptagfromindex('dbfname',index tag name) 
  2369.  
  2370. Parameters. 
  2371.  
  2372. dbfname 
  2373.           The REXX variable contains the name of the database similar in 
  2374.           function to the database field in the Rexxbase_OpenDBF function. 
  2375. index tag name 
  2376.           An existing tag field name. 
  2377.  
  2378. The name of the database is defined in a REXX variable. You must pass the tag 
  2379. and variable name in a string.  For example. 
  2380.  
  2381. myfilename = 'c:\xbase\newmachn.dbf'
  2382. /* assumes there is an associated MDX file newmachn.mdx */
  2383. rexxbase_opendbf('myfilename')
  2384. rexxbase_droptagfromindex('myfilename','Num_Dept')
  2385.  
  2386. Return Value  Description 
  2387.  
  2388. ''. 
  2389.           Normal 
  2390.  
  2391. No REXX DBF Name Specified 
  2392.           No argument was passed to the routine. 
  2393.  
  2394. Unknown Database Name. 
  2395.           The name found in the passed parameter is not the same used to open 
  2396.           the database. 
  2397.  
  2398. No Tag Name Specified 
  2399.           The second argument contains the tag name to be dropped. 
  2400.  
  2401. Tag Index File Not Opened 
  2402.           The DBF file does not have an associated MDX file that was opened 
  2403.           when the DBF was opened. 
  2404.  
  2405. Primary Index File Not MDX format. 
  2406.           The primary index file must be the MDX file. 
  2407.  
  2408. Database Tied To A Join 
  2409.           The database is already in use by the RexxBase_JoinDBF function. (See 
  2410.           registered user functions.) 
  2411.  
  2412. Failed To Drop Tag From Index 
  2413.           A runtime error occurred.  Review error message in  rexxbase.error 
  2414.           stem variable. 
  2415.  
  2416. Sample. 
  2417.  
  2418. /* REXX */
  2419. dbf = 'c:\xbase\machn.dbf'
  2420. /* assume machn.mdx exists */
  2421. ret = rexxbase_opendbf('dbf')
  2422. ret = rexxbase_droptagfromindex('dbf','machnum','machnum')
  2423. ret = rexxbase_closedbf('dbf')
  2424.  
  2425.  
  2426. ΓòÉΓòÉΓòÉ 4.4.7. Rexxbase_ReindexDBF ΓòÉΓòÉΓòÉ
  2427.  
  2428. Purpose. 
  2429.  
  2430. To rebuild all open indexes for an open database. 
  2431.  
  2432. Format. 
  2433.  
  2434. ret = rexxbase_reindexdbf(dbfname)
  2435.  
  2436. Parameters. 
  2437.  
  2438. dbfname 
  2439.           The REXX variable contains the name of the database similar in 
  2440.           function to the database field in the Rexxbase_OpenDBF function. 
  2441.  
  2442. Description.  This will rebuild all the indexes that are opened for a database 
  2443. file. 
  2444.  
  2445. When a database has been changed without its associated indexes opened, the 
  2446. index pointers will be incorrect.  This function will rebuild all indexes for 
  2447. the file. 
  2448.  
  2449. Also, use this function when many updates have been applied to a database, even 
  2450. with the index opened.  This will maintain the indexes for efficiency. 
  2451.  
  2452. myfilename = 'c:\xbase\machn.dbf'
  2453. myndxname = 'c:\xbase\machn.ndxf'
  2454. rexxbase_reindexdbf('myfilename',myndxname)
  2455.  
  2456. Return Value  Description 
  2457.  
  2458. ''. 
  2459.           Normal 
  2460.  
  2461. No REXX DBF Name Specified 
  2462.           No argument was passed to the routine. 
  2463.  
  2464. Unknown Database Name. 
  2465.           The name found in the passed parameter is not the same used to open 
  2466.           the database. 
  2467.  
  2468. Database Tied To A Join 
  2469.           The database is already in use by the RexxBase_JoinDBF function. (See 
  2470.           registered user functions.) 
  2471.  
  2472. Sample. 
  2473.  
  2474. /* REXX */
  2475. dbf = 'c:\xbase\newmachn.dbf'
  2476. rexxbase_opendbf('dbf','c:\xbase\newmachn.ndx')
  2477. ret = rexxbase_reindexdbf('dbf')
  2478. say  newmachn.mdx has been rebuilt
  2479. say  newmachn.ndx has been rebuilt
  2480. ret = rexxbase_closedbf('dbf')
  2481.  
  2482.  
  2483. ΓòÉΓòÉΓòÉ 4.5. Database Sorting. ΓòÉΓòÉΓòÉ
  2484.  
  2485.  
  2486. ΓòÉΓòÉΓòÉ 4.5.1. Rexxbase_SortDBF ΓòÉΓòÉΓòÉ
  2487.  
  2488. Description.  This will sort a database file by fields names and create a new 
  2489. database file. 
  2490.  
  2491. Prior to calling the RexxBase Sort function you must specify the sort fields 
  2492. and the sort order for each field.  You do this by creating field names using 
  2493. the database variable name concatenated with the SORTFIELD string. 
  2494.  
  2495. ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ
  2496. ΓöéSort FieldΓöé*.SORTFIELD.0  ΓöéThe number of  Γöé               Γöé          Γöé
  2497. ΓöéCount     Γöé               Γöéfields to be   Γöé               Γöé          Γöé
  2498. Γöé          Γöé               Γöéused for sort  Γöé               Γöé          Γöé
  2499. Γöé          Γöé               Γöécriteria.      Γöé               Γöé          Γöé
  2500. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  2501. ΓöéSort FieldΓöé*.SORTFIELD.1  ΓöéThe primary    Γöé*.SORTTYPE.1   ΓöéUse a     Γöé
  2502. ΓöéName 1    Γöé               Γöésort field.    Γöé               Γöévalue of  Γöé
  2503. Γöé          Γöé               Γöé               Γöé               Γöé'-' (minusΓöé
  2504. Γöé          Γöé               Γöé               Γöé               Γöésign) to  Γöé
  2505. Γöé          Γöé               Γöé               Γöé               Γöésort this Γöé
  2506. Γöé          Γöé               Γöé               Γöé               Γöéfield in  Γöé
  2507. Γöé          Γöé               Γöé               Γöé               ΓöédescendingΓöé
  2508. Γöé          Γöé               Γöé               Γöé               Γöéorder.    Γöé
  2509. Γöé          Γöé               Γöé               Γöé               ΓöéAny other Γöé
  2510. Γöé          Γöé               Γöé               Γöé               Γöévalue willΓöé
  2511. Γöé          Γöé               Γöé               Γöé               Γöésort the  Γöé
  2512. Γöé          Γöé               Γöé               Γöé               Γöéfield in  Γöé
  2513. Γöé          Γöé               Γöé               Γöé               Γöéascending Γöé
  2514. Γöé          Γöé               Γöé               Γöé               Γöéorder.    Γöé
  2515. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  2516. Γöé.         Γöé.              Γöé               Γöé               Γöé          Γöé
  2517. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  2518. ΓöéSort FieldΓöé*.SORTFIELD.n  ΓöéThe last sort  Γöé               Γöé          Γöé
  2519. Γöén         Γöé               Γöéfield in       Γöé               Γöé          Γöé
  2520. Γöé          Γöé               Γöépriority.  The Γöé               Γöé          Γöé
  2521. Γöé          Γöé               Γöévalue of n     Γöé               Γöé          Γöé
  2522. Γöé          Γöé               Γöéshould be equalΓöé               Γöé          Γöé
  2523. Γöé          Γöé               Γöéto the value   Γöé               Γöé          Γöé
  2524. Γöé          Γöé               Γöéspecified in   Γöé               Γöé          Γöé
  2525. Γöé          Γöé               Γöédbname.SORTFIELΓöé               Γöé          Γöé
  2526. ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ
  2527.  
  2528. Purpose. 
  2529.  
  2530. To sort a database. 
  2531.  
  2532. Format. 
  2533.  
  2534. rexxbase_sortdbf('dbfname',sortfilename) 
  2535.  
  2536. Parameters. 
  2537.  
  2538. dbfname 
  2539.           The REXX variable contains the name of your database as you defined 
  2540.           it in the Rexxbase_OpenDBF function. 
  2541. sortfilename 
  2542.           The sorted output file name as it will be known to the operating 
  2543.           system. 
  2544.  
  2545. This function can skip deleted records by setting Rexxbase.SkipDeleted. 
  2546.  
  2547. The name of the database is defined in a REXX variable.  You must pass the 
  2548. variable name in a string.  For example. 
  2549.  
  2550. myfilename = 'c:\xbase\machines.dbf' ret =
  2551. rexxbase_sortdbf('myfilename','c:\xbase\machsort.dbf')
  2552.  
  2553. Return Value  Description 
  2554.  
  2555. ''. 
  2556.           Normal 
  2557.  
  2558. No REXX DBF Name Specified 
  2559.           The first parameter of function call is missing. 
  2560.  
  2561. No Sort DBF Name Specified 
  2562.           The second parameter of function call is missing. 
  2563.  
  2564. Unknown Database Name. 
  2565.           The name found in the passed parameter is not the same used to open 
  2566.           the database. 
  2567.  
  2568. Sort Field Count Not Found 
  2569.           The REXX variable containing the field count is missing.  See 
  2570.           *.SORTFIELD.0 above. 
  2571.  
  2572. Can't Find 'fieldname' 
  2573.           The field name used by the SORTFIELD stem variables are not part of 
  2574.           this database. 
  2575.  
  2576. Not Enough Memory For Summarizing or Sorting 
  2577.           RexxBase uses the physical and virtual address space to perform the 
  2578.           sort.  The database to be sorted is too large for this process. 
  2579.  
  2580. Can't Open Sort DBF File. 
  2581.           OS/2 returned a error code that indicates some type of error has 
  2582.           occurred while opening the output database. 
  2583.  
  2584. Can't Write To Sort DBF File. 
  2585.           OS/2 returned a error code that indicates some type of error has 
  2586.           occurred while writing the output database. 
  2587.  
  2588. Unable To Write Fields To File. 
  2589.           OS/2 returned a error code that indicates some type of error has 
  2590.           occurred while writing the output database. 
  2591.  
  2592. Internal File Processing Area 
  2593.           Record area could not be read. Find the XX error code in the 
  2594.           rexxbase.error  stem variable. Where XX is a return code from OS/2. 
  2595.           If XX is equal to 5 then the operating system is denying access to 
  2596.           that area.  If XX is equal to 33 then the record area has been 
  2597.           locked.  For other values you can type on the command line 'HELP XX' 
  2598.           to find the values for XX. 
  2599.  
  2600. Record Locked 
  2601.           The file has been locked by another process. 
  2602.  
  2603. Sample. 
  2604.  
  2605. /* REXX */
  2606. /* sort on field name location (descending)*/
  2607. dbf = 'c:\users\net.dbf'
  2608. ret = rexxbase_opendbf('dbf')
  2609. if ret \= '' then do
  2610.   say ret
  2611.   exit
  2612.  end
  2613. dbf.sortfield.0 = 1
  2614. dbf.sortfield.1 = location
  2615. dbf.sorttype.1 = '-'
  2616. ret = rexxbase_sortdbf('dbf','c:\users\sortloc.dbf')
  2617.  
  2618.  NOTE: 
  2619.  
  2620. MEMO fields for the original file are valid with the SORTED file.  BUT these 
  2621. MEMO fields can be corrupted with either file changes or adds a MEMO field. 
  2622. THEREFORE, if you want to use the DBT (MEMO file) with the sorted file, you 
  2623. should copy the DBT file using the SORTED file name. 
  2624.  
  2625.  dbf = 'presort.dbf'
  2626.  call rexxbase_opendbf 'dbf'
  2627.  call rexxbase_sortdbf 'dbf' 'sorted.dbf'
  2628.  'COPY presort.dbt sorted.dbt'
  2629.  sdbf = 'sorted.dbf'
  2630.  call rexxbase_opendbf 'sdbf'
  2631.  
  2632.  
  2633. ΓòÉΓòÉΓòÉ 4.6. Registered User Functions. ΓòÉΓòÉΓòÉ
  2634.  
  2635.  The following functions are available with the registered user package: 
  2636.  
  2637. o Rexxbase_ReadAndLockDBF 
  2638.  
  2639. o Rexxbase_ReadAndLockPrevDBF 
  2640.  
  2641. o Rexxbase_GoToAndLockRecord 
  2642.  
  2643. o Rexxbase_FindAndLockRecord 
  2644.  
  2645. o Rexxbase_WriteDBFWithLock 
  2646.  
  2647. o Rexxbase_LockDBF 
  2648.  
  2649. o Rexxbase_UnlockDBF 
  2650.  
  2651. o Rexxbase_SetLockTimeout 
  2652.  
  2653. o Rexxbase_ExportDBF 
  2654.  
  2655. o Rexxbase_ImportDBF 
  2656.  
  2657. o Rexxbase_FormatDate 
  2658.  
  2659. o Rexxbase_InternalDate 
  2660.  
  2661. o Rexxbase_DaysDifference 
  2662.  
  2663. o Rexxbase_DateCalc 
  2664.  
  2665. o Rexxbase_DayOfWeek 
  2666.  
  2667. o Rexxbase_FilterDBF 
  2668.  
  2669. o Rexxbase_ScanForRecord 
  2670.  
  2671. o Rexxbase_JoinDBF 
  2672.  
  2673. o Rexxbase_SummarizeDBF 
  2674.  
  2675. o Rexxbase_ChangePrimaryIndex 
  2676.  
  2677. o Rexxbase_Soundex 
  2678.  
  2679.  
  2680. ΓòÉΓòÉΓòÉ 5. RexxBase Fields and Database Fields. ΓòÉΓòÉΓòÉ
  2681.  
  2682. RexxBase uses REXX Stem and Compound variables extensively to allow your 
  2683. procedure to use your database files. 
  2684.  
  2685.  
  2686. ΓòÉΓòÉΓòÉ 5.1. RexxBase Fields. ΓòÉΓòÉΓòÉ
  2687.  
  2688. RexxBase PROVIDES several fields for controlling your database.  All field 
  2689. names are associated with your database by using the stem variable name you 
  2690. pass to the RexxBase Functions. 
  2691.  
  2692. Also, RexxBase provides a stem variable for system errors.  The field name is 
  2693. rexxbase.error .  Refer to the section on error processing for more information 
  2694. and a list of potential error messages. 
  2695.  
  2696. Name      Description. 
  2697. "database name".RECORDCOUNT 
  2698.           Number of record on the file.  Where database name is the name your 
  2699.           program passes to RexxBase. 
  2700. "database name".DBASEFILEFORMAT 
  2701.           A value of dBase3 or dBase4. The format of the DBF based on internal 
  2702.           indicators.  NOTE: without using MDX files or MEMO fields, the format 
  2703.           defaults to dBase3. 
  2704. "database name".RECORDNUMBER 
  2705.           The current record number.  Where database name is the name your 
  2706.           program passes to RexxBase. 
  2707. "database name".FILESTATUS 
  2708.           TOF - Top of file, BOF - End of file, or null. 
  2709. "database name".RECORDSTATUS 
  2710.           DELETED - current record is deleted, or null. 
  2711. "database name".LASTUPDATE 
  2712.           Last day file was updated. 
  2713. "database name".FIELDCOUNT 
  2714.           Number of fields on the database. 
  2715. database name".FIELDNAME.# 
  2716.           Field names on the database.  Where # is any number from 1 to the 
  2717.           number of fields as specified in FIELDCOUNT. 
  2718. "database name"."fieldname".TYPE 
  2719.           The database type for the respective field, see FIELDNAME.#. 
  2720.           "fieldname" is the name of the field in the database. 
  2721. "database name"."fieldname".LENGTH 
  2722.           The length of the respective field, see FIELDNAME.#.  "fieldname" is 
  2723.           the name of the field in the database.  Numeric fields will have in 
  2724.           the value in the format of xx.yy where xx is the length of the field 
  2725.           and yy is the number of decimal positions.  Memo fields are always 
  2726.           10.  Logical fields are always 1. 
  2727. "database name".INDEXCOUNT 
  2728.           Number of index files open for the database. 
  2729. "database name".INDEXFILETYPE.# 
  2730.           Returns either NDX or MDX. Where # is any number from 1 to the number 
  2731.           of fields as specified in INDEXCOUNT. 
  2732. "database name".INDEXFILENAME.# 
  2733.           Operating System file names for the open index files. Where # is any 
  2734.           number from 1 to the number of fields as specified in INDEXCOUNT. 
  2735. "database name".INDEXFIELDS.# 
  2736.           Field names used for indexing.  Where # is any number from 1 to the 
  2737.           number of fields as specified in INDEXCOUNT. 
  2738. "database name".TAGFIELDS.#. 
  2739.           For MDX index files, this is the number of defined TAG fields. Where 
  2740.           # is any number from 1 to the number of fields as specified in 
  2741.           INDEXCOUNT. 
  2742. "database name".INDEXTAGNAME.#.##. 
  2743.           For MDX index files, this is the TAG field name. Where # is any 
  2744.           number from 1 to the number of fields as specified in INDEXCOUNT. 
  2745.           Where ## is any number from 1 to the number of fields as specified in 
  2746.           INDEXFIELDS. 
  2747. "database name".INDEXTAGFIELDS.#.##. 
  2748.           For MDX index files, these are the fields that are specified by the 
  2749.           TAG name. Similar to INDEXFIELDNAME above. Where # is any number from 
  2750.           1 to the number of fields as specified in INDEXCOUNT. Where ## is any 
  2751.           number from 1 to the number of fields as specified in INDEXFIELDS. 
  2752. "database name".INDEXVALUE.#(.##). 
  2753.           This is the value for the current index record. Where # is any number 
  2754.           from 1 to the number of fields as specified in INDEXCOUNT. For MDX 
  2755.           TAG indexes, ## is any number from 1 to the number of fields as 
  2756.           specified in INDEXFIELDS. 
  2757.  
  2758.  
  2759. ΓòÉΓòÉΓòÉ 5.1.1. Field Naming Convention. ΓòÉΓòÉΓòÉ
  2760.  
  2761. With the exception of RexxBase database names, all database field names are 
  2762. prefixed by the Rexx variable you use to specify the database.  For example if 
  2763. you used the REXX variable DNAME as the database name the field count variable 
  2764. name would be DNAME.FIELDCOUNT. 
  2765.  
  2766. Database field names are directly accessible by the field name in the database. 
  2767. For example if your database had three fields defined as NAME, CITY, ZIP, then 
  2768. your REXX procedure will be able to read from and write to these fields by 
  2769. using the name directly.  The database name is not prefixed to the fields 
  2770. names. 
  2771.  
  2772. To find out the field names in a database use the following example: 
  2773.  
  2774. /* REXX */
  2775. parse arg dbfname
  2776. do i = 1 to dbfname.fieldcount
  2777.   k = "say dbfname.fieldname.i "
  2778.   k = k || " dbfname."dbfname.fieldname.i".type"
  2779.   k = k || " dbfname."dbfname.fieldname.i".length"
  2780.   interpret k
  2781. end /* do */
  2782. say dbfname
  2783. do i = 1 to dbfname.recordcount
  2784.   say dbfname.recordstatus
  2785.   say reading is rexxbase_readdbf("dbfname")
  2786.   do j = 1 to dbfname.fieldcount
  2787.     k = "say dbfname.fieldname.j "
  2788.     k = k || " is dbfname." || dbfname.fieldname.j
  2789.     interpret k     /* don't let the quoted field name fool you */
  2790.     /* the first dbfname.fieldname.j will appear as the field name after interpretation*/
  2791.     /* the second will have the value appear after interpretation */
  2792.    end /* do */
  2793.  end /* do */
  2794. /* since no index files */
  2795. if dbfname.indexcount = 0 then say "No MDX Files Or NDX files found"
  2796. else do
  2797.         /* but there maybe a MDX file */
  2798.         say "This file has an associated MDX file"
  2799.         end
  2800.  
  2801. say rexxbase_closedbf("dbfname")
  2802. return
  2803.  
  2804.  
  2805. ΓòÉΓòÉΓòÉ 5.1.2. Your Program Changing a RexxBase Field Value. ΓòÉΓòÉΓòÉ
  2806.  
  2807. In most cases if you change a RexxBase field value, like FIELDCOUNT there will 
  2808. be no effect internally to RexxBase or the actual database file. 
  2809.  
  2810.  
  2811. ΓòÉΓòÉΓòÉ 5.2. Database Fields. ΓòÉΓòÉΓòÉ
  2812.  
  2813. Database field name are accessible by concatenating the database variable name, 
  2814. your procedure assigns when opening the database, with the field name in the 
  2815. database.  For example if your database had three fields defined as NAME, CITY, 
  2816. ZIP, and your REXX procedure opened the database as ADDRESS then your REXX 
  2817. procedure will be able to read from and write to these fields by using the 
  2818. names ADDRESS.NAME, ADDRESS.CITY AND ADDRESS.ZIP. 
  2819.  
  2820. The database name is prefixed to the fields names. 
  2821.  
  2822.  
  2823. ΓòÉΓòÉΓòÉ 5.2.1. Example of Field Naming. ΓòÉΓòÉΓòÉ
  2824.  
  2825. Unlike RexxBase field names, database field are never prefixed with the 
  2826. database name when used as a function parameter or in field definitions.  For 
  2827. example when sorting on a field, you must specify what field to sort using the 
  2828. databasename.SORTFIELD.# construct.  The field name you put into the assignment 
  2829. is simply the field name as defined to the dBase database. 
  2830.  
  2831. /* to sort on field ZIP in database ADDRESS */
  2832. address.sortfield.0 = 1
  2833. address.sortfield.1 = zip /* wrong */
  2834. /* address.sortfield.1 = address.zip */
  2835. /* this will assign the value of address.zip to address.sortfield.1 */
  2836. /* which will only work if the value of address.zip is zip */
  2837.  
  2838.  
  2839. ΓòÉΓòÉΓòÉ 5.3. Field Verification. ΓòÉΓòÉΓòÉ
  2840.  
  2841. The following field verifications and edits are used. 
  2842.  
  2843.  
  2844. ΓòÉΓòÉΓòÉ 5.3.1. Date Fields ΓòÉΓòÉΓòÉ
  2845.  
  2846. Dates are validated based on two parameters. 
  2847.  
  2848. First, is the RexxBase Variable RexxBase.FormatDate. 
  2849.  
  2850. Second, is the Country Code, as defined by OS/2 NLS. 
  2851.  
  2852. RexxBase.FormatDate takes precedence.  If it is turned "OFF" then all date 
  2853. fields are assumed to be in the following 8 numeric-character format: 
  2854. CCYYMMDD. 
  2855.  
  2856. CC - century. 
  2857.  
  2858. YY - year. 
  2859.  
  2860. MM - month. 
  2861.  
  2862. DD - day. 
  2863.  
  2864. If you need to use dates that go past 1999/12/31 then you should always use 
  2865. this format.  This is because the default century for the other formats is 
  2866. "1900." 
  2867.  
  2868. If RexxBase.FormatDate is "ON", the default value, then date fields are 
  2869. formatted based on the Country Code.  As follows:  (all are 8 bytes long with 
  2870. separators). 
  2871.  
  2872. MM/DD/YY, slashes or some other separator is required 
  2873.  
  2874. DD/MM/YY, slashes or some other separator is required 
  2875.  
  2876. YY/MM/DD, slashes or some other separator is required 
  2877.  
  2878. Edits are performed on all 4 types of date fields. 
  2879.  
  2880. Century is ignored and defaults to 19. 
  2881.  
  2882. Year is any numeric value from 00 to 99. 
  2883.  
  2884. Month is any numeric value from 01 to 12. 
  2885.  
  2886. Day is any numeric value from 01 to last day of month. 
  2887.  
  2888.  
  2889. ΓòÉΓòÉΓòÉ 5.3.2. Numeric Fields ΓòÉΓòÉΓòÉ
  2890.  
  2891. Numeric field verification skips over white space characters until an 
  2892. alphanumeric character is found.  If the first non-white space character is 
  2893. alphabetic then the value is stored as zero - NOTE:  there is no error message. 
  2894. Field values larger than the defined length (and/or decimal count) are 
  2895. truncated. 
  2896.  
  2897.  
  2898. ΓòÉΓòÉΓòÉ 5.3.3. Logical fields ΓòÉΓòÉΓòÉ
  2899.  
  2900. Logical fields are tested and verified for correctness as follows: 
  2901.  
  2902. ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ
  2903. ΓöéFirst Byte of       ΓöéStored Γöé                              Γöé
  2904. ΓöéLogical Field Value ΓöéAs     Γöé                              Γöé
  2905. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  2906. ΓöéT, t, 1, Y, or y    ΓöéT      Γöé                              Γöé
  2907. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  2908. ΓöéF, f, 0, N, or n    ΓöéF      Γöé                              Γöé
  2909. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  2910. ΓöéAny other value     ΓöéF      ΓöéLook for error message on     Γöé
  2911. Γöé                    Γöé       Γöérexxbase.error  stem variable.Γöé
  2912. ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ
  2913.  
  2914. RexxBase can also return REXX logical values. If the control variable 
  2915. REXXBASE.REXXLOGICALS  is set to ON, then read functions will either return 0 
  2916. for F value fields or 1 for T valued fields. 
  2917.  
  2918.  
  2919. ΓòÉΓòÉΓòÉ 5.3.4. MEMO Fields. ΓòÉΓòÉΓòÉ
  2920.  
  2921. Memo field names follow the same field naming convention as other field names. 
  2922.  
  2923.  
  2924. ΓòÉΓòÉΓòÉ 6. When You Are Done. ΓòÉΓòÉΓòÉ
  2925.  
  2926. After using the RexxBase functions your REXX command file may drop the RexxBase 
  2927. functions. This can be accomplished by using the Rexxbase_ShutDown function or 
  2928. issuing the Rexx command RXFUNCDROP for each function. 
  2929.  
  2930. While the IBM documentation recommends dropping functions.  we feel that it is 
  2931. an unnecessary exercise.  Do this only if you have literally thousands of 
  2932. functions registered.  The space requirements are minimal, but the search time, 
  2933. for thousands of functions, may be significant. 
  2934.  
  2935.  
  2936. ΓòÉΓòÉΓòÉ 6.1. Rexxbase_ShutDown. ΓòÉΓòÉΓòÉ
  2937.  
  2938. There may be a time when you want to drop all of the RexxBase functions from 
  2939. the Rexx function pool. To do this use the RexxBase command RexxBase_ShutDown. 
  2940. ShutDown function is to issue a Rexx Function Drop for each of the RexxBase 
  2941. functions.  It is pretty much performs the opposite utility of the 
  2942. RexxBase_Init command. 
  2943.  
  2944.  RexxBase_ShutDown() 
  2945.  
  2946.  There are no parameters. 
  2947.  
  2948.  There is no return code. 
  2949.  
  2950.  
  2951. ΓòÉΓòÉΓòÉ 6.2. Dropping Individual RexxBase Functions. ΓòÉΓòÉΓòÉ
  2952.  
  2953. The format of the command is  RXFUNCDROP(function) 
  2954.  
  2955. function is the name of the RexxBase routine as your procedure defined it. 
  2956.  
  2957. rxfuncdrop(rexxbase_opendbf) 
  2958.  
  2959. Return codes most likely to be returned are: 
  2960.  
  2961. o  0 - OK. 
  2962. o  40 - function not found. 
  2963.  
  2964.  
  2965. ΓòÉΓòÉΓòÉ 7. Returned Values and Internal Errors. ΓòÉΓòÉΓòÉ
  2966.  
  2967. The following two sections are lists of return values and internal error 
  2968. messages. 
  2969.  
  2970.  
  2971. ΓòÉΓòÉΓòÉ 7.1. Return Values and Functions ΓòÉΓòÉΓòÉ
  2972.  
  2973.  The following is a list of possible return values and associated function 
  2974. names: 
  2975.  
  2976. o BOF 
  2977.  
  2978.   Rexxbase_ReadDBF 
  2979.  
  2980.   Rexxbase_ReadDBF 
  2981.  
  2982.   Rexxbase_ReadDBF 
  2983.  
  2984.   Rexxbase_GoToRecord 
  2985.  
  2986.   Rexxbase_GoToRecord 
  2987.  
  2988.   Rexxbase_ScanForRecord 
  2989.  
  2990.   Rexxbase_ScanForRecord 
  2991.  
  2992. o Bad Record Number 
  2993.  
  2994.   Rexxbase_GoToRecord 
  2995.  
  2996. o Bad Variable Name. Rexx Rtn  is %2.2x\0 
  2997.  
  2998.   Rexxbase_OpenDBF 
  2999.  
  3000. o Bad Variable Name;  rc  is %2.2x\0 
  3001.  
  3002.   Rexxbase_CreateDBF 
  3003.  
  3004.   Rexxbase_CreateFromDBF 
  3005.  
  3006. o Can't Create Area For Join 
  3007.  
  3008.   Rexxbase_JoinDBF 
  3009.  
  3010. o Can't Find filename 
  3011.  
  3012.   Rexxbase_SortDBF 
  3013.  
  3014. o Can't Open Index File, Database Is Open 
  3015.  
  3016.   Rexxbase_OpenDBF 
  3017.  
  3018. o Can't Open Sort DBF File 
  3019.  
  3020.   Rexxbase_SummarizeDBF 
  3021.  
  3022.   Rexxbase_SortDBF 
  3023.  
  3024. o Can't Open filename 
  3025.  
  3026.   Rexxbase_OpenDBF 
  3027.  
  3028. o Can't Write To Sort DBF file 
  3029.  
  3030.   Rexxbase_SummarizeDBF 
  3031.  
  3032.   Rexxbase_SortDBF 
  3033.  
  3034. o Create Failed 
  3035.  
  3036.   Rexxbase_CreateDBF 
  3037.  
  3038. o Create Index File Failed 
  3039.  
  3040.   Rexxbase_CreateMultipleIndexFile 
  3041.  
  3042. o CreateFrom Failed 
  3043.  
  3044.   Rexxbase_CreateFromDBF 
  3045.  
  3046. o Database Name Already In Use 
  3047.  
  3048.   Rexxbase_OpenDBF 
  3049.  
  3050.   Rexxbase_CreateDBF 
  3051.  
  3052.   Rexxbase_CreateFromDBF 
  3053.  
  3054. o Database Tied TO A Join 
  3055.  
  3056.   Rexxbase_ReindexDBF 
  3057.  
  3058. o Database Tied To A Join 
  3059.  
  3060.   Rexxbase_CloseDBF 
  3061.  
  3062.   Rexxbase_ReadDBF 
  3063.  
  3064.   Rexxbase_ReadPrevDBF 
  3065.  
  3066.   Rexxbase_GoToRecord 
  3067.  
  3068.   Rexxbase_WriteDBF 
  3069.  
  3070.   Rexxbase_UpdateDBF 
  3071.  
  3072.   Rexxbase_ScanForRecord 
  3073.  
  3074.   Rexxbase_CreateFromDBF 
  3075.  
  3076.   Rexxbase_ModifyDBF 
  3077.  
  3078.   Rexxbase_DeleteRecord 
  3079.  
  3080.   Rexxbase_UndeleteRecord 
  3081.  
  3082.   Rexxbase_FindRecord 
  3083.  
  3084.   Rexxbase_ChangePrimaryIndex 
  3085.  
  3086.   Rexxbase_CreateIndex 
  3087.  
  3088.   Rexxbase_CreateMultipleIndexFile 
  3089.  
  3090.   Rexxbase_AddTagToIndex 
  3091.  
  3092.   Rexxbase_DropTagFromIndex 
  3093.  
  3094.   Rexxbase_PackDBF 
  3095.  
  3096.   Rexxbase_SummarizeDBF 
  3097.  
  3098.   Rexxbase_SortDBF 
  3099.  
  3100. o Failed To Add Tag To Index 
  3101.  
  3102.   Rexxbase_AddTagToIndex 
  3103.  
  3104. o Failed To Drop Tag From Index 
  3105.  
  3106.   Rexxbase_DropTagFromIndex 
  3107.  
  3108. o First Database Name Unknown 
  3109.  
  3110.   Rexxbase_JoinDBF 
  3111.  
  3112. o First Joined DBF Name Not Specified 
  3113.  
  3114.   Rexxbase_JoinDBF 
  3115.  
  3116. o Index File Not Opened 
  3117.  
  3118.   Rexxbase_ChangePrimaryIndex 
  3119.  
  3120. o Index File Not Opened or Tag Set 
  3121.  
  3122.   Rexxbase_FindRecord 
  3123.  
  3124. o Index Limit Reached 
  3125.  
  3126.   Rexxbase_OpenDBF 
  3127.  
  3128. o Index Not Built 
  3129.  
  3130.   Rexxbase_CreateIndex 
  3131.  
  3132. o Index Tag Name Not Found 
  3133.  
  3134.   Rexxbase_SetIndexTagName 
  3135.  
  3136. o Internal File Processing Error 
  3137.  
  3138.   Rexxbase_ReadDBF 
  3139.  
  3140.   Rexxbase_ReadPrevDBF 
  3141.  
  3142.   Rexxbase_GoToRecord 
  3143.  
  3144.   Rexxbase_ScanForRecord 
  3145.  
  3146.   Rexxbase_FindRecord 
  3147.  
  3148.   Rexxbase_SummarizeDBF 
  3149.  
  3150.   Rexxbase_SortDBF 
  3151.  
  3152. o Internal processing error 
  3153.  
  3154.   Rexxbase_JoinDBF 
  3155.  
  3156. o Invalid Condition Found 
  3157.  
  3158.   Rexxbase_FilterDBF 
  3159.  
  3160.   Rexxbase_ScanForRecord 
  3161.  
  3162.   Rexxbase_JoinDBF 
  3163.  
  3164. o Invalid Field Specification Found 
  3165.  
  3166.   Rexxbase_JoinDBF 
  3167.  
  3168. o Invalid Index Ordinal 
  3169.  
  3170.   Rexxbase_ChangePrimaryIndex 
  3171.  
  3172.   Rexxbase_ChangePrimaryIndex 
  3173.  
  3174. o Invalid Record Position 
  3175.  
  3176.   Rexxbase_UpdateDBF 
  3177.  
  3178. o Join Database Name Already In Use 
  3179.  
  3180.   Rexxbase_JoinDBF 
  3181.  
  3182. o Missing Index File Name,  Database is open. 
  3183.  
  3184.   Rexxbase_OpenDBF 
  3185.  
  3186. o Modify Failed 
  3187.  
  3188.   Rexxbase_ModifyDBF 
  3189.  
  3190. o New Tag Name Too Long 
  3191.  
  3192.   Rexxbase_AddTagToIndex 
  3193.  
  3194. o No Conditions Specified 
  3195.  
  3196.   Rexxbase_ScanForRecord 
  3197.  
  3198. o No DBF Name To Copy Structure To 
  3199.  
  3200.   Rexxbase_CreateFromDBF 
  3201.  
  3202. o No Filename Assigned  To Variable 
  3203.  
  3204.   Rexxbase_CreateDBF 
  3205.  
  3206. o No Filename Assigned To Variable 
  3207.  
  3208.   Rexxbase_OpenDBF 
  3209.  
  3210.   Rexxbase_CreateFromDBF 
  3211.  
  3212. o No Index Field Names Specified 
  3213.  
  3214.   Rexxbase_CreateIndex 
  3215.  
  3216. o No Index File Name Specified 
  3217.  
  3218.   Rexxbase_CreateIndex 
  3219.  
  3220.   Rexxbase_CreateMultipleIndexFile 
  3221.  
  3222. o No Index Ordinal Specified 
  3223.  
  3224.   Rexxbase_ChangePrimaryIndex 
  3225.  
  3226. o No Index Tag File Opened 
  3227.  
  3228.   Rexxbase_SetIndexTagName 
  3229.  
  3230. o No Index Tag Name Specified 
  3231.  
  3232.   Rexxbase_SetIndexTagName 
  3233.  
  3234. o No Joining Condition Specified 
  3235.  
  3236.   Rexxbase_JoinDBF 
  3237.  
  3238. o No Joining Fields Specified 
  3239.  
  3240.   Rexxbase_JoinDBF 
  3241.  
  3242. o No Locate String Specified 
  3243.  
  3244.   Rexxbase_FindRecord 
  3245.  
  3246. o No New Tag Name Specified 
  3247.  
  3248.   Rexxbase_AddTagToIndex 
  3249.  
  3250.   Rexxbase_DropTagFromIndex 
  3251.  
  3252. o No Record Number Specified 
  3253.  
  3254.   Rexxbase_GoToRecord 
  3255.  
  3256. o No Record Read 
  3257.  
  3258.   Rexxbase_DeleteRecord 
  3259.  
  3260.   Rexxbase_UndeleteRecord 
  3261.  
  3262. o No Rexx DBF Name Specified 
  3263.  
  3264.   Rexxbase_OpenDBF 
  3265.  
  3266.   Rexxbase_CloseDBF 
  3267.  
  3268.   Rexxbase_ReadDBF 
  3269.  
  3270.   Rexxbase_ReadPrevDBF 
  3271.  
  3272.   Rexxbase_GoToRecord 
  3273.  
  3274.   Rexxbase_WriteDBF 
  3275.  
  3276.   Rexxbase_UpdateDBF 
  3277.  
  3278.   Rexxbase_FilterDBF 
  3279.  
  3280.   Rexxbase_ScanForRecord 
  3281.  
  3282.   Rexxbase_CreateDBF 
  3283.  
  3284.   Rexxbase_CreateFromDBF 
  3285.  
  3286.   Rexxbase_ModifyDBF 
  3287.  
  3288.   Rexxbase_DeleteRecord 
  3289.  
  3290.   Rexxbase_UndeleteRecord 
  3291.  
  3292.   Rexxbase_FindRecord 
  3293.  
  3294.   Rexxbase_SetIndexTagName 
  3295.  
  3296.   Rexxbase_ChangePrimaryIndex 
  3297.  
  3298.   Rexxbase_CreateIndex 
  3299.  
  3300.   Rexxbase_CreateMultipleIndexFile 
  3301.  
  3302.   Rexxbase_AddTagToIndex 
  3303.  
  3304.   Rexxbase_DropTagFromIndex 
  3305.  
  3306.   Rexxbase_ReindexDBF 
  3307.  
  3308.   Rexxbase_PackDBF 
  3309.  
  3310.   Rexxbase_SummarizeDBF 
  3311.  
  3312.   Rexxbase_SortDBF 
  3313.  
  3314. o No Rexx Joined DBF Name Specified 
  3315.  
  3316.   Rexxbase_JoinDBF 
  3317.  
  3318. o No Sort DBF Name Specified 
  3319.  
  3320.   Rexxbase_SummarizeDBF 
  3321.  
  3322.   Rexxbase_SortDBF 
  3323.  
  3324. o No Tag Index Fields Specified 
  3325.  
  3326.   Rexxbase_AddTagToIndex 
  3327.  
  3328.   Rexxbase_DropTagFromIndex 
  3329.  
  3330. o Not Enough Memory For Sorting 
  3331.  
  3332.   Rexxbase_SummarizeDBF 
  3333.  
  3334.   Rexxbase_SortDBF 
  3335.  
  3336. o Not Enough Memory For Summarizing or Sorting 
  3337.  
  3338.   Rexxbase_SummarizeDBF 
  3339.  
  3340. o Primary Index File Not MDX Format 
  3341.  
  3342.   Rexxbase_DropTagFromIndex 
  3343.  
  3344. o Primary Index Not MDX Type 
  3345.  
  3346.   Rexxbase_SetIndexTagName 
  3347.  
  3348. o Record Locked 
  3349.  
  3350.   Rexxbase_SortDBF 
  3351.  
  3352. o Record Not Found 
  3353.  
  3354.   Rexxbase_FindRecord 
  3355.  
  3356.   Rexxbase_FindRecord 
  3357.  
  3358.   Rexxbase_FindRecord 
  3359.  
  3360.   Rexxbase_FindRecord 
  3361.  
  3362.   Rexxbase_FindRecord 
  3363.  
  3364. o Record locked 
  3365.  
  3366.   Rexxbase_ReadDBF 
  3367.  
  3368.   Rexxbase_ReadPrevDBF 
  3369.  
  3370.   Rexxbase_GoToRecord 
  3371.  
  3372.   Rexxbase_ScanForRecord 
  3373.  
  3374.   Rexxbase_FindRecord 
  3375.  
  3376.   Rexxbase_JoinDBF 
  3377.  
  3378.   Rexxbase_SummarizeDBF 
  3379.  
  3380. o Record with duplicate key not updated 
  3381.  
  3382.   Rexxbase_UpdateDBF 
  3383.  
  3384.   Rexxbase_PackDBF 
  3385.  
  3386. o Record with duplicate key not written 
  3387.  
  3388.   Rexxbase_WriteDBF 
  3389.  
  3390. o Second Database Name Unknown 
  3391.  
  3392.   Rexxbase_JoinDBF 
  3393.  
  3394. o Second Joined DBF Name Not Specified 
  3395.  
  3396.   Rexxbase_JoinDBF 
  3397.  
  3398. o Sort Field Count Not Found 
  3399.  
  3400.   Rexxbase_SummarizeDBF 
  3401.  
  3402.   Rexxbase_SortDBF 
  3403.  
  3404. o TOF 
  3405.  
  3406.   Rexxbase_ReadPrevDBF 
  3407.  
  3408.   Rexxbase_ReadPrevDBF 
  3409.  
  3410.   Rexxbase_GoToRecord 
  3411.  
  3412. o Tag Index File Has No Tags 
  3413.  
  3414.   Rexxbase_SetIndexTagName 
  3415.  
  3416. o Tag Index File Not Opened 
  3417.  
  3418.   Rexxbase_AddTagToIndex 
  3419.  
  3420.   Rexxbase_DropTagFromIndex 
  3421.  
  3422. o Unable To Write Fields To  File; rc = %3.3d 
  3423.  
  3424.   Rexxbase_SummarizeDBF 
  3425.  
  3426.   Rexxbase_SortDBF 
  3427.  
  3428. o Unknown Database Name 
  3429.  
  3430.   Rexxbase_CloseDBF 
  3431.  
  3432.   Rexxbase_ReadDBF 
  3433.  
  3434.   Rexxbase_ReadPrevDBF 
  3435.  
  3436.   Rexxbase_GoToRecord 
  3437.  
  3438.   Rexxbase_WriteDBF 
  3439.  
  3440.   Rexxbase_UpdateDBF 
  3441.  
  3442.   Rexxbase_FilterDBF 
  3443.  
  3444.   Rexxbase_ScanForRecord 
  3445.  
  3446.   Rexxbase_CreateFromDBF 
  3447.  
  3448.   Rexxbase_ModifyDBF 
  3449.  
  3450.   Rexxbase_DeleteRecord 
  3451.  
  3452.   Rexxbase_UndeleteRecord 
  3453.  
  3454.   Rexxbase_FindRecord 
  3455.  
  3456.   Rexxbase_SetIndexTagName 
  3457.  
  3458.   Rexxbase_ChangePrimaryIndex 
  3459.  
  3460.   Rexxbase_CreateIndex 
  3461.  
  3462.   Rexxbase_CreateMultipleIndexFile 
  3463.  
  3464.   Rexxbase_AddTagToIndex 
  3465.  
  3466.   Rexxbase_DropTagFromIndex 
  3467.  
  3468.   Rexxbase_ReindexDBF 
  3469.  
  3470.   Rexxbase_PackDBF 
  3471.  
  3472.   Rexxbase_SummarizeDBF 
  3473.  
  3474.   Rexxbase_SortDBF 
  3475.  
  3476.  
  3477. ΓòÉΓòÉΓòÉ 7.2. Internal Errors. ΓòÉΓòÉΓòÉ
  3478.  
  3479. The following is a list of internal errors. 
  3480.  
  3481. o All other data ignored after DBF name 
  3482.  
  3483. o All other data ignored after Sort DBF name 
  3484.  
  3485. o Bad date found, changed to all spaces. 
  3486.  
  3487. o Bad field type when getting field value 
  3488.  
  3489. o Bad_Field_Count 
  3490.  
  3491. o Can not find tagname 
  3492.  
  3493. o Can't allocate memo space 
  3494.  
  3495. o Can't make float field part of a key 
  3496.  
  3497. o Can't make logical field part of a key 
  3498.  
  3499. o Can't make memo field part of a key 
  3500.  
  3501. o Can't rebuild, new file not created 
  3502.  
  3503. o Can't rebuild, old file not open 
  3504.  
  3505. o Can't rename file for modify 
  3506.  
  3507. o Data Type Mismatch 
  3508.  
  3509. o Duplicate key not written to index file 
  3510.  
  3511. o Error while reading record, packing continues 
  3512.  
  3513. o Field Length Not Defined 
  3514.  
  3515. o Field Length Not Defined Correctly 
  3516.  
  3517. o Field Name Not Okay 
  3518.  
  3519. o Field Not Defined 
  3520.  
  3521. o Field Size Not Defined Correctly 
  3522.  
  3523. o Field Type Not Defined 
  3524.  
  3525. o Field Type Not Valid 
  3526.  
  3527. o Field delimiter character not found. Import stops. 
  3528.  
  3529. o Field truncated 
  3530.  
  3531. o Field truncated. 
  3532.  
  3533. o Field_Not_Defined 
  3534.  
  3535. o Invalid expression 
  3536.  
  3537. o Invalid expression - data type mismatch 
  3538.  
  3539. o Invalid expression - invalid logic connector 
  3540.  
  3541. o Key length too long 
  3542.  
  3543. o Key length too short 
  3544.  
  3545. o MDX File Already Opened 
  3546.  
  3547. o Memo field missing field delimiter, Import stops. 
  3548.  
  3549. o Memo field missing start field delimiter, Import stops. 
  3550.  
  3551. o Memo fields not allowed in conditions 
  3552.  
  3553. o No records to index 
  3554.  
  3555. o Not enough memory for index sorting 
  3556.  
  3557. o Not enough memory for mdx sorting 
  3558.  
  3559. o Numeric field expected, not found on input file. Import stops. 
  3560.  
  3561. o Read record size does not match 
  3562.  
  3563. o Record Size Too Large 
  3564.  
  3565. o Record with duplicate key not written 
  3566.  
  3567. o Tag name already in use. 
  3568.  
  3569. o Third parameter must be EXACT.  Parameter ignored 
  3570.  
  3571. o Too many files opened 
  3572.  
  3573. o Unable to change memo file size. 
  3574.  
  3575. o Unexpected encounter in read text file 
  3576.  
  3577. o Unknown delimiter character found. Import stops 
  3578.  
  3579. o Unknown field name in field list 
  3580.  
  3581. o Unknown field specified in key file define 
  3582.  
  3583. o Unknown field specified in key file open 
  3584.  
  3585. o Unknown name in expression 
  3586.  
  3587. o Unknown operator type in parse expression logic 
  3588.  
  3589. o Would add duplicate 
  3590.  
  3591. o Written record size does not match 
  3592.  
  3593. o alloc error 
  3594.  
  3595. o invalid expression - data type mismatch 
  3596.  
  3597. o logic field value invalid, value set to 'F' 
  3598.  
  3599. o memo field write failed 
  3600.  
  3601. o memo update failed 
  3602.  
  3603. o passed bad memopointer to write memo 
  3604.  
  3605.  
  3606. ΓòÉΓòÉΓòÉ 8. Control Variables. ΓòÉΓòÉΓòÉ
  3607.  
  3608. The following is a description of RexxBase error, file, and date handling and 
  3609. extended control facilities. 
  3610.  
  3611.  
  3612. ΓòÉΓòÉΓòÉ 8.1. RexxBase Errors ΓòÉΓòÉΓòÉ
  3613.  
  3614. Errors are reported in two different ways, return codes and the error stem 
  3615. variable. If the RexxBase function returns a value other than "" then the 
  3616. function did not complete successfully. 
  3617.  
  3618.  
  3619. ΓòÉΓòÉΓòÉ 8.1.1. Where To Find Internal Error Messages ΓòÉΓòÉΓòÉ
  3620.  
  3621.  You may direct error message to one of three targets. 
  3622.  
  3623. ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ
  3624. ΓöéTarget    ΓöéDescription                                  Γöé
  3625. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  3626. ΓöéCON       ΓöéRexxBase sends all error messages to the     Γöé
  3627. Γöé          ΓöéSTDIO file, or console.  This is the default.Γöé
  3628. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  3629. ΓöéPRN       ΓöéRexxBase sends all error messages to the PRN Γöé
  3630. Γöé          Γöéfile, or printer.                            Γöé
  3631. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  3632. ΓöéSTEM      ΓöéAll messages, for the last executed RexxBase Γöé
  3633. Γöé          Γöéfunction are sent to the stem variable       Γöé
  3634. Γöé          ΓöéRexxBase.Error.   See below.                 Γöé
  3635. ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ
  3636.  
  3637.  You should set this variable prior to initializing RexxBase. 
  3638.  
  3639. /* */
  3640. RexxBase.Error = 'stem' /* sends rexxbase errors to the stem variable */
  3641. ...
  3642. dbf = ''
  3643. rc = RexxBase_OpenDBF('dbf')
  3644. if rc <> '' then do
  3645.    do i = 1 to rexxbase.error.0
  3646.      say rexxbase.error.i
  3647.   end
  3648. end
  3649. ...
  3650.  
  3651. Whether a function failed or not, there maybe other types of errors and warning 
  3652. messages that are useful to your program. These messages are found in the 
  3653. RexxBase error stem variable. 
  3654.  
  3655. All internal system and control errors can be directed to a stem variable named 
  3656. REXXBASE.ERROR.  The zeroth element is a counter This element contains them 
  3657. number of errors in the stem variable.  Each time you call a RexxBase function 
  3658. the counter is reset to zero.  Your procedure should check what is returned 
  3659. from the function call. 
  3660.  
  3661. For a further description of stem variables refer to your Rexx documentation. 
  3662.  
  3663.  
  3664. ΓòÉΓòÉΓòÉ 8.1.2. Internal Error List. ΓòÉΓòÉΓòÉ
  3665.  
  3666. The following is a list of errors and a brief explanation. 
  3667.  
  3668. Error     Description 
  3669. All other data ignored after Sort DBF name 
  3670.           More parameters were specified than are required 
  3671. Logic field value invalid, value set to 'F' 
  3672.           The value of a logic field, which will be adding to or updating a 
  3673.           database record contained an invalid value. 
  3674. Can't position at end of memo file 
  3675.           There is a severe error with a DBT file. 
  3676. Bad field type when getting field value 
  3677.           Internal error - A field type has changed 
  3678. Bad date found, changed to all spaces. 
  3679.           The value of a date field, which will be added to or updating a 
  3680.           database record contained an invalid value. 
  3681. All other data ignored after DBF name 
  3682.           More parameters were specified than are required 
  3683. Dos open error ### for file @@@@@@@@@@ 
  3684.           Operating system error, value found in ###, while trying to open file 
  3685.           @@@@@@@@@@@ 
  3686. Dos read anchor error #### for file @@@@@@@@@@ 
  3687.           Operating system error, value found in ###, while trying to read file 
  3688.           @@@@@@@@@@@ 
  3689. Unknown field specified in key file open 
  3690.           A field name specified in an index build is not part of the database 
  3691. Can't make memo field part of a key 
  3692.           A field name specified in an index build is a memo field.  Memo 
  3693.           fields can not be part of an index. 
  3694. Can't make logical field part of a key 
  3695.           A field name specified in an index build is a logical field.  Logical 
  3696.           fields can not be part of an index. 
  3697. Unknown field specified in key file define 
  3698.           A field name specified in an index build is not in the database. 
  3699. Key length too short 
  3700.           Internal error, the calculated length for a key is less than one (1). 
  3701. Would add duplicate 
  3702.           Writing a new record to database creates a duplicate key.  Unique key 
  3703.           value is FALSE. 
  3704. Dos write anchor error #### for file @@@@@@@@@@ 
  3705.           Operating system error, value found in ###, while trying to write 
  3706.           file @@@@@@@@@@@ 
  3707. Not enough memory for index sorting. 
  3708.           Not enough internal memory space to create temporary sort file for 
  3709.           indexing function. 
  3710. Can't rename file for modify 
  3711.           Modify Structure function attempts to rename the old file.  Failure 
  3712.           probably caused by duplicate name. 
  3713. Can't rebuild, old file not open 
  3714.           Internal error.  Somehow the file has been closed. 
  3715. Can't rebuild, new file not created 
  3716.           Modify Structure function attempted to create the new file.  Old file 
  3717.           has been renamed but ...failure probably caused by duplicate name or 
  3718.           lack of disk space. 
  3719. Unable to allocate temp file memory ## 
  3720.           Not enough internal memory space to create file space.  Operating 
  3721.           system error value is ## 
  3722. Dos open error ### for text file @@@@@@@@@@@ 
  3723.           Operating system error, value found in ###, while trying to open DBT 
  3724.           file @@@@@@@@@@@ 
  3725. Field Not Defined 
  3726.           Create function error - can not find variable. 
  3727. Bad Field Count 
  3728.           Field count for Create is either less than 1 or greater than 128 
  3729. Field Name Not Okay 
  3730.           Field name does not satisfy naming convention. 
  3731. Field Type Not Defined 
  3732.           Create function needs to know the field type(characteristics) 
  3733. Field Type Not Valid 
  3734.           Field type specified is not C, D, L, N or M. 
  3735. Field Type Not Valid 
  3736.           Create function needs to know the field length 
  3737. Field Length Not Defined Correctly 
  3738.           The field length requested does not satisfy the length limitations 
  3739.           for its type. 
  3740. Record Size Too Large 
  3741.           Calculated record length is greater than 4000.  4000 is maximum 
  3742.           allowed. 
  3743.  
  3744.  
  3745. ΓòÉΓòÉΓòÉ 8.2. File Control Variables ΓòÉΓòÉΓòÉ
  3746.  
  3747. RexxBase offers several control variables to enhance control over your database 
  3748. files. 
  3749.  
  3750.  
  3751. ΓòÉΓòÉΓòÉ 8.2.1. REXXBASE.UPDATEHEADERCOUNTER. ΓòÉΓòÉΓòÉ
  3752.  
  3753. You can control how often the database header record gets updated.  You change 
  3754. the RexxBase.UpdateHeaderCounter.  This sets an internal counter indicating how 
  3755. often after every RexxBase_WriteDBF command the header record is updated.  The 
  3756. higher the number the less often the header record is updated.  But if the 
  3757. header record is not updated  and there is a system crash then the header 
  3758. record will not contain accurate information. 
  3759.  
  3760. The default value is one. 
  3761.  
  3762. A value of zero indicates that the header record is only updated when the 
  3763. database is closed. 
  3764.  
  3765. The value is only set when a database is opened.  Therefore changing the value 
  3766. after a database has been opened has no affect on that database. 
  3767.  
  3768.  
  3769. ΓòÉΓòÉΓòÉ 8.2.2. Safety - Preventing File Deletion ΓòÉΓòÉΓòÉ
  3770.  
  3771. REXXBASE.SAFETY allows for a level of protection from destroying, deleting or 
  3772. overwriting database and index files. 
  3773.  
  3774. When your routine sets REXXBASE.SAFETY to "ON", anytime RexxBase opens a file, 
  3775. in a creation function (i.e.  sort output file, create index, etc.)  the 
  3776. function will fail.  Check both the return code from the function and/or the 
  3777. rexxbase.error  stem variable. 
  3778.  
  3779. When REXXBASE.SAFETY is set to "OFF" then any routine can destroy a file. 
  3780. There may be information in the  rexxbase.error  stem variable but the return 
  3781. code, even if successful, will be "". 
  3782.  
  3783. The default value is "OFF".  If set incorrectly the default value will be used. 
  3784.  
  3785.  
  3786. ΓòÉΓòÉΓòÉ 8.2.3. REXXBASE.READ ΓòÉΓòÉΓòÉ
  3787.  
  3788. When REXXBASE.READ is set to "OFF" then the Rexxbase_OpenDBF will open the file 
  3789. for NO read access.  This means any routine that reads a file, that was opened 
  3790. when set REXXBASE.READ was set to "OFF", will fail. 
  3791.  
  3792. The default value is "ON".  If set incorrectly the default value will be used. 
  3793.  
  3794.  
  3795. ΓòÉΓòÉΓòÉ 8.2.4. REXXBASE.WRITE ΓòÉΓòÉΓòÉ
  3796.  
  3797. When REXXBASE.WRITE is set to "OFF" then the Rexxbase_OpenDBF will open the 
  3798. file for NO write access.  This means any routine that writes to a file, that 
  3799. was opened when set REXXBASE.READ was set to "OFF", will fail. 
  3800.  
  3801. The default value is "ON".  If set incorrectly the default value will be used. 
  3802.  
  3803.  
  3804. ΓòÉΓòÉΓòÉ 8.2.5. REXXBASE.UNIQUE ΓòÉΓòÉΓòÉ
  3805.  
  3806. When REXXBASE.UNIQUE is set to "ON" then the Rexxbase_CreateIndex creates an 
  3807. index file with unique keys.  This prevents duplicate keys from being added to 
  3808. the index file. 
  3809.  
  3810. When REXXBASE.UNIQUE is set to "OFF" then the Rexxbase_CreateIndex creates an 
  3811. index file without unique keys.  This allows duplicate keys from being added to 
  3812. the index file with Rexxbase_ReadDBF and Rexxbase_UpdateDBF functions. 
  3813.  
  3814. The default value is "OFF".  If set incorrectly the default value will be used. 
  3815. This control is less restrictive than Rexxbase.ALLOWDUPLICATEINDEXES. 
  3816.  
  3817.  
  3818. ΓòÉΓòÉΓòÉ 8.2.6. REXXBASE.ALLOWDUPLICATEINDEXES ΓòÉΓòÉΓòÉ
  3819.  
  3820. When REXXBASE.ALLOWDUPLICATEINDEXES is set to "NO" the RexxBase_WriteDBF and 
  3821. RexxBase_UpdateDBF functions will not add record when another record with a 
  3822. similar index is present. This control is more restrictive than 
  3823. Rexxbase.UNIQUE. 
  3824.  
  3825. When REXXBASE.ALLOWDUPLICATEINDEXES is set to "YES" then the Rexxbase_WriteDBF 
  3826. and Rexxbase_UpdateDBF can add records to the DBF even if a duplicate key 
  3827. exists. 
  3828.  
  3829. The default value is "YES".  If set incorrectly the default value will be used. 
  3830.  
  3831.  
  3832. ΓòÉΓòÉΓòÉ 8.2.7. REXXBASE.SHARE ΓòÉΓòÉΓòÉ
  3833.  
  3834. Rexxbase offers a facility for file sharing your databases. 
  3835.  
  3836. When REXXBASE.SHARE is set to "OFF" then the Rexxbase_OpenDBF will open the 
  3837. file NO OTHER external program file access.  This will prevent any other 
  3838. program in the system from accessing the file.  Also, if the file is already 
  3839. opened, by another program, your routine will fail.  This is file locking. 
  3840.  
  3841. When REXXBASE.SHARE is set to "READ" then the Rexxbase_OpenDBF will open the 
  3842. file for read only sharing.  This will allow any other program in the system to 
  3843. read your open database file. 
  3844.  
  3845. Also, if the file is already opened by another program for no read sharing, 
  3846. your routine will fail. 
  3847.  
  3848. When REXXBASE.SHARE is set to "WRITE" then the Rexxbase_OpenDBF will open the 
  3849. file for write only sharing.  This will allow any other program in the system 
  3850. to have write access the file, not read access. 
  3851.  
  3852. Also, if the file is already opened by another program for no write sharing, 
  3853. your routine will fail. 
  3854.  
  3855. When REXXBASE.SHARE is set to "READWRITE" then the Rexxbase_OpenDBF will open 
  3856. the file for read and write sharing.  This will allow any other program in the 
  3857. system to have access the file. 
  3858.  
  3859. Also, if the file is already opened by another program for no sharing, your 
  3860. routine will fail. 
  3861.  
  3862. The default value is "OFF".  If set incorrectly the default value will be used. 
  3863.  
  3864. You may set REXXBASE.SHARE at anytime and as often as you like.  But it is only 
  3865. used when the database is opened with a Rexxbase_OpenDBF. 
  3866.  
  3867.  
  3868. ΓòÉΓòÉΓòÉ 8.3. Controlling Date Format. ΓòÉΓòÉΓòÉ
  3869.  
  3870. RexxBase offers a way to control the format of dates.  By turning the format 
  3871. control on and off dates are presented in either internal xBase format or in a 
  3872. display format. 
  3873.  
  3874.  
  3875. ΓòÉΓòÉΓòÉ 8.3.1. REXXBASE.INCLUDECENTURY ΓòÉΓòÉΓòÉ
  3876.  
  3877. When RexxBase.IncludeCenture is turned "ON" then all date fields are required 
  3878. to specify dates with the century. Format is CCYYMMDD.  This parameters 
  3879. enforces a requirement that when a date is passed to REXXBASE the century value 
  3880. is included. If century is not included RexxBase will replace the date string 
  3881. with spaces. 
  3882.  
  3883. If RexxBase.IncludeCentury is set to 'OFF' (the default value) a value of 
  3884. current century is preappended to the year.  The default value may create 
  3885. incorrect internal date values.  Your system is better of if your programs 
  3886. supply the century.  Thereby requiring you to consistently use the correct 
  3887. value. 
  3888.  
  3889.  
  3890. ΓòÉΓòÉΓòÉ 8.3.2. REXXBASE.FORMATDATE. ΓòÉΓòÉΓòÉ
  3891.  
  3892. When RexxBase.FormatDate is turned "OFF" then all date fields are in the 
  3893. following 8 numeric-character format:  CCYYMMDD. 
  3894.  
  3895. CC - century. 
  3896.  
  3897. YY - year. 
  3898.  
  3899. MM - month. 
  3900.  
  3901. DD - day. 
  3902.  
  3903. If RexxBase.FormatDate is "ON", the default value, then date fields are 
  3904. formatted based on the Country Code.  as follows:  (all are 8 bytes long with 
  3905. separators). 
  3906.  
  3907. MM/DD/YY, slashes or some other separator is required 
  3908.  
  3909. DD/MM/YY, slashes or some other separator is required 
  3910.  
  3911. YY/MM/DD, slashes or some other separator is required 
  3912.  
  3913. The default value is "ON".  If set incorrectly the default value will be used. 
  3914.  
  3915.  
  3916. ΓòÉΓòÉΓòÉ 8.4. Controlling File Format. ΓòÉΓòÉΓòÉ
  3917.  
  3918. RexxBase offers a way to control which file format version of dBase to use.  By 
  3919. specifying the format you are able to use either dBase III or dBase IV formats. 
  3920.  
  3921. dBase internal file structure allows for files to be identified with one 
  3922. exception. If a database does not use a memo field and a dBase IV file does not 
  3923. use a float field then there is not way to distinguish between the two 
  3924. versions. Therefore, you should always specify the file format. 
  3925.  
  3926.  
  3927. ΓòÉΓòÉΓòÉ 8.4.1. REXXBASE.dBaseFileFormat. ΓòÉΓòÉΓòÉ
  3928.  
  3929. When RexxBase.dBaseFileFormat is set to "dBase3", the default value, then all 
  3930. database functions are processed in dBase III format. 
  3931.  
  3932. When set to "dBase4", the files are processed using dBase IV format. 
  3933.  
  3934. If set incorrectly the default value will be used. 
  3935.  
  3936.  
  3937. ΓòÉΓòÉΓòÉ 8.4.2. REXXBASE.REXXLOGICAL ΓòÉΓòÉΓòÉ
  3938.  
  3939. When RexxBase.REXXLOGICAL is set to 'ON', logical fields internally set to 'Y' 
  3940. will be set externally to '1' and fields set to 'N" will be set as '0', 
  3941.  
  3942. When set to 'OFF', the internal value of a logical field is set. 
  3943.  
  3944. If set incorrectly the default value "OFF" will be used. 
  3945.  
  3946.  
  3947. ΓòÉΓòÉΓòÉ 8.4.3. REXXBASE.SKIPDELETED ΓòÉΓòÉΓòÉ
  3948.  
  3949. When RexxBase.SKIPDELETED  is set to 'ON' then all RexxBase functions used to 
  3950. retrieve records will not return a deleted record. This will cause either the 
  3951. next non-deleted record to be returned or a NOT FOUND condition to occur. 
  3952.  
  3953. When set to 'OFF', the default value, deleted records are returned. 
  3954.  
  3955. If set incorrectly the default value will be used. 
  3956.  
  3957.  
  3958. ΓòÉΓòÉΓòÉ 8.5. Binary Data Control. ΓòÉΓòÉΓòÉ
  3959.  
  3960. RexxBase offers a way to store binary data in CHAR and MEMO fields.  While 
  3961. storing binary data is not in itself tricky, previous versions of RexxBase used 
  3962. null terminated strings to determine data size and length. 
  3963.  
  3964. dBase III DBT files store memo fields with two (2) end of file indicators 
  3965. hex(1a). Therefore if your binary data contains this character then the field 
  3966. will be terminated prematurely.  To avoid this situation, use the dBase IV 
  3967. format. 
  3968.  
  3969.  
  3970. ΓòÉΓòÉΓòÉ 8.5.1. REXXBASE.UseStringLengths. ΓòÉΓòÉΓòÉ
  3971.  
  3972. When RexxBase.UseStringLengths is set to "YES", the default value, then all 
  3973. CHAR and MEMO fields will be stored and retrieved with lengths based on a null 
  3974. terminating character in the data field. 
  3975.  
  3976. When set to "NO", the fields are stored and returned to you using the specific 
  3977. length as either measured by REXX or stored in the DBT file. 
  3978.  
  3979. If set incorrectly the default value will be used. 
  3980.  
  3981.  
  3982. ΓòÉΓòÉΓòÉ 9. Next Releases. ΓòÉΓòÉΓòÉ
  3983.  
  3984. The following is a list of the next planned releases. 
  3985.  
  3986.  
  3987. ΓòÉΓòÉΓòÉ 9.1. Multi-User Access. ΓòÉΓòÉΓòÉ
  3988.  
  3989. While file locking is fine for some applications a true multi-user control is 
  3990. need for a LAN system. 
  3991.  
  3992.  
  3993. ΓòÉΓòÉΓòÉ 10. Suggestions and Bugs. ΓòÉΓòÉΓòÉ
  3994.  
  3995. Please call or write to us at our address with suggestions or to report bugs. 
  3996.  
  3997. You can reach us through E-Mail by contacting Joe McVerry at 
  3998. support@americancoders.com 
  3999.  
  4000.  
  4001. ΓòÉΓòÉΓòÉ 11. Shareware Software ΓòÉΓòÉΓòÉ
  4002.  
  4003. DEFINITION OF SHAREWARE SOFTWARE 
  4004.  
  4005. Shareware Software distribution gives users a chance to try software before 
  4006. buying it.  If you try a Shareware software program and continue using it, you 
  4007. are expected to register.  Individual programs differ on details -- some 
  4008. request registration while others require it, some specify a maximum trial 
  4009. period.  With registration, you get anything from the simple right to continue 
  4010. using the software to an updated program with printed manual. 
  4011.  
  4012.  
  4013. ΓòÉΓòÉΓòÉ 11.1. Copyright ΓòÉΓòÉΓòÉ
  4014.  
  4015. Copyright laws apply to both Shareware and commercial software, and the 
  4016. copyright holder retains all rights, with a few specific exceptions as stated 
  4017. below.  Shareware software authors are accomplished programmers, just like 
  4018. commercial authors, and the programs are of comparable quality.  (In both 
  4019. cases, there are good programs and bad ones!)  The main difference is in the 
  4020. method of distribution.  The author specifically grants the right to copy and 
  4021. distribute the software, either to all and sundry or to a specific group.  For 
  4022. example, some authors require written permission before a commercial disk 
  4023. vendor may copy their Shareware software. 
  4024.  
  4025.  
  4026. ΓòÉΓòÉΓòÉ 11.2. Distribution. ΓòÉΓòÉΓòÉ
  4027.  
  4028. Shareware software is a distribution method, not a type of software.  You 
  4029. should find software that suits your needs and pocketbook, whether it's 
  4030. commercial or Shareware software.  The Shareware software system makes fitting 
  4031. your needs easier, because you can try before you buy.  And because the 
  4032. overhead is low, prices are low also.  Shareware software has the ultimate 
  4033. money-back guarantee -- if you don't use the product, you don't pay for it. 
  4034.  
  4035.  
  4036. ΓòÉΓòÉΓòÉ 12. Disclaimer ΓòÉΓòÉΓòÉ
  4037.  
  4038. DISCLAIMER - AGREEMENT 
  4039.  
  4040. Users of RexxBase must accept this disclaimer of warranty:  "REXXBASE IS 
  4041. SUPPLIED AS IS.  AMERICAN CODERS DISCLAIMS ALL WARRANTIES, EXPRESSED OR 
  4042. IMPLIED, INCLUDING, WITHOUT LIMITATION, THE WARRANTIES OF MERCHANTABILITY AND 
  4043. OF FITNESS FOR ANY PURPOSE.  AMERICAN CODERS LTD.  ASSUMES NO LIABILITY FOR 
  4044. DAMAGES, DIRECT OR CONSEQUENTIAL, WHICH MAY RESULT FROM THE USE OF REXXBASE." 
  4045.  
  4046.  
  4047. ΓòÉΓòÉΓòÉ 13. Sharing RexxBase ΓòÉΓòÉΓòÉ
  4048.  
  4049. RexxBase is a "Shareware software program" and is provided at no charge to the 
  4050. user for evaluation.  Feel free to share it with your friends, but please do 
  4051. not give it away altered or as part of another system.  The essence of 
  4052. "user-supported" software is to provide personal computer users with quality 
  4053. software without high prices, and yet to provide incentive for programmers to 
  4054. continue to develop new products.  If you find this program useful and find 
  4055. that you are using RexxBase and continue to use RexxBase after a reasonable 
  4056. trial period of 30 days, you must make a registration payment of $95.00 to 
  4057. American Coders, Ltd.  The $95.00 registration fee will license one copy for 
  4058. use on any one computer at any one time.  You must treat this software just 
  4059. like a book.  An example is that this software may be used by any number of 
  4060. people and may be freely moved from one computer location to another, so long 
  4061. as there is no possibility of it being used at one location while it's being 
  4062. used at another.  Just as a book cannot be read by two different persons at the 
  4063. same time. 
  4064.  
  4065.  
  4066. ΓòÉΓòÉΓòÉ 13.1. Commercial Users ΓòÉΓòÉΓòÉ
  4067.  
  4068. Commercial users of RexxBase must register and pay for their copies of RexxBase 
  4069. within 30 days of first use or their license is withdrawn.  Site-License 
  4070. arrangements may be made by contacting American Coders, Ltd. 
  4071.  
  4072.  
  4073. ΓòÉΓòÉΓòÉ 13.2. Distributing ΓòÉΓòÉΓòÉ
  4074.  
  4075. Anyone distributing RexxBase for any kind of remuneration must first contact 
  4076. American Coders, Ltd. at our address below for authorization.  This 
  4077. authorization will be automatically granted to distributors recognized by the 
  4078. (ASP) as adhering to its guidelines for shareware distributors, and such 
  4079. distributors may begin offering RexxBase immediately (However American Coders, 
  4080. Ltd.  must still be advised so that the distributor can be kept up-to-date with 
  4081. the latest version of RexxBase.). 
  4082.  
  4083.  
  4084. ΓòÉΓòÉΓòÉ 13.3. Pass Along ΓòÉΓòÉΓòÉ
  4085.  
  4086. You are encouraged to pass a copy of RexxBase along to your friends for 
  4087. evaluation.  Please encourage them to register their copy if they find that 
  4088. they can use it.  All registered users will receive a copy of the latest 
  4089. version of the RexxBase system.