home *** CD-ROM | disk | FTP | other *** search
/ DP Tool Club 12 / CD_ASCQ_12_0294.iso / vrac / rxbas120.zip / REXXBASE.INF (.txt) < prev    next >
OS/2 Help File  |  1994-02-01  |  66KB  |  2,735 lines

  1.  
  2. ΓòÉΓòÉΓòÉ 1. RexxBase Database Access Routines DLL ΓòÉΓòÉΓòÉ
  3.  
  4. RexxBase and "dBase Access for Rexx" are trademarks of American Coders, LTD. 
  5.  
  6. OS/2 is a registered trademark of the International Business Machines 
  7. Corporation. 
  8.  
  9. Other trademarks are the trademarks of their respective trademark owners. 
  10.  
  11. Contacts: 
  12.  
  13. American Coders, LTD. 
  14.  
  15. Post Office Box 97462 
  16.  
  17. Raleigh, NC 27624 
  18.  
  19. (919) 846-2014 
  20.  
  21. CompuServe ID:  74150,2370 
  22.  
  23.  
  24. January 1994 Edition.  Version 1.2 
  25.  
  26. Copyright 1993-94 American Coders LTD Raleigh NC USA 
  27.  
  28.  
  29. ΓòÉΓòÉΓòÉ 1.1. Rights and Limitations ΓòÉΓòÉΓòÉ
  30.  
  31. American Coders, LTD makes no warranties as to the information in this guide. 
  32. Additionally, American Coders Ltd is not responsible or liable for any loss or 
  33. damage of any kind resulting from use of this product. 
  34.  
  35. The Software is protected by the copyright laws of the United States of 
  36. America, as well as by the copyright laws of many other countries pursuant to 
  37. international treaties.  All rights reserved.  No part of the RexxBase computer 
  38. program, documentation or related files may be reproduced photocopied, stored 
  39. on a retrieval system, or transmitted except as provided by U. S. copyright 
  40. law. 
  41.  
  42.  
  43. ΓòÉΓòÉΓòÉ 1.2. System Overview. ΓòÉΓòÉΓòÉ
  44.  
  45. RexxBase is a REXX external function DLL to be used by your command files to 
  46. access dBase files. RexxBase offers database access functions to Rexx command 
  47. procedures.  By using the RexxBase functions, Rexx programs gain access to tens 
  48. of thousands of database files written, primarily, for the PC/MS Dos 
  49. environment. 
  50.  
  51. RexxBase generates dBase field names and values that are available directly to 
  52. a Rexx program.  The Rexx program can change this data and update dBase files 
  53. directly.  Also database file control information is available to the Rexx 
  54. program.  This information includes such data as last date the database was 
  55. updated, number of records on file, field names, etc. 
  56.  
  57. RexxBase is distributed using the Shareware system. Every shareware copy of the 
  58. program comes with a 30 day trial offer.  If after 30 days the user finds the 
  59. RexxBase product acceptible they are expected to register and pay $95.00 plus 
  60. shipping/handling/taxes.  Registered users of the product receive free upgrades 
  61. to the current release, 90 days free support on CompuServe and 30 days free 
  62. telephone support.  The product is being marketed through the shareware 
  63. distribution method to determine market demands of the product and future needs 
  64. and enhancements.  If the product proves to be marketable, meaning more than 
  65. 100 units are registered within any 30 day period, then the product will be 
  66. sold and distributed through retail channels. 
  67.  
  68. This is the first public release of the RexxBase product. More releases are 
  69. planned, each with more functionality. 
  70.  
  71.  
  72. ΓòÉΓòÉΓòÉ 1.3. How To Register Your Copy ΓòÉΓòÉΓòÉ
  73.  
  74. We have several methods for you to register your copy of RexxBase. 
  75.  
  76. o Registration Form. 
  77.  
  78. o Faxing or 800 Number and Credit Cards. 
  79.  
  80. o CompuServe SWREG. 
  81.  
  82. There is also a shipping and handling charge.  For U.S. registrations it is 
  83. $10.00, Canadian $15.00 and all other international orders $25.00. 
  84.  
  85. If you are planning to order ten (10) or more copies use the SITELICE.DOC in 
  86. your package. 
  87.  
  88.  
  89. ΓòÉΓòÉΓòÉ 1.3.1. Registration Form. ΓòÉΓòÉΓòÉ
  90.  
  91. Print out the file REGISTER.FRM.  Attach a check and mail to us using the 
  92. address on the form (or see above). 
  93.  
  94.  
  95. ΓòÉΓòÉΓòÉ 1.3.2. 800 Number and Credit Cards. ΓòÉΓòÉΓòÉ
  96.  
  97. American Coders is using the services of PsL "Public (software) Library". They 
  98. provide a service for all shareware authors, for a small fee they will take 
  99. credit card orders through their 800 number and Fax.  Once PsL has notified us 
  100. of your order, we will ship it within two days. 
  101.  
  102. PsL does NOT handle question or inquiries. 
  103.  
  104. RexxBase Psl item/product number is 11174. 
  105.  
  106. CREDIT CARD ORDERS ONLY - 
  107.  
  108. You can order with MC, Visa, Amex, or Discover from Public (software) Library 
  109. by calling 800-2424-PsL or 713-524-6394 or by FAX to 713-524-6398 or by CIS 
  110. Email to 71355,470. You can also mail credit card orders to PsL at P.O.Box 
  111. 35705, Houston, TX 77235-5705. 
  112.  
  113. THE ABOVE NUMBERS ARE FOR ORDERS ONLY. 
  114.  
  115. Any questions about the status of the shipment of the order, refunds, 
  116. registration options, product details, technical support, volume discounts, 
  117. dealer pricing, site licenses, etc, must be directed to 919-846-2014 or write 
  118. American Coders at our address. 
  119.  
  120. To insure that you get the latest version, PsL will notify you the day of your 
  121. order and we will ship the product directly to you. 
  122.  
  123.  
  124. ΓòÉΓòÉΓòÉ 1.3.3. CompuServe SWREG. ΓòÉΓòÉΓòÉ
  125.  
  126. CompuServe offers a service to register software. 
  127.  
  128. GO SWREG and follow the directions. 
  129.  
  130. RexxBase SWREG number is 1953. 
  131.  
  132. Charges are billed to your CompuServe account. 
  133.  
  134. Any questions about the status of the shipment of the order, refunds, 
  135. registration options, product details, technical support, volume discounts, 
  136. dealer pricing, site licenses, etc, must be directed to 919-846-2014 or write 
  137. American Coders at our address. 
  138.  
  139.  
  140. ΓòÉΓòÉΓòÉ 1.4. Version and Requirements. ΓòÉΓòÉΓòÉ
  141.  
  142. Version 1.20. 
  143.  
  144. RexxBase runs under 
  145.  
  146. o OS/2 2.0 or higher 
  147.  
  148. o requires a minimum of 6 megabytes of RAM. 
  149.  
  150. o requires 500k of disk space. 
  151.  
  152.  
  153. ΓòÉΓòÉΓòÉ 1.5. Version History. ΓòÉΓòÉΓòÉ
  154.  
  155. The following is a basic history of changes for each version and release. 
  156.  
  157.  
  158. ΓòÉΓòÉΓòÉ 1.5.1. Version 1.2  Jan. 31. 1994 ΓòÉΓòÉΓòÉ
  159.  
  160. Added the EXACT option to the Rexxbase_FindRecord function. 
  161.  
  162. For shareware distributed version, can open up to DBF's five(5) at a time and 
  163. up to 2(two) indexes. 
  164.  
  165. Added date routines to registered version: 
  166.  
  167. o Rexxbase_FormatDate 
  168.  
  169. o Rexxbase_InternalDate 
  170.  
  171. o Rexxbase_DaysDifference 
  172.  
  173. o Rexxbase_DateCalc. 
  174.  
  175. Added import/export file functions to registered version. 
  176.  
  177. o Rexxbase_ExportDBF 
  178.  
  179. o Rexxbase_ImportDBF 
  180.  
  181.  
  182. ΓòÉΓòÉΓòÉ 1.5.2. Version 1.18 Final Beta Jan 20, 1994 ΓòÉΓòÉΓòÉ
  183.  
  184. Bug fixes. 
  185.  
  186.  
  187. ΓòÉΓòÉΓòÉ 1.5.3. Version 1.17 Beta Jan 10, 1994 ΓòÉΓòÉΓòÉ
  188.  
  189. Added record locking with the following functions: 
  190.  
  191. o Rexxbase_ReadAndLockDBF 
  192.  
  193. o Rexxbase_ReadAndLockPrevDBF 
  194.  
  195. o Rexxbase_UnlockDBF 
  196.  
  197. o Rexxbase_SetLockTimeout 
  198.  
  199. Corrected bug that did not allow mulitple database processing. 
  200.  
  201. Corrected numeric key field length - was too small. 
  202.  
  203. Added logic to prevent creating keys greater than 100 bytes. 
  204.  
  205. Updated documentation. 
  206.  
  207.  
  208. ΓòÉΓòÉΓòÉ 1.5.4. Version 1.16 Beta Jan 3, 1994 ΓòÉΓòÉΓòÉ
  209.  
  210. Correct field alignment in dbf file.  You will have to recreate your files due 
  211. to this error. 
  212.  
  213. Logical fields not stored correctly. 
  214.  
  215. Removed zero padding from numeric fields. 
  216.  
  217. Numeric fields not stored correctly (i.e.  NUM 4.2 could store 10.5 when 0.50 
  218. is the correct value). 
  219.  
  220.  
  221. ΓòÉΓòÉΓòÉ 1.5.5. Version 1.15 Beta Dec 22, 1993 ΓòÉΓòÉΓòÉ
  222.  
  223. Last update field not set correctly, mainly effected create functions. 
  224.  
  225. Invalid date field should be set to spaces not zeroes. 
  226.  
  227. Corrected errors in updating numeric fields 
  228.  
  229. Corrected record alignment 
  230.  
  231. Corrected documentation. 
  232.  
  233.  
  234. ΓòÉΓòÉΓòÉ 1.5.6. Version 1.14 Beta Dec 15, 1993. ΓòÉΓòÉΓòÉ
  235.  
  236. Numeric fields not stored in correctly. 
  237.  
  238. Corrected documentation. 
  239.  
  240.  
  241. ΓòÉΓòÉΓòÉ 1.5.7. Version 1.13 Beta Dec 7, 1993. ΓòÉΓòÉΓòÉ
  242.  
  243. Not released.  Bug fixes to indexes. 
  244.  
  245.  
  246. ΓòÉΓòÉΓòÉ 1.5.8. Version 1.12 Beta Dec 1, 1993. ΓòÉΓòÉΓòÉ
  247.  
  248. Corrected CreateDBF and CreateFromDBF functions, database names were not being 
  249. added to (internal) active database list. 
  250.  
  251. Index files - date field WAS being created floating point like dBase iii.  Now 
  252. it's character. 
  253.  
  254. Index files - failed to allow mismatch field types. 
  255.  
  256. Corrected documentation. 
  257.  
  258.  
  259. ΓòÉΓòÉΓòÉ 1.5.9. Version 1.11 Beta Nov.  22, 1993. ΓòÉΓòÉΓòÉ
  260.  
  261. Added national language support date function. 
  262.  
  263. Corrected CreateDBF and CreateFromDBF functions. 
  264.  
  265. Corrected documentation. 
  266.  
  267.  
  268. ΓòÉΓòÉΓòÉ 1.5.10. Version 1.10 Beta Nov.  15, 1993 ΓòÉΓòÉΓòÉ
  269.  
  270. Multi file access 
  271.  
  272. Index access and other functions 
  273.  
  274. Create functions 
  275.  
  276. Modify structures 
  277.  
  278. Improved Initialization Routine 
  279.  
  280. Improved error reporting 
  281.  
  282. Improved documentation 
  283.  
  284.  
  285. ΓòÉΓòÉΓòÉ 1.5.11. Version 1.02 Alpha Oct.  15, 1993 ΓòÉΓòÉΓòÉ
  286.  
  287. Bug fix. 
  288.  
  289.  
  290. ΓòÉΓòÉΓòÉ 1.5.12. Version 1.01 Alpha Sep 1, 1993 ΓòÉΓòÉΓòÉ
  291.  
  292. Initial release. 
  293.  
  294.  
  295. ΓòÉΓòÉΓòÉ 1.6. American Coders Ltd. ΓòÉΓòÉΓòÉ
  296.  
  297. American Coders, LTD. 
  298.  
  299. Post Office Box 97462 
  300.  
  301. Raleigh, NC 27624 
  302.  
  303. (919) 846-2014 
  304.  
  305. CompuServe ID:  74150,2370 
  306.  
  307. Programming Solutions For Your Business 
  308.  
  309.  
  310. ΓòÉΓòÉΓòÉ 1.7. How To Install ΓòÉΓòÉΓòÉ
  311.  
  312. The program does not have an automatic installation routine. 
  313.  
  314. You will have to unzip the files into any existing directory.  Make sure to 
  315. have the DLL located in a directory that is specified in your systems LIBPATH. 
  316.  
  317.  
  318. ΓòÉΓòÉΓòÉ 2. RexxBase File Structures. ΓòÉΓòÉΓòÉ
  319.  
  320. Every attempt has been made to keep the RexxBase DBF, DBT and NDX files 
  321. similar.  But due to the inherent differences between DOS, OS2, REXX and PRG 
  322. files we could not keep the contents of a NDX file similar. 
  323.  
  324.  
  325. ΓòÉΓòÉΓòÉ 2.1. File Naming. ΓòÉΓòÉΓòÉ
  326.  
  327. RexxBase does not use default file extensions.  This due to the inherent nature 
  328. of HPFS files with its flexible file names.  When opening and creating files be 
  329. sure to use a fully qualified name. 
  330.  
  331.  
  332. ΓòÉΓòÉΓòÉ 2.2. Database (DBF) File. ΓòÉΓòÉΓòÉ
  333.  
  334. There should be no difference between RexxBase DBF files and other xBase DBF. 
  335. If you feel that you found an inconsistency with RexxBase DBF files, please 
  336. notify us immediately. 
  337.  
  338.  
  339. ΓòÉΓòÉΓòÉ 2.3. Memo (DBT) File. ΓòÉΓòÉΓòÉ
  340.  
  341. DBT files used to store MEMO field data, look like large strings to Rexx.  REXX 
  342. prefers strings to be smaller than 256 bytes.  It can handle larger strings, 
  343. it's just that the default is 256.  To keep as close to the default length as 
  344. possible we store memo fields in stem variables.  Each element variable of the 
  345. stem stores around 256 bytes.  The zeroth stem contains a count of the total 
  346. number of elements in the stem.  Please refer to the Memo section for more 
  347. information. 
  348.  
  349.  
  350. ΓòÉΓòÉΓòÉ 2.4. Index (NDX) File Field Differences. ΓòÉΓòÉΓòÉ
  351.  
  352. The ability to use index files is an integral part of any good database system. 
  353. We have introduced, what we feel, is an improved, yet limited, form of file 
  354. structures to RexxBase. 
  355.  
  356. ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ
  357. ΓöéDifferenceΓöéDescription                                  Γöé
  358. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  359. ΓöéSimple    ΓöéRexxBase does not use xBase functions within Γöé
  360. ΓöéData TypesΓöéindex functions.  Nor does it use inverse    Γöé
  361. Γöé          Γöédefinitions, i.e.  using a minus sign to moveΓöé
  362. Γöé          Γöéin a reverse key scan.                       Γöé
  363. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  364. ΓöéMixing    ΓöéRexxBase allows the mixing of Character,     Γöé
  365. ΓöéData TypesΓöéNumeric and Date data types.  All data in    Γöé
  366. Γöé          Γöéthis format are treated as Character by      Γöé
  367. Γöé          ΓöéRexxBase.                                    Γöé
  368. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  369. ΓöéDate Data ΓöéDate data types are treated as Character dataΓöé
  370. ΓöéTypes     Γöéand stored in the index in the native format.Γöé
  371. Γöé          ΓöéDate data types can be concatenated together Γöé
  372. Γöé          Γöéwith other data types. Some xBase products   Γöé
  373. Γöé          Γöéstore date in the index in a floating point  Γöé
  374. Γöé          Γöéformat.  By removing the floating point      Γöé
  375. Γöé          Γöéformat you should see a improvement in index Γöé
  376. Γöé          Γöéfile accessing for data types.               Γöé
  377. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  378. ΓöéNumeric   ΓöéNumeric data types are stored in a floating  Γöé
  379. ΓöéData TypesΓöépoint format.  When a key is defined as      Γöé
  380. Γöé          Γöénumeric all of the fields are summed         Γöé
  381. Γöé          Γöétogether.                                    Γöé
  382. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  383. ΓöéAccessing ΓöéThe only time you may access NDX files from  Γöé
  384. ΓöéxBase NDX Γöéother xBase programs is if the dBase index   Γöé
  385. Γöéfiles.    Γöéfile is strictly Character or Numeric fields Γöé
  386. Γöé          ΓöéONLY. Indexes using xBase functions are not  Γöé
  387. Γöé          Γöésupported by RexxBase.                       Γöé
  388. ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ
  389.  
  390. See also Rexxbase.Unique. 
  391.  
  392.  
  393. ΓòÉΓòÉΓòÉ 3. How Initialize REXX For RexxBase Functions. ΓòÉΓòÉΓòÉ
  394.  
  395. Before calling any RexxBase functions your REXX command file must register the 
  396. RexxBase DLL.  To do this use the REXX command RXFUNCADD.  You need to register 
  397. only one RexxBase function - Rexxbase_Init.  Rexxbase_Init, when called, will 
  398. register all of the other RexxBase routines.  Since Rexxbase_Init cannot 
  399. register itself, your Rexx program must register it. 
  400.  
  401. Use RXFUNCADD to register the Rexxbase_Init function. 
  402.  
  403. Once registered, RexxBase will not have to be registered until the next time 
  404. you restart OS/2. 
  405.  
  406. If you want your REXX program can register the RexxBase functions. 
  407.  
  408. The format of the command is  RXFUNCADD(function, dll, procedure) 
  409.  
  410. function is the name of the RexxBase routine as your procedure will call it. 
  411.  
  412. dll is the name of the RexxBase DLL file.  (Unless you rename it, it will 
  413. always be REXXBASE). 
  414.  
  415. procedure is the name of the function internal to the RexxBase DLL. 
  416.  
  417. Your program should contain the following: 
  418.  
  419. /* REXX */
  420. ret = rxfuncadd(rexxbase_init,Rexxbase,"Rexxbase_Init")
  421. ret = rexxbase_init()
  422.  
  423.  
  424. ΓòÉΓòÉΓòÉ 3.1. Example of Dropping a RexxBase Function. ΓòÉΓòÉΓòÉ
  425.  
  426. When your procedure is done with the RexxBase functions it can drop the 
  427. RexxBase functions.  This may help reduce memory requirements and free up 
  428. system resources.  Once dropped, a function will have to be re-registered if it 
  429. is to be used again. 
  430.  
  431. rxfuncdrop(rexxbase_opendbf,Rexxbase,"Rexxbase_OpenDBF") 
  432.  
  433. Return codes most likely to be returned are: 
  434.  
  435. o  0 - ok. 
  436. o  40 - function not found. 
  437.  
  438. For more information about return codes from Rexx, refer to the IBM 
  439. documentation. 
  440.  
  441.  
  442. ΓòÉΓòÉΓòÉ 4. The RexxBase Functions. ΓòÉΓòÉΓòÉ
  443.  
  444. This release of RexxBase offers several functions to read, write and update 
  445. your database records.  Also available are functions to create database, modify 
  446. database structures and to sort databases. 
  447.  
  448.  
  449. ΓòÉΓòÉΓòÉ 4.1. Rexxbase_OpenDBF. ΓòÉΓòÉΓòÉ
  450.  
  451. Description.  Prior to processing a database file, the file must be opened. 
  452. When your procedure opens the database file several activities occur. 
  453.  
  454. o The database file is opened. 
  455. o RexxBase creates database related stem variable concerning system and file 
  456.   status. 
  457. o RexxBase creates a stem variable containing field names, types and sizes. 
  458. o If indexes are specified then these files are opened. 
  459.  
  460. Purpose. 
  461.  
  462. To open the database for processing. 
  463.  
  464. Format. 
  465.  
  466. rexxbase_opendbf("dbfname"[,index1[,index2[,...]]]) 
  467.  
  468. Parameters. 
  469.  
  470. dbfname 
  471.           The REXX variable contains the name of your database as it is known 
  472.           to the operating system. 
  473. index1 
  474.           The master index file name as it is known to the operating system. 
  475.           Unlike the dbfname, which is the REXX Variable name passed within 
  476.           quotes.  The index file name is the OS/2 filename.  You can use a 
  477.           REXX variable to pass the name, just don't put it in quotes.  THIS IS 
  478.           AN OPTIONAL PARAMETER. 
  479. index2 ... 
  480.           The alternative index file names as they are known to the operating 
  481.           system. Like the master index file name, they are the OS/2 filenames. 
  482.           You can use a REXX variable to pass the name, just don't put it in 
  483.           quotes.  THIS IS AN OPTIONAL PARAMETER. 
  484.  
  485. You must set the database name in the variable prior to use.  And you must pass 
  486. the variable name in a string.  For example. 
  487.  
  488. myfilename = 'c:\xbase\machines.dbf'
  489. ret = rexxbase_opendbf('myfilename')
  490.  
  491. Return Value  Description 
  492.  
  493. "". 
  494.           Normal 
  495.  
  496. No Rexx DBF Name specified 
  497.           The first parameter of function call is missing. 
  498.  
  499. Bad Variable Name 
  500.           The variable name passed to the routine is not a valid REXX Name 
  501.  
  502. No File Name Assigned To Variable. 
  503.           The variable was not assigned a value. 
  504.  
  505. Database Name Already In Use. 
  506.           The name passed is already assigned to another opened database. 
  507.  
  508. Can't open. 
  509.           Operating System error.  File and system errors are written to the 
  510.           console, printer or  rexxbase.error  stem variable. 
  511.  
  512. Can't open index, Database File opened. 
  513.           The RexxBase could not open any one of the index files specified. 
  514.           Depending on which file failed, any index files specified after it 
  515.           will not be opened. 
  516.  
  517.  For multi-user access refer to the following RexxBase variable: 
  518.  
  519. o Rexxbase.Read 
  520.  
  521. o Rexxbase.Write 
  522.  
  523. o Rexxbase.Share 
  524.  
  525. Sample Without An Index File 
  526.  
  527. /* REXX */
  528. dbf = c:\users\net.dbf
  529. ret = rexxbase_opendbf('dbf')
  530. if ret \= '' then do
  531.    say ret
  532.    exit
  533.  end
  534.  
  535. Sample With An Index File 
  536.  
  537. /* REXX */
  538. dbf = c:\users\net.dbf
  539. ret = rexxbase_opendbf('dbf',c:\users\net.ndx)
  540. if ret \= '' then do
  541.   say ret
  542.   exit
  543. end
  544.  
  545.  
  546. ΓòÉΓòÉΓòÉ 4.2. Rexxbase_CloseDBF. ΓòÉΓòÉΓòÉ
  547.  
  548. Description.  When your procedure is done using the database file it should be 
  549. closed.  This allows your program to update the file correctly. 
  550.  
  551. Purpose. 
  552.  
  553. To close the database. 
  554.  
  555. Format. 
  556.  
  557. rexxbase_closedbf("dbfname") 
  558.  
  559. Parameters. 
  560.  
  561. dbfname 
  562.           The REXX variable contains the name of your database as you defined 
  563.           it in the Rexxbase_OpenDBF function. 
  564.  
  565. The name of the database is defined in a REXX variable.  You must pass the 
  566. variable name in a string.  For example. 
  567.  
  568. myfilename = 'c:\xbase\machines.dbf'
  569. ret = rexxbase_closedbf('myfilename')
  570.  
  571. Return Value  Description 
  572.  
  573. "". 
  574.           Normal 
  575.  
  576. No Rexx DBF Name specified 
  577.           The first parameter of function call is missing. 
  578.  
  579. Unknown Database Name. 
  580.           The name found, in the passed parameter, is not the same used to open 
  581.           a database. 
  582.  
  583. Sample. 
  584.  
  585. /* REXX */
  586. dbf = c:\users\net.dbf
  587. ret = rexxbase_opendbf('dbf')
  588. if ret \= '' then do
  589.    say ret
  590.    exit
  591.  end
  592. ret = rexxbase_closedbf('dbf')
  593. if ret\= '' then do
  594.   say ret
  595.   exit
  596.  end
  597. say the number of dbf record(s) are dbf.recordcount
  598.  
  599.  
  600. ΓòÉΓòÉΓòÉ 4.3. Rexxbase_CloseAllDBF. ΓòÉΓòÉΓòÉ
  601.  
  602. Description.  When your procedure is done using all of the database files they 
  603. should be closed.  This allows your program to update the files correctly. 
  604.  
  605. Purpose. 
  606.  
  607. To close all opened databases. 
  608.  
  609. Format. 
  610.  
  611. rexxbase_closealldbf() 
  612.  
  613. Parameters. 
  614.  
  615. N/A 
  616.           N/A 
  617.  
  618. The function does not use any parameters. For example, 
  619.  
  620. rexxbase_closealldbf()
  621.  
  622. Return Value  Description 
  623.  
  624. "". 
  625.           Normal 
  626.  
  627. Even though there are no other return values.  The internal processing errors 
  628. may be found in the  rexxbase.error  stem variable. 
  629.  
  630. Sample. 
  631.  
  632. /* REXX */
  633. dbf = c:\users\net.dbf
  634. ret = rexxbase_opendbf('dbf')
  635. if ret \= '' then do
  636.   say ret
  637.   exit
  638.  end
  639. dbf2 = c:\users\addr.dbf
  640. ret = rexxbase_opendbf('dbf2',addr.ndx)
  641. if ret \= '' then do
  642.   say ret
  643.   exit
  644.  end
  645. ret = rexxbase_closealldbf)
  646. if ret \=''  then do
  647.   say ret
  648.   exit
  649.  end
  650.  
  651.  
  652. ΓòÉΓòÉΓòÉ 4.4. Rexxbase_ReadDBF. ΓòÉΓòÉΓòÉ
  653.  
  654. Description.  Read the database fields into the REXX variables.  This commands 
  655. reads the next record in the file. 
  656.  
  657. Purpose. 
  658.  
  659. To read the next sequential record in the database. 
  660.  
  661. If the database was opened with an index, then the next record in the index 
  662. list is read. 
  663.  
  664. Format. 
  665.  
  666. rexxbase_readdbf("dbfname") 
  667.  
  668. Parameters. 
  669.  
  670. dbfname 
  671.           The REXX variable contains the name of your database as you defined 
  672.           it in the Rexxbase_OpenDBF function. 
  673.  
  674. The name of the database is defined in a REXX variable.  You must pass the 
  675. variable name in a string.  For example. 
  676.  
  677. /* rexx */
  678. myfilename = 'c:\xbase\machines.dbf'
  679. rexxbase_readdbf('myfilename')
  680.  
  681. Return Value  Description 
  682.  
  683. "". 
  684.           Normal 
  685.  
  686. No Rexx DBF Name specified 
  687.           The first parameter of function call is missing. 
  688.  
  689. BOF. 
  690.           End of file condition.  No record is read.  Record field values 
  691.           remain unchanged. 
  692.  
  693. Unknown Database Name. 
  694.           The name found in the passed parameter is not the same used to open 
  695.           the database. 
  696.  
  697. Unable to read file rc = XX. 
  698.           Record area could not be read.  Where XX is a return code from OS/2. 
  699.           If XX is equal to 5 then the operating system is denying access to 
  700.           that area.  If XX is equal to 33 then the record area has been 
  701.           locked.  For other values you can type on the command line "HELP XX" 
  702.           to find the values for XX. 
  703.  
  704. Sample. 
  705.  
  706. /* REXX */
  707. dbf = c:\users\net.dbf
  708. ret = rexxbase_opendbf('dbf')
  709. if ret \= '' then do
  710.   say ret
  711.   exit
  712.  end
  713. ret = rexxbase_readdbf('dbf')
  714. if ret = BOF then do
  715.   say end of file reached
  716.  end
  717.  
  718.  
  719. ΓòÉΓòÉΓòÉ 4.5. Rexxbase_ReadAndLockDBF. ΓòÉΓòÉΓòÉ
  720.  
  721. Description.  Read the database fields into the REXX variables and prevent 
  722. other functions within OS/2 from accessing these fields.  This commands reads 
  723. the next record in the file.  Contrary to its name the record area is locked 
  724. first and then read. 
  725.  
  726. The record area is unlocked by executing one of four functions: 
  727.  
  728. o updating the record with a Rexxbase_UpdateDBF 
  729.  
  730. o reading and locking with another Rexxbase_ReadAndLockDBF 
  731.  
  732. o reading and locking with a Rexxbase_ReadAndLockPrevDBF 
  733.  
  734. o unlocking with a Rexxbase_UnlockDBF. 
  735.  
  736. If left open, the record area is unlocked when the RexxBase DLL is dropped. 
  737.  
  738. Purpose. 
  739.  
  740. To gain sole access to the next sequential record in the database. 
  741.  
  742. If the database was opened with an index, then the next record in the index 
  743. list is read. 
  744.  
  745. Format. 
  746.  
  747. rexxbase_readandlockdbf("dbfname") 
  748.  
  749. Parameters. 
  750.  
  751. dbfname 
  752.           The REXX variable contains the name of your database as you defined 
  753.           it in the Rexxbase_OpenDBF function. 
  754.  
  755. The name of the database is defined in a REXX variable.  You must pass the 
  756. variable name in a string.  For example. 
  757.  
  758. /* rexx */
  759. myfilename = 'c:\xbase\machines.dbf'
  760. rexxbase_readandlockdbf('myfilename')
  761.  
  762. Return Value  Description 
  763.  
  764. "". 
  765.           Normal 
  766.  
  767. No Rexx DBF Name specified 
  768.           The first parameter of function call is missing. 
  769.  
  770. Unable to lock record area. 
  771.           Record area is already locked by another process. 
  772.  
  773. BOF. 
  774.           End of file condition.  No record is read.  Record field values 
  775.           remain unchanged. 
  776.  
  777. Unknown Database Name. 
  778.           The name found in the passed parameter is not the same used to open 
  779.           the database. 
  780.  
  781. Sample. 
  782.  
  783. /* REXX */
  784. dbf = c:\users\net.dbf
  785. ret = rexxbase_opendbf('dbf')
  786. if ret \= '' then do
  787.   say ret
  788.   exit
  789.  end
  790. ret = rexxbase_readandlockdbf('dbf')
  791. if ret <> "" then do
  792.   say record area already locked
  793.   end
  794. else do
  795.   dbf.time = time()
  796.   rc = rexxbase_updatedbf('dbf')
  797.  end
  798. rc = rexxbase_closedbf('dbf')
  799.  
  800.  
  801. ΓòÉΓòÉΓòÉ 4.6. Rexxbase_UnlockDBF. ΓòÉΓòÉΓòÉ
  802.  
  803. Description.  The command will unlock a record locked by a 
  804. Rexxbase_ReadAndLockDBF or Rexxbase_ReadAndLockPrevDBF command. 
  805.  
  806. Purpose. 
  807.  
  808. To unlock a locked record in the database. 
  809.  
  810. Format. 
  811.  
  812. Rexxbase_UnlockDBF("dbfname") 
  813.  
  814. Parameters. 
  815.  
  816. dbfname 
  817.           The REXX variable contains the name of your database as you defined 
  818.           it in the Rexxbase_OpenDBF function. 
  819.  
  820. The name of the database is defined in a REXX variable.  You must pass the 
  821. variable name in a string.  For example. 
  822.  
  823. /* rexx */
  824. myfilename = 'c:\xbase\machines.dbf'
  825. rexxbase_unlock('myfilename')
  826.  
  827. Return Value  Description 
  828.  
  829. "". 
  830.           Normal 
  831.  
  832. No Rexx DBF Name specified 
  833.           The first parameter of function call is missing. 
  834.  
  835. Unknown Database Name. 
  836.           The name found in the passed parameter is not the same used to open 
  837.           the database. 
  838.  
  839. Sample. 
  840.  
  841. /* REXX */ d
  842. bf = c:\users\net.dbf
  843. ret = rexxbase_opendbf('dbf')
  844. if ret \= '' then do
  845.   say ret
  846.   exit
  847.  end
  848. ret = rexxbase_readandlockdbf('dbf',dbf.recordcount)
  849. if dbf.date = date() then ret = rexxbase_unlockdbf('dbf')
  850. else do
  851.   dbf.date = date()
  852.   ret = rexxbase_updatedbf('dbf')
  853.  end
  854. ret = rexxbase_closedbf('dbf')
  855.  
  856.  
  857. ΓòÉΓòÉΓòÉ 4.7. Rexxbase_SetLockTimeout. ΓòÉΓòÉΓòÉ
  858.  
  859. Description.  The command will set a lock timeout value, in milliseconds, for 
  860. all record locking functions. 
  861.  
  862. Purpose. 
  863.  
  864. To allow a minimum amount time for testing record locks.  The default value is 
  865. zero.  If an incorrect value is specified then the default is used. 
  866.  
  867. Format. 
  868.  
  869. rexxbase_setlocktimeout(timeinmillisec) 
  870.  
  871. Parameters. 
  872.  
  873. timeinmillisec 
  874.           Timeout limit in milliseconds. 
  875.  
  876. rexxbase_setlocktimeout(100)
  877.  
  878. Return Value  Description 
  879.  
  880. "". 
  881.           Normal 
  882.  
  883. No Lock Time Specified 
  884.           The only parameter to this function is the lock test timeout value. 
  885.           If none specified then the default value of zero will be used. 
  886.  
  887. Sample. 
  888.  
  889. /* REXX */
  890. /* set locking time out test to 1000 milliseconds.  */
  891. ret = rexxbase_setlocktimeout(1000)
  892.  
  893.  
  894. ΓòÉΓòÉΓòÉ 4.8. Rexxbase_GoToRecord. ΓòÉΓòÉΓòÉ
  895.  
  896. Description.  The command will position at a specified record and read it. 
  897.  
  898. Purpose. 
  899.  
  900. To read a particular record in the database. 
  901.  
  902. Format. 
  903.  
  904. rexxbase_gotorecord("dbfname",recordnumber) 
  905.  
  906. Parameters. 
  907.  
  908. dbfname 
  909.           The REXX variable contains the name of your database as you defined 
  910.           it in the Rexxbase_OpenDBF function. 
  911. recordnumber 
  912.           The record number to read. 
  913.  
  914. The name of the database is defined in a REXX variable.  You must pass the 
  915. variable name in a string.  For example. 
  916.  
  917. myfilename = 'c:\xbase\machines.dbf'
  918. rexxbase_gotorecord('myfilename',1)
  919.  
  920. Return Value  Description 
  921.  
  922. "". 
  923.           Normal 
  924.  
  925. No Rexx DBF Name specified 
  926.           The first parameter of function call is missing. 
  927.  
  928. No Record Number Specified. 
  929.           You did not pass a record number in the second argument. 
  930.  
  931. Unknown Database Name. 
  932.           The name found in the passed parameter is not the same used to open 
  933.           the database. 
  934.  
  935. Bad Record Number. 
  936.           You passed a record number that is invalid or is less than one.  No 
  937.           record is read. 
  938.  
  939. BOF. 
  940.           You passed a record number that is greater than the number on the 
  941.           file.  No record is read.  Record field values remain unchanged. 
  942.  
  943. Sample. 
  944.  
  945. /* REXX */
  946. /* assume the database has a field name AMOUNT.  */
  947. /* this example will get the last AMOUNT on file*/
  948. dbf = c:\users\net.dbf
  949. ret = rexxbase_opendbf('dbf')
  950. if ret \= '' then do
  951.   say ret
  952.   exit
  953.  end
  954. ret = rexxbase_gotorecord('dbf',dbf.recordcount)
  955. if ret = '' then say dbf.amount
  956. ret = rexxbase_closedbf('dbf')
  957.  
  958.  
  959. ΓòÉΓòÉΓòÉ 4.9. Rexxbase_ReadPrevDBF. ΓòÉΓòÉΓòÉ
  960.  
  961. Description.  Read the database fields into the REXX variables.  This commands 
  962. reads the previous record in the file. 
  963.  
  964. Purpose. 
  965.  
  966. To read the previous sequential record in the database. 
  967.  
  968. If the database was opened with an index, then the previous record in the index 
  969. list is read. 
  970.  
  971. Format. 
  972.  
  973. rexxbase_readprevdbf("dbfname") 
  974.  
  975. Parameters. 
  976.  
  977. dbfname 
  978.           The REXX variable contains the name of your database as you defined 
  979.           it in the Rexxbase_OpenDBF function. 
  980.  
  981. The name of the database is defined in a REXX variable.  You must pass the 
  982. variable name in a string.  For example. 
  983.  
  984. myfilename = 'c:\xbase\machines.dbf'
  985. rexxbase_readprevdbf('myfilename')
  986.  
  987. Return Value  Description 
  988.  
  989. "". 
  990.           Normal 
  991.  
  992. No Rexx DBF Name specified 
  993.           The first parameter of function call is missing. 
  994.  
  995. Unknown Database Name. 
  996.           The name found in the passed parameter is not the same used to open 
  997.           the database. 
  998.  
  999. Unable to read file rc = XX. 
  1000.           Record area could not be read.  Where XX is a return code from OS/2. 
  1001.           If XX is equal to 5 then the operating system is denying access to 
  1002.           that area.  If XX is equal to 33 then the record area has been 
  1003.           locked.  For other values you can type on the command line "HELP XX" 
  1004.           to find the values for XX. 
  1005.  
  1006. TOF. 
  1007.           Top of file condition.  No record is read.  Record field values 
  1008.           remain unchanged. 
  1009.  
  1010. Unknown Database Name. 
  1011.           The name found in the passed parameter is not the same used to open 
  1012.           the database. 
  1013.  
  1014. Sample. 
  1015.  
  1016. /* REXX Read the 10th and 9th records*/
  1017. dbf = c:\users\net.dbf
  1018. ret = rexxbase_opendbf('dbf')
  1019. if ret \= '' then do
  1020.   say ret
  1021.   exit
  1022.  end ret =
  1023. rexxbase_gotorecord('dbf',10)
  1024. ret = rexxbase_readprevdbf('dbf')
  1025. ret = rexxbase_closedbf('dbf')
  1026.  
  1027.  
  1028. ΓòÉΓòÉΓòÉ 4.10. Rexxbase_ReadAndLockPrevDBF. ΓòÉΓòÉΓòÉ
  1029.  
  1030. Description.  Read the database fields into the REXX variables and prevent 
  1031. other functions within OS/2 from accessing these fields.  This commands reads 
  1032. the previous record in the file.  Contrary to its name the record area is 
  1033. locked first and then read. 
  1034.  
  1035. The record area is unlocked by executing one of four functions: 
  1036.  
  1037. o updating the record with a Rexxbase_UpdateDBF 
  1038.  
  1039. o reading and locking with another Rexxbase_ReadAndLockDBF 
  1040.  
  1041. o reading and locking with a Rexxbase_ReadAndLockPrevDBF 
  1042.  
  1043. o unlocking with a Rexxbase_UnlockDBF. 
  1044.  
  1045. If left open, the record area is unlocked when the RexxBase DLL is dropped. 
  1046.  
  1047. If the database was opened with an index, then the previous record in the index 
  1048. list is read. 
  1049.  
  1050. Purpose. 
  1051.  
  1052. To gain sole access to the previous sequential record in the database. 
  1053.  
  1054. If the database was opened with an index, then the next record in the index 
  1055. list is read. 
  1056.  
  1057. Format. 
  1058.  
  1059. rexxbase_readandlockprevdbf("dbfname") 
  1060.  
  1061. Parameters. 
  1062.  
  1063. dbfname 
  1064.           The REXX variable contains the name of your database as you defined 
  1065.           it in the Rexxbase_OpenDBF function. 
  1066.  
  1067. The name of the database is defined in a REXX variable.  You must pass the 
  1068. variable name in a string.  For example. 
  1069.  
  1070. myfilename = 'c:\xbase\machines.dbf'
  1071. rexxbase_readandlockprevdbf('myfilename')
  1072.  
  1073. Return Value  Description 
  1074.  
  1075. "". 
  1076.           Normal 
  1077.  
  1078. No Rexx DBF Name specified 
  1079.           The first parameter of function call is missing. 
  1080.  
  1081. Unable to read file rc = XX. 
  1082.           Record area could not be read.  Where XX is a return code from OS/2. 
  1083.           If XX is equal to 5 then the operating system is denying access to 
  1084.           that area.  If XX is equal to 33 then the record area has been 
  1085.           locked.  For other values you can type on the command line "HELP XX" 
  1086.           to find the values for XX. 
  1087.  
  1088. TOF. 
  1089.           Top of file condition.  No record is read.  Record field values 
  1090.           remain unchanged. 
  1091.  
  1092. Unknown Database Name. 
  1093.           The name found in the passed parameter is not the same used to open 
  1094.           the database. 
  1095.  
  1096. Sample. 
  1097.  
  1098. /* REXX Read the 10th and 9th records*/
  1099. dbf = c:\users\net.dbf
  1100. ret = rexxbase_opendbf('dbf')
  1101. if ret \= '' then do
  1102.   say ret
  1103.   exit
  1104.  end
  1105. ret = rexxbase_gotorecord('dbf',10)
  1106. ret = rexxbase_readprevdbf('dbf')
  1107. ret = rexxbase_closedbf('dbf')
  1108.  
  1109.  
  1110. ΓòÉΓòÉΓòÉ 4.11. Rexxbase_FindRecord. ΓòÉΓòÉΓòÉ
  1111.  
  1112. Description.  The command will position at a specified record using the master 
  1113. index file. 
  1114.  
  1115. Purpose. 
  1116.  
  1117. To read a particular record in the database using the index file. 
  1118.  
  1119. Format. 
  1120.  
  1121. rexxbase_findrecord("dbfname","string",[EXACT]) 
  1122.  
  1123. Parameters. 
  1124.  
  1125. dbfname 
  1126.           The REXX variable contains the name of your database as you defined 
  1127.           it in the Rexxbase_OpenDBF function. 
  1128. string 
  1129.           The index key string used for searching. 
  1130. EXACT 
  1131.           Optional indicator to tell RexxBase to find the exact 'string' in the 
  1132.           index.  This would cause a Hard Find.  If not specified then RexxBase 
  1133.           would execute a Soft Find. 
  1134.  
  1135. The name of the database is defined in a REXX variable.  You must pass the 
  1136. variable name in a string.  For example. 
  1137.  
  1138. myfilename = 'c:\xbase\machines.dbf'
  1139. ret = rexxbase_findrecord('myfilename',"LASER 11")
  1140.  
  1141. Return Value  Description 
  1142.  
  1143. "". 
  1144.           Normal 
  1145.  
  1146. No REXX DBF Name 
  1147.           No argument was passed to the routine. 
  1148.  
  1149. No Locate String Specified 
  1150.           Second parameter of function is missing. 
  1151.  
  1152. Unknown Database Name. 
  1153.           The name found in the passed parameter is not the same used to open 
  1154.           the database. 
  1155.  
  1156. Index file not opened 
  1157.           When the database was opened, no index files were specified. 
  1158.  
  1159. Record Not Found (when EXACT is specified) 
  1160.           You passed a string that is not on the master index.  No record is 
  1161.           read. 
  1162.  
  1163. Record Not Found (when EXACT is not specified) 
  1164.           The string entered is higher than any on the index. 
  1165.  
  1166. Sample. 
  1167.  
  1168. /* REXX */
  1169. /* this example copies the first record of the database to the end */
  1170. dbf = c:\users\net.dbf
  1171. ndx = 'c:\xbase\net.ndx'
  1172. ret = rexxbase_opendbf('dbf',ndx)
  1173. if ret \= '' then do
  1174.   say ret
  1175.   exit
  1176.  end
  1177. ret = rexxbase_findrecord('dbf',"USA001')
  1178. if ret \= '' then do
  1179.   say find failed with ret
  1180.   exit
  1181.  end
  1182. say Network Disposition For USA001 is dbf.dispo
  1183. ret = rexxbase_closedbf('dbf')
  1184. if ret \  = '' then do
  1185.   say close failed with ret
  1186.   exit
  1187.  end
  1188.  
  1189.  
  1190. ΓòÉΓòÉΓòÉ 4.12. Rexxbase_WriteDBF. ΓòÉΓòÉΓòÉ
  1191.  
  1192. Description.  This will add a new record to the end of the database. 
  1193.  
  1194. Purpose. 
  1195.  
  1196. To add records to the database. 
  1197.  
  1198. Format. 
  1199.  
  1200. rexxbase_writedbf("dbfname") 
  1201.  
  1202. Parameters. 
  1203.  
  1204. dbfname 
  1205.           The REXX variable contains the name of your database as you defined 
  1206.           it in the Rexxbase_OpenDBF function. 
  1207.  
  1208. The name of the database is defined in a REXX variable.  You must pass the 
  1209. variable name in a string.  For example. 
  1210.  
  1211. /* */
  1212. myfilename = 'c:\xbase\machines.dbf'
  1213. ret = rexxbase_opendbf('myfilename')
  1214. rexxbase_writedbf('myfilename')
  1215. ret = rexxbase_closedbf('myfilename')
  1216.  
  1217. Return Value  Description 
  1218.  
  1219. "". 
  1220.           Normal 
  1221.  
  1222. No Rexx DBF Name specified 
  1223.           The first parameter of function call is missing. 
  1224.  
  1225. Unknown Database Name. 
  1226.           The name found in the passed parameter is not the same used to open 
  1227.           the database. 
  1228.  
  1229. Sample. 
  1230.  
  1231. /* REXX */
  1232. /* this example copies the first record of the database to the end */
  1233. dbf = c:\users\net.dbf
  1234. ret = rexxbase_opendbf('dbf')
  1235. if ret \= '' then do
  1236.   say ret
  1237.   exit
  1238.  end
  1239. ret = rexxbase_readdbf('dbf')
  1240. if ret \= '' then do
  1241.   say read failed with ret
  1242.   exit
  1243.  end
  1244. ret = rexxbase_writedbf('dbf')
  1245. if ret \  = '' then do
  1246.   say write failed with ret
  1247.   exit
  1248.  end
  1249. ret = rexxbase_closedbf('dbf')
  1250. if ret \  = '' then do
  1251.   say close failed with ret
  1252.   exit
  1253.  end
  1254.  
  1255.  
  1256. ΓòÉΓòÉΓòÉ 4.13. Rexxbase_UpdateDBF. ΓòÉΓòÉΓòÉ
  1257.  
  1258. Description.  This function will rewrite data at the current record position. 
  1259.  
  1260. Purpose. 
  1261.  
  1262. To update a record. 
  1263.  
  1264. Format. 
  1265.  
  1266. rexxbase_updatedbf("dbfname") 
  1267.  
  1268. Parameters. 
  1269.  
  1270. dbfname 
  1271.           The REXX variable contains the name of your database as you defined 
  1272.           it in the Rexxbase_OpenDBF function. 
  1273.  
  1274. The name of the database is defined in a REXX variable.  You must pass the 
  1275. variable name in a string.  For example. 
  1276.  
  1277. myfilename = 'c:\xbase\machines.dbf' ret =
  1278. rexxbase_updatedbf('myfilename')
  1279.  
  1280. Return Value  Description 
  1281.  
  1282. "". 
  1283.           Normal 
  1284.  
  1285. No Rexx DBF Name specified 
  1286.           The first parameter of function call is missing. 
  1287.  
  1288. Unknown Database Name. 
  1289.           The name found in the passed parameter is not the same used to open 
  1290.           the database. 
  1291.  
  1292. Sample. 
  1293.  
  1294. /* REXX */
  1295. /* this example update the field AMOUNT on the first record of the database*/
  1296. dbf = c:\users\net.dbf
  1297. ret = rexxbase_opendbf('dbf')
  1298. if ret \= '' then do
  1299.   say ret
  1300.   exit
  1301.  end
  1302. ret = rexxbase_readdbf('dbf')
  1303. if ret \= '' then do
  1304.   say read failed with ret
  1305.   exit
  1306.  end
  1307. dbf.AMOUNT = dbf.AMOUNT * 2
  1308. ret = rexxbase_updatedbf('dbf')
  1309. if ret \  = '' then do
  1310.   say update failed with ret
  1311.   exit
  1312.  end
  1313. ret = rexxbase_closedbf('dbf')
  1314. if ret \  = '' then do
  1315.   say close failed with ret
  1316.   exit
  1317.  end
  1318.  
  1319.  
  1320. ΓòÉΓòÉΓòÉ 4.14. Rexxbase_PackDBF. ΓòÉΓòÉΓòÉ
  1321.  
  1322. Description.  This function removes logically deleted records from the 
  1323. database. 
  1324.  
  1325. Purpose. 
  1326.  
  1327. To remove deleted records.  If the file has been opened with indexes, then the 
  1328. index will be rebuilt. 
  1329.  
  1330. If the database has associated index files and they are not opened during the 
  1331. packing process the indexes will be incorrect. 
  1332.  
  1333. Format. 
  1334.  
  1335. rexxbase_packdbf("dbfname") 
  1336.  
  1337. Parameters. 
  1338.  
  1339. dbfname 
  1340.           The REXX variable contains the name of your database as you defined 
  1341.           it in the Rexxbase_OpenDBF function. 
  1342.  
  1343. The name of the database is defined in a REXX variable.  You must pass the 
  1344. variable name in a string.  For example. 
  1345.  
  1346. myfilename = 'c:\xbase\machines.dbf' ret =
  1347. rexxbase_packdbf('myfilename')
  1348.  
  1349. Return Value  Description 
  1350.  
  1351. "". 
  1352.           Normal 
  1353.  
  1354. No REXX DBF Name 
  1355.           No argument was passed to the routine. 
  1356.  
  1357. Unknown Database Name. 
  1358.           The name found in the passed parameter is not the same used to open 
  1359.           the database. 
  1360.  
  1361. Sample. 
  1362.  
  1363. /* REXX */
  1364. dbf = c:\users\net.dbf
  1365. ret = rexxbase_opendbf('dbf')
  1366. if ret \= "" then do
  1367.   say ret
  1368.   exit
  1369.  end
  1370. ret = rexxbase_packdbf('dbf')
  1371.  
  1372.  
  1373. ΓòÉΓòÉΓòÉ 4.15. Rexxbase_SortDBF ΓòÉΓòÉΓòÉ
  1374.  
  1375. Description.  This will sort a database file by fields names and create a new 
  1376. database file. 
  1377.  
  1378. Prior to call the RexxBase Sort function you must specify the sort fields and 
  1379. the sort order for each field.  You do this by creating field names using the 
  1380. database variable name concatenated with the SORTFIELD string. 
  1381.  
  1382. ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ
  1383. ΓöéSort FieldΓöé*.SORTFIELD.0  ΓöéThe number of  Γöé               Γöé          Γöé
  1384. ΓöéCount     Γöé               Γöéfields to be   Γöé               Γöé          Γöé
  1385. Γöé          Γöé               Γöéused for sort  Γöé               Γöé          Γöé
  1386. Γöé          Γöé               Γöécriteria.      Γöé               Γöé          Γöé
  1387. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  1388. ΓöéSort FieldΓöé*.SORTFIELD.1  ΓöéThe primary    Γöé*.SORTTYPE.1   ΓöéUse a     Γöé
  1389. ΓöéName 1    Γöé               Γöésort field.    Γöé               Γöévalue of  Γöé
  1390. Γöé          Γöé               Γöé               Γöé               Γöé"-" (minusΓöé
  1391. Γöé          Γöé               Γöé               Γöé               Γöésign) to  Γöé
  1392. Γöé          Γöé               Γöé               Γöé               Γöésort this Γöé
  1393. Γöé          Γöé               Γöé               Γöé               Γöéfield in  Γöé
  1394. Γöé          Γöé               Γöé               Γöé               ΓöédescendingΓöé
  1395. Γöé          Γöé               Γöé               Γöé               Γöéorder.    Γöé
  1396. Γöé          Γöé               Γöé               Γöé               ΓöéAny other Γöé
  1397. Γöé          Γöé               Γöé               Γöé               Γöévalue willΓöé
  1398. Γöé          Γöé               Γöé               Γöé               Γöésort the  Γöé
  1399. Γöé          Γöé               Γöé               Γöé               Γöéfield in  Γöé
  1400. Γöé          Γöé               Γöé               Γöé               Γöéascending Γöé
  1401. Γöé          Γöé               Γöé               Γöé               Γöéorder.    Γöé
  1402. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  1403. Γöé...       Γöé...            Γöé               Γöé               Γöé          Γöé
  1404. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  1405. ΓöéSort FieldΓöé*.SORTFIELD.n  ΓöéThe last sort  Γöé               Γöé          Γöé
  1406. Γöén         Γöé               Γöéfield in       Γöé               Γöé          Γöé
  1407. Γöé          Γöé               Γöépriority.  The Γöé               Γöé          Γöé
  1408. Γöé          Γöé               Γöévalue of n     Γöé               Γöé          Γöé
  1409. Γöé          Γöé               Γöéshould be equalΓöé               Γöé          Γöé
  1410. Γöé          Γöé               Γöéto the value   Γöé               Γöé          Γöé
  1411. Γöé          Γöé               Γöéspecified in   Γöé               Γöé          Γöé
  1412. Γöé          Γöé               Γöédbname.SORTFIELΓöé               Γöé          Γöé
  1413. ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ
  1414.  
  1415. Purpose. 
  1416.  
  1417. To sort a database. 
  1418.  
  1419. Format. 
  1420.  
  1421. rexxbase_sortdbf("dbfname",sortfilename) 
  1422.  
  1423. Parameters. 
  1424.  
  1425. dbfname 
  1426.           The REXX variable contains the name of your database as you defined 
  1427.           it in the Rexxbase_OpenDBF function. 
  1428. sortfilename 
  1429.           The sorted output file name as it will be known to the operating 
  1430.           system. 
  1431.  
  1432. The name of the database is defined in a REXX variable.  You must pass the 
  1433. variable name in a string.  For example. 
  1434.  
  1435. myfilename = 'c:\xbase\machines.dbf' ret =
  1436. rexxbase_sortdbf('myfilename','c:\xbase\machsort.dbf')
  1437.  
  1438. Return Value  Description 
  1439.  
  1440. "". 
  1441.           Normal 
  1442.  
  1443. No Rexx DBF Name specified 
  1444.           The first parameter of function call is missing. 
  1445.  
  1446. No Sort DBF Name specified 
  1447.           The second parameter of function call is missing. 
  1448.  
  1449. Unknown Database Name. 
  1450.           The name found in the passed parameter is not the same used to open 
  1451.           the database. 
  1452.  
  1453. Sort Field Count Not Found 
  1454.           The REXX variable containing the field count is missing.  See 
  1455.           *.SORTFIELD.0 above. 
  1456.  
  1457. Can't Find "fieldname" 
  1458.           The field name used then the SORTFIELD stem variables is not part of 
  1459.           this database. 
  1460.  
  1461. Not Enough Memory For Sorting 
  1462.           RexxBase uses the ram and virtual ram space to perform the sort.  The 
  1463.           database to be sorted is too large for this process. 
  1464.  
  1465. Can't Open Sort DBF File. 
  1466.           OS/2 returned a error code that indicates some type of error has 
  1467.           occurred while opening the output database. 
  1468.  
  1469. Can't Write To Sort DBF File. 
  1470.           OS/2 returned a error code that indicates some type of error has 
  1471.           occurred while writing the output database. 
  1472.  
  1473. Unable To Write Fields To File. 
  1474.           OS/2 returned a error code that indicates some type of error has 
  1475.           occurred while writing the output database. 
  1476.  
  1477. Unable To Read File. 
  1478.            The database to be sorted has an error. 
  1479.  
  1480. Sample. 
  1481.  
  1482. /* REXX */
  1483. /* sort on field name location (descending)*/
  1484. dbf = c:\users\net.dbf
  1485. ret = rexxbase_opendbf('dbf')
  1486. if ret \= '' then do
  1487.   say ret
  1488.   exit
  1489.  end
  1490. dbf.sortfield.0 = 1
  1491. dbf.sortfield.1 = location
  1492. dbf.sorttype.1 = '-'
  1493. ret = rexxbase_sortdbf('dbf',c:\users\sortloc.dbf)
  1494.  
  1495.  
  1496. ΓòÉΓòÉΓòÉ 4.16. Rexxbase_DeleteRecord. ΓòÉΓòÉΓòÉ
  1497.  
  1498. Description.  Marks the current record as deleted. 
  1499.  
  1500. Purpose. 
  1501.  
  1502. To logically delete a record. 
  1503.  
  1504. Format. 
  1505.  
  1506. rexxbase_deleterecord("dbfname") 
  1507.  
  1508. Parameters. 
  1509.  
  1510. dbfname 
  1511.           The REXX variable contains the name of your database as you defined 
  1512.           it in the Rexxbase_OpenDBF function. 
  1513.  
  1514. The name of the database is defined in a REXX variable.  You must pass the 
  1515. variable name in a string.  For example. 
  1516.  
  1517. ret = rexxbase_deleterecord('myfilename')
  1518.  
  1519. Return Value  Description 
  1520.  
  1521. "". 
  1522.           Normal 
  1523.  
  1524. No Rexx DBF Name specified 
  1525.           The first parameter of function call is missing. 
  1526.  
  1527. Unknown Database Name. 
  1528.           The name found in the passed parameter is not the same used to open 
  1529.           the database. 
  1530.  
  1531. No Record Read. 
  1532.           The procedure must do a record read before deleting a record. 
  1533.  
  1534. Sample. 
  1535.  
  1536. /* REXX */
  1537. /*mark the last record on file as undeleted */
  1538. dbf = c:\users\net.dbf
  1539. ret = rexxbase_opendbf('dbf')
  1540. if ret \= '' then do
  1541.   say ret
  1542.   exit
  1543.  end
  1544. ret = rexxbase_gotorecord('dbf',dbf.recordcount)
  1545. if ret = '' then ret = rexxbase_deleterecord('dbf')
  1546.  
  1547.  
  1548. ΓòÉΓòÉΓòÉ 4.17. Rexxbase_UndeleteRecord. ΓòÉΓòÉΓòÉ
  1549.  
  1550. Description.  Marks the current record as not deleted. 
  1551.  
  1552. Purpose. 
  1553.  
  1554. To logically undelete a record. 
  1555.  
  1556. Format. 
  1557.  
  1558. rexxbase_undeleterecord("dbfname") 
  1559.  
  1560. Parameters. 
  1561.  
  1562. dbfname 
  1563.           The REXX variable contains the name of your database as you defined 
  1564.           it in the Rexxbase_OpenDBF function. 
  1565.  
  1566. The name of the database is defined in a REXX variable.  You must pass the 
  1567. variable name in a string.  For example. 
  1568.  
  1569. rexxbase_undeleterecord('myfilename')
  1570.  
  1571. Return Value  Description 
  1572.  
  1573. "". 
  1574.           Normal 
  1575.  
  1576. No Rexx DBF Name specified 
  1577.           The first parameter of function call is missing. 
  1578.  
  1579. Unknown Database Name. 
  1580.           The name found in the passed parameter is not the same used to open 
  1581.           the database. 
  1582.  
  1583. No Record Read. 
  1584.           The procedure must do a record read before undeleting a record. 
  1585.  
  1586. Sample. 
  1587.  
  1588. /* REXX */
  1589. /*mark the last record on file as not deleted */
  1590. dbf = c:\users\net.dbf
  1591. ret = rexxbase_opendbf('dbf')
  1592. if ret \= '' then do
  1593.   say ret
  1594.   exit
  1595.  end
  1596. ret =rexxbase_gotorecord('dbf',dbf.recordcount)
  1597. if ret = '' then ret = rexxbase_undeleterecord('dbf')
  1598.  
  1599.  
  1600. ΓòÉΓòÉΓòÉ 4.18. Rexxbase_CreateDBF ΓòÉΓòÉΓòÉ
  1601.  
  1602. Description.  This will create a new database file. 
  1603.  
  1604. Prior to calling the RexxBase Create function you must specify the fields and 
  1605. the characteristics for each field.  You do this by creating field names using 
  1606. the database variable name concatenated with the FIELD string. 
  1607.  
  1608. ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ
  1609. ΓöéDatabase  Γöé*.FIELDCOUNT   ΓöéThe number of  Γöé               Γöé          Γöé
  1610. ΓöéField     Γöé               Γöéfields to be   Γöé               Γöé          Γöé
  1611. ΓöéCount     Γöé               Γöéused for       Γöé               Γöé          Γöé
  1612. Γöé          Γöé               Γöécreating the   Γöé               Γöé          Γöé
  1613. Γöé          Γöé               Γöédatabase.      Γöé               Γöé          Γöé
  1614. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  1615. ΓöéField NameΓöé*.FIELDNAME.1  ΓöéThe first fieldΓöéAny valid dBaseΓöé          Γöé
  1616. Γöé1         Γöé               Γöéname.          Γöéfield name.    Γöé          Γöé
  1617. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  1618. Γöé*."field  ΓöéThe first fieldΓöéSpecify C for  Γöé               Γöé          Γöé
  1619. Γöéname      Γöétype           Γöécharacter, L   Γöé               Γöé          Γöé
  1620. Γöé1".TYPE   Γöé               Γöéfor Logical, M Γöé               Γöé          Γöé
  1621. Γöé          Γöé               Γöéfor Memo, N forΓöé               Γöé          Γöé
  1622. Γöé          Γöé               ΓöéNumeric and D  Γöé               Γöé          Γöé
  1623. Γöé          Γöé               Γöéfor date.  Any Γöé               Γöé          Γöé
  1624. Γöé          Γöé               Γöéother value    Γöé               Γöé          Γöé
  1625. Γöé          Γöé               Γöéwill cause the Γöé               Γöé          Γöé
  1626. Γöé          Γöé               Γöécreate functionΓöé               Γöé          Γöé
  1627. Γöé          Γöé               Γöéto fail.       Γöé               Γöé          Γöé
  1628. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  1629. Γöé*."field  ΓöéThe first fieldΓöéSpecify the    Γöé               Γöé          Γöé
  1630. Γöéname      Γöésize or length.Γöéfield length.  Γöé               Γöé          Γöé
  1631. Γöé1".LENGTH Γöé               ΓöéFor Logical,   Γöé               Γöé          Γöé
  1632. Γöé          Γöé               ΓöéMemo and Date  Γöé               Γöé          Γöé
  1633. Γöé          Γöé               Γöéfield the size Γöé               Γöé          Γöé
  1634. Γöé          Γöé               Γöéfield is       Γöé               Γöé          Γöé
  1635. Γöé          Γöé               Γöéignored and    Γöé               Γöé          Γöé
  1636. Γöé          Γöé               ΓöéRexxBase uses  Γöé               Γöé          Γöé
  1637. Γöé          Γöé               Γöéthe default    Γöé               Γöé          Γöé
  1638. Γöé          Γöé               Γöévalues.  For   Γöé               Γöé          Γöé
  1639. Γöé          Γöé               ΓöéCharacter      Γöé               Γöé          Γöé
  1640. Γöé          Γöé               Γöéfields specify Γöé               Γöé          Γöé
  1641. Γöé          Γöé               Γöéa value from 1 Γöé               Γöé          Γöé
  1642. Γöé          Γöé               Γöéto 254.  For   Γöé               Γöé          Γöé
  1643. Γöé          Γöé               ΓöéNumeric fields Γöé               Γöé          Γöé
  1644. Γöé          Γöé               Γöéspecify the    Γöé               Γöé          Γöé
  1645. Γöé          Γöé               Γöélength in the  Γöé               Γöé          Γöé
  1646. Γöé          Γöé               Γöéformat of      Γöé               Γöé          Γöé
  1647. Γöé          Γöé               Γöélength.decimal,Γöé               Γöé          Γöé
  1648. Γöé          Γöé               Γöéwhere length isΓöé               Γöé          Γöé
  1649. Γöé          Γöé               Γöéa value from 1 Γöé               Γöé          Γöé
  1650. Γöé          Γöé               Γöéto 19 and      Γöé               Γöé          Γöé
  1651. Γöé          Γöé               Γöédecimal (no of Γöé               Γöé          Γöé
  1652. Γöé          Γöé               Γöédecimal        Γöé               Γöé          Γöé
  1653. Γöé          Γöé               Γöépositions) is 0Γöé               Γöé          Γöé
  1654. Γöé          Γöé               Γöéto 9 (one less Γöé               Γöé          Γöé
  1655. Γöé          Γöé               Γöéthan the       Γöé               Γöé          Γöé
  1656. Γöé          Γöé               Γöélength).       Γöé               Γöé          Γöé
  1657. Γöé          Γöé               ΓöéNumeric        Γöé               Γöé          Γöé
  1658. Γöé          Γöé               Γöéaccuracy is    Γöé               Γöé          Γöé
  1659. Γöé          Γöé               Γöévalid to 15    Γöé               Γöé          Γöé
  1660. Γöé          Γöé               Γöéinteger digits Γöé               Γöé          Γöé
  1661. Γöé          Γöé               Γöéand 9 decimal  Γöé               Γöé          Γöé
  1662. Γöé          Γöé               Γöéplaces.        Γöé               Γöé          Γöé
  1663. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  1664. Γöé...       Γöé...            Γöé               Γöé               Γöé          Γöé
  1665. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  1666. ΓöéField n   Γöé*.FIELDNAME.n  ΓöéThe last field Γöé               Γöé          Γöé
  1667. Γöé          Γöé               Γöéin the         Γöé               Γöé          Γöé
  1668. Γöé          Γöé               Γöédatabase.  The Γöé               Γöé          Γöé
  1669. Γöé          Γöé               Γöévalue of n     Γöé               Γöé          Γöé
  1670. Γöé          Γöé               Γöéshould be equalΓöé               Γöé          Γöé
  1671. Γöé          Γöé               Γöéto the value   Γöé               Γöé          Γöé
  1672. Γöé          Γöé               Γöéspecified in   Γöé               Γöé          Γöé
  1673. Γöé          Γöé               Γöédbname.FIELDCOUΓöé               Γöé          Γöé
  1674. ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ
  1675.  
  1676. Purpose. 
  1677.  
  1678. To create a database. 
  1679.  
  1680. Format. 
  1681.  
  1682. rexxbase_createdbf("dbfname") 
  1683.  
  1684. Parameters. 
  1685.  
  1686. dbfname 
  1687.           The REXX variable contains the name of the database similar in 
  1688.           function to the database field in the Rexxbase_OpenDBF function. 
  1689.  
  1690. The name of the database is defined in a REXX variable.  You must pass the 
  1691. variable name in a string.  For example. 
  1692.  
  1693. myfilename = 'c:\xbase\newmachn.dbf'
  1694. rexxbase_createdbf('myfilename')
  1695.  
  1696. Return Value  Description 
  1697.  
  1698. "". 
  1699.           Normal 
  1700.  
  1701. No Rexx DBF Name specified 
  1702.           The first parameter of function call is missing. 
  1703.  
  1704. Bad Variable Name 
  1705.           Variable used to pass database name is not a valid REXX variable 
  1706.           name. 
  1707.  
  1708. No Filename Assigned To Variable. 
  1709.           Variable used to pass database name is empty or unassigned. 
  1710.  
  1711. Database name already In Use. 
  1712.           Database name passed is already in use. 
  1713.  
  1714. Create failed 
  1715.           refer to the following: 
  1716.  
  1717.           Unknown Field Type 
  1718.  
  1719.           Use C, D, L, M, and N only for field types. 
  1720.  
  1721.           Invalid field size 
  1722.  
  1723.           For character fields use a size from 1 through 249.  For numeric 
  1724.           fields use a size of specification of xx.yy where xx is a value from 
  1725.           1 to 19 and yy is from 0 to 9 and yy is one less than xx.  All other 
  1726.           field type length specifications default to:  8 for D, 1 for L and 10 
  1727.           for M. 
  1728.  
  1729.           Too many fields. 
  1730.  
  1731.           Only 128 fields are allowed per database. 
  1732.  
  1733.           Record size too large 
  1734.  
  1735.           Records sizes are limited to 4000 bytes. 
  1736.  
  1737. To prevent unwanted destruction of a database file refer to the RexxBase 
  1738. variable Rexxbase.Safety. 
  1739.  
  1740. Sample. 
  1741.  
  1742. /* REXX */
  1743. dbf.fieldcount = 4
  1744. dbf.fieldname.1 = location
  1745. dbf.location.type = 'c'
  1746. dbf.location.length = '10'
  1747. dbf.fieldname.2 = inuse
  1748. dbf.inuse.type = 'l'
  1749. dbf.fieldname.3 = startuse
  1750. dbf.startuse.type = 'd'
  1751. dbf.fieldname.4 = prchcost
  1752. dbf.prchcost.type = 'n'
  1753. dbf.prchcost.length = '9.2'
  1754. ret = rexxbase_createdbf('dbf')
  1755.  
  1756.  
  1757. ΓòÉΓòÉΓòÉ 4.19. Rexxbase_CreateFromDBF ΓòÉΓòÉΓòÉ
  1758.  
  1759. Description.  This will create a new database file structure only.  No data is 
  1760. added to the file.  No structure modifications may be made. 
  1761.  
  1762. Purpose. 
  1763.  
  1764. To create a database structure. 
  1765.  
  1766. Format. 
  1767.  
  1768. rexxbase_createfromdbf("dbfname","newdbfname") 
  1769.  
  1770. Parameters. 
  1771.  
  1772. dbfname 
  1773.           The REXX variable contains the name of the database similar in 
  1774.           function to the database field in the Rexxbase_OpenDBF function. 
  1775. newdbfname 
  1776.           The REXX variable contains the name of the new database. 
  1777.  
  1778. The name of the database is defined in a REXX variable.  You must pass the 
  1779. variable name in a string.  For example. 
  1780.  
  1781. oldfilename = 'c:\xbase\machn.dbf' newfilename =
  1782. 'c:\xbase\newmachn.dbf'
  1783. rexxbase_createfromdbf('oldfilename','newfilename')
  1784.  
  1785. Return Value  Description 
  1786.  
  1787. "". 
  1788.           Normal 
  1789.  
  1790. No Rexx DBF Name specified 
  1791.           The first parameter of function call is missing. 
  1792.  
  1793. Unknown Database Name. 
  1794.           The name found in the passed parameter is not the same used to open 
  1795.           the database. 
  1796.  
  1797. No DBF Name To Copy Structure To 
  1798.           This functions expects a second paramter which contains the name of 
  1799.           the file to be created. 
  1800.  
  1801. Bad Variable Name 
  1802.           Variable used to pass database name is not a valid REXX variable 
  1803.           name. 
  1804.  
  1805. No Filename Assigned To Variable. 
  1806.           Variable used to pass database name is empty or unassigned. 
  1807.  
  1808. Database Name Already In Use. 
  1809.           Database name passed is already in use. 
  1810.  
  1811. No Filename Assigned To Variable. 
  1812.           Variable used to pass database name is empty or unassigned. 
  1813.  
  1814. Database In Use. 
  1815.           Database name passed is already in use. 
  1816.  
  1817. CreateFrom Failed 
  1818.           Refer to the  rexxbase.error  stem variable.: 
  1819.  
  1820. To prevent unwanted destruction of a database file refer to the RexxBase 
  1821. variable Rexxbase.Safety. 
  1822.  
  1823. Sample. 
  1824.  
  1825. /* REXX */
  1826. parse arg olddbf newdbf
  1827. ret = rexxbase_opendbf('olddbf')
  1828. ret = rexxbase_createfromdbf('olddbf','newdbf')
  1829.  
  1830.  
  1831. ΓòÉΓòÉΓòÉ 4.20. Rexxbase_ModifyDBF ΓòÉΓòÉΓòÉ
  1832.  
  1833. Description.  This will modify the structure of a database file that is 
  1834. currently open. 
  1835.  
  1836. When a database is opened the database fields descriptions are loaded into REXX 
  1837. Variables.  By changing the values in these REXX variables you can alter the 
  1838. characteristics of a database field, remove a database field and add new 
  1839. database fields. 
  1840.  
  1841. ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ
  1842. ΓöéDatabase  Γöé*.FIELDCOUNT   ΓöéThe number of  Γöé               Γöé
  1843. ΓöéField     Γöé               Γöéfields in the  Γöé               Γöé
  1844. ΓöéCount     Γöé               Γöédatabase.      Γöé               Γöé
  1845. Γöé          Γöé               ΓöéIncrease the   Γöé               Γöé
  1846. Γöé          Γöé               Γöécount of this  Γöé               Γöé
  1847. Γöé          Γöé               Γöéfield when     Γöé               Γöé
  1848. Γöé          Γöé               Γöéadding new     Γöé               Γöé
  1849. Γöé          Γöé               Γöérecords.  If   Γöé               Γöé
  1850. Γöé          Γöé               Γöéyou decrease   Γöé               Γöé
  1851. Γöé          Γöé               Γöéthe count, the Γöé               Γöé
  1852. Γöé          Γöé               Γöétrailing fieldsΓöé               Γöé
  1853. Γöé          Γöé               Γöéwill be        Γöé               Γöé
  1854. Γöé          Γöé               Γöéremoved.  To   Γöé               Γöé
  1855. Γöé          Γöé               Γöéremove fields  Γöé               Γöé
  1856. Γöé          Γöé               Γöéin the         Γöé               Γöé
  1857. Γöé          Γöé               Γöébeginning and  Γöé               Γöé
  1858. Γöé          Γöé               Γöéthe middle of  Γöé               Γöé
  1859. Γöé          Γöé               Γöéthe field      Γöé               Γöé
  1860. Γöé          Γöé               Γöéchange the     Γöé               Γöé
  1861. Γöé          Γöé               Γöéfield type "P".Γöé               Γöé
  1862. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  1863. ΓöéField NameΓöé*.FIELDNAME.1  ΓöéThe first fieldΓöé               Γöé
  1864. Γöé1         Γöé               Γöéname.          Γöé               Γöé
  1865. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  1866. Γöé*."field  ΓöéThe first fieldΓöéSpecify C for  Γöé               Γöé
  1867. Γöéname      Γöétype.          Γöécharacter, L   Γöé               Γöé
  1868. Γöé1".TYPE   Γöé               Γöéfor Logical, M Γöé               Γöé
  1869. Γöé          Γöé               Γöéfor Memo, N forΓöé               Γöé
  1870. Γöé          Γöé               ΓöéNumeric and D  Γöé               Γöé
  1871. Γöé          Γöé               Γöéfor date.      Γöé               Γöé
  1872. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  1873. Γöé*."field  ΓöéThe first fieldΓöéSpecify the    Γöé               Γöé
  1874. Γöéname      Γöésize or length.Γöéfield length.  Γöé               Γöé
  1875. Γöé1".LENGTH Γöé               ΓöéFor Logical,   Γöé               Γöé
  1876. Γöé          Γöé               ΓöéMemo and Date  Γöé               Γöé
  1877. Γöé          Γöé               Γöéfield the size Γöé               Γöé
  1878. Γöé          Γöé               Γöéfield is       Γöé               Γöé
  1879. Γöé          Γöé               Γöéignored and    Γöé               Γöé
  1880. Γöé          Γöé               ΓöéRexxBase uses  Γöé               Γöé
  1881. Γöé          Γöé               Γöéthe default    Γöé               Γöé
  1882. Γöé          Γöé               Γöévalues.  For   Γöé               Γöé
  1883. Γöé          Γöé               ΓöéCharacter      Γöé               Γöé
  1884. Γöé          Γöé               Γöéfields specify Γöé               Γöé
  1885. Γöé          Γöé               Γöéa value from 1 Γöé               Γöé
  1886. Γöé          Γöé               Γöéto 254.  For   Γöé               Γöé
  1887. Γöé          Γöé               ΓöéNumeric fields Γöé               Γöé
  1888. Γöé          Γöé               Γöéspecify the    Γöé               Γöé
  1889. Γöé          Γöé               Γöélength in the  Γöé               Γöé
  1890. Γöé          Γöé               Γöéformat of      Γöé               Γöé
  1891. Γöé          Γöé               Γöélength.decimal,Γöé               Γöé
  1892. Γöé          Γöé               Γöéwhere length isΓöé               Γöé
  1893. Γöé          Γöé               Γöéa value from 1 Γöé               Γöé
  1894. Γöé          Γöé               Γöéto 19 and      Γöé               Γöé
  1895. Γöé          Γöé               Γöédecimal (no of Γöé               Γöé
  1896. Γöé          Γöé               Γöédecimal        Γöé               Γöé
  1897. Γöé          Γöé               Γöépositions) is 0Γöé               Γöé
  1898. Γöé          Γöé               Γöéto 9 (one less Γöé               Γöé
  1899. Γöé          Γöé               Γöéthan the       Γöé               Γöé
  1900. Γöé          Γöé               Γöélength).       Γöé               Γöé
  1901. Γöé          Γöé               ΓöéNumeric        Γöé               Γöé
  1902. Γöé          Γöé               Γöéaccuracy is    Γöé               Γöé
  1903. Γöé          Γöé               Γöévalid to 15    Γöé               Γöé
  1904. Γöé          Γöé               Γöéinteger digits Γöé               Γöé
  1905. Γöé          Γöé               Γöéand 9 decimal  Γöé               Γöé
  1906. Γöé          Γöé               Γöéplaces.        Γöé               Γöé
  1907. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  1908. Γöé...       Γöé...            Γöé               Γöé               Γöé
  1909. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  1910. ΓöéField n   Γöé*.FIELDNAME.n  ΓöéThe last field Γöé               Γöé
  1911. Γöé          Γöé               Γöéin the         Γöé               Γöé
  1912. Γöé          Γöé               Γöédatabase.  The Γöé               Γöé
  1913. Γöé          Γöé               Γöévalue of n     Γöé               Γöé
  1914. Γöé          Γöé               Γöéshould be equalΓöé               Γöé
  1915. Γöé          Γöé               Γöéto the value   Γöé               Γöé
  1916. Γöé          Γöé               Γöéspecified in   Γöé               Γöé
  1917. Γöé          Γöé               Γöédbname.FIELDCOUΓöé               Γöé
  1918. ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ
  1919.  
  1920. Purpose. 
  1921.  
  1922. To modify a database. 
  1923.  
  1924. Format. 
  1925.  
  1926. rexxbase_modifydbf("dbfname") 
  1927.  
  1928. Parameters. 
  1929.  
  1930. dbfname 
  1931.           The REXX variable contains the name of the database similar in 
  1932.           function to the database field in the Rexxbase_OpenDBF function. 
  1933.  
  1934. The name of the database is defined in a REXX variable.  You must pass the 
  1935. variable name in a string.  For example. 
  1936.  
  1937. myfilename = 'c:\xbase\machn.dbf'
  1938. rexxbase_modifydbf('myfilename')
  1939.  
  1940. Return Value  Description 
  1941.  
  1942. "". 
  1943.           Normal 
  1944.  
  1945. No Rexx DBF Name specified 
  1946.           The first parameter of function call is missing. 
  1947.  
  1948. Unknown Database Name. 
  1949.           The name found in the passed parameter is not the same used to open 
  1950.           the database. 
  1951.  
  1952. Modify Failed 
  1953.           refer to the following: 
  1954.  
  1955.           Unknown Field Type 
  1956.  
  1957.           Use C, D, L, M, and N only for field types. 
  1958.  
  1959.           Invalid field size 
  1960.  
  1961.           For character fields use a size from 1 through 249.  For numeric 
  1962.           fields use a size of specification of xx.yy where xx is a value from 
  1963.           1 to 19 and yy is from 0 to 9 and yy is one less than xx.  All other 
  1964.           field type length specifications default to:  8 for D, 1 for L and 10 
  1965.           for M. 
  1966.  
  1967.           Too many fields. 
  1968.  
  1969.           Only 128 fields are allowed per database. 
  1970.  
  1971.           Record size too large 
  1972.  
  1973.           Records sizes are limited to 4000 bytes. 
  1974.  
  1975. Sample. 
  1976.  
  1977. /* REXX */
  1978. dbf = 'c:\xbase\newmachn.dbf'
  1979. rexxbase_opendbf('dbf')
  1980. dbf.fieldcount = 4
  1981. dbf.fieldname.1 = location
  1982. dbf.type.1 = 'c'
  1983. dbf.location.length = '10'
  1984. dbf.fieldname.2 = inuse
  1985. dbf.inuse.type = 'l'
  1986. dbf.fieldname.3 = startuse
  1987. dbf.startuse.type = 'd'
  1988. dbf.fieldname.4 = prchcost
  1989. dbf.prchcost.type = 'n'
  1990. dbf.prchcost.length = '9.2'
  1991. ret = rexxbase_modifydbf('dbf')
  1992.  
  1993.  
  1994. ΓòÉΓòÉΓòÉ 4.21. Rexxbase_CreateIndex ΓòÉΓòÉΓòÉ
  1995.  
  1996. Description.  This will create an index for an currently open database. 
  1997.  
  1998. The call the RexxBase Create Index function requires 3 parameters:  Open 
  1999. Database Name, Index file name (FAT or HPFS format) and the string defining the 
  2000. index. 
  2001.  
  2002. Purpose. 
  2003.  
  2004. To create an index for an open database. 
  2005.  
  2006. Format. 
  2007.  
  2008. rexxbase_createindex("dbfname",index file name,index string) 
  2009.  
  2010. Parameters. 
  2011.  
  2012. dbfname 
  2013.           The REXX variable contains the name of the database similar in 
  2014.           function to the database field in the Rexxbase_OpenDBF function. 
  2015. index file name 
  2016.           Any valid file name in FAT or HPFS format. 
  2017. index string 
  2018.           A string of characters used to specify the index. 
  2019.  
  2020. See REXXBASE.UNIQUE more information. 
  2021.  
  2022. See ndx definition more information. 
  2023.  
  2024. The name of the database is defined in a REXX variable.  You must pass the 
  2025. variable name in a string.  For example. 
  2026.  
  2027. myfilename = 'c:\xbase\newmachn.dbf'
  2028. myindexname = 'c:\xbase\newmachn.ndx'
  2029. rexxbase_opendbf('myfilename')
  2030. rexxbase_createindex('myfilename',myindexname,num+dept)
  2031.  
  2032. Return Value  Description 
  2033.  
  2034. "". 
  2035.           Normal 
  2036.  
  2037. No REXX DBF Name Specified 
  2038.           No argument was passed to the routine. 
  2039.  
  2040. Unknown Database Name. 
  2041.           The name found in the passed parameter is not the same used to open 
  2042.           the database. 
  2043.  
  2044. No Index File Name Specified 
  2045.           This procedure expects a second argument containing the new index 
  2046.           file name. 
  2047.  
  2048. No Index Field Names Specified 
  2049.           This procedure expects a third argument containing the index key. 
  2050.  
  2051. Index Not Built. 
  2052.           A runtime error occurred.  Review error message in  rexxbase.error 
  2053.           stem variable. 
  2054.  
  2055. Unknown field type 
  2056.           Use C, D, L, M, and N only for field types. 
  2057.  
  2058. Invalid index size 
  2059.           Indexes are limited to 100 bytes. 
  2060.  
  2061. Too many fields. 
  2062.           Only 100 fields are allowed per index. 
  2063.  
  2064. Data Type Mismatch 
  2065.           You can't mix numeric, character or date fields together 
  2066.  
  2067. Invalid Data Type 
  2068.           Memo fields and logic fields are not allowed to be used as indexes. 
  2069.  
  2070. Sample. 
  2071.  
  2072. /* REXX */
  2073. dbf = 'c:\xbase\machn.dbf'
  2074. ret = rexxbase_opendbf('dbf')
  2075. ret = rexxbase_createindex('dbf','machn.ndx',machnum)
  2076.  
  2077.  
  2078. ΓòÉΓòÉΓòÉ 4.22. Rexxbase_ReindexDBF ΓòÉΓòÉΓòÉ
  2079.  
  2080. Purpose. 
  2081.  
  2082. To rebuild all open indexes for an open database. 
  2083.  
  2084. Format. 
  2085.  
  2086. ret = rexxbase_reindexdbf(dbfname)
  2087.  
  2088. Parameters. 
  2089.  
  2090. dbfname 
  2091.           The REXX variable contains the name of the database similar in 
  2092.           function to the database field in the Rexxbase_OpenDBF function. 
  2093.  
  2094. Description.  This will rebuild all the indexes that are opened for a database 
  2095. file. 
  2096.  
  2097. When a database has been changed without its associated indexes, the index 
  2098. pointers will be incorrect.  This function will reindex the file. 
  2099.  
  2100. Also, use this function when many updates have been applied to a database, even 
  2101. with the index opened.  This will maintain the indexes for efficiency. 
  2102.  
  2103. myfilename = 'c:\xbase\machn.dbf'
  2104. rexxbase_reindexdbf('myfilename')
  2105.  
  2106. Return Value  Description 
  2107.  
  2108. "". 
  2109.           Normal 
  2110.  
  2111. No REXX DBF Name Specified 
  2112.           No argument was passed to the routine. 
  2113.  
  2114. Unknown Database Name. 
  2115.           The name found in the passed parameter is not the same used to open 
  2116.           the database. 
  2117.  
  2118. Sample. 
  2119.  
  2120. /* REXX */
  2121. dbf = 'c:\xbase\newmachn.dbf'
  2122. rexxbase_opendbf('dbf',c:\xbase\newmachn.ndx)
  2123. ret = rexxbase_reindexdbf('dbf')
  2124. say  newmachn.ndx has been reindexed
  2125. ret = rexxbase_closedbf('dbf')
  2126.  
  2127.  
  2128. ΓòÉΓòÉΓòÉ 4.23. Other RexxBase Functions. ΓòÉΓòÉΓòÉ
  2129.  
  2130. During the development of release 1.2 our test programs became increasingly 
  2131. more difficult to write.  One of the difficulties was creating test data. We 
  2132. created several routines that helped us in creating data. These functions are 
  2133. available with the registered version.  A description of these functions can be 
  2134. found in the README.DOC file. 
  2135.  
  2136.  
  2137. ΓòÉΓòÉΓòÉ 5. RexxBase Fields and Database Fields. ΓòÉΓòÉΓòÉ
  2138.  
  2139. RexxBase uses REXX Stem and Compound variables extensively to allow your 
  2140. procedure to use your database files. 
  2141.  
  2142.  
  2143. ΓòÉΓòÉΓòÉ 5.1. RexxBase Fields. ΓòÉΓòÉΓòÉ
  2144.  
  2145. RexxBase offers several fields for controlling your database.  All field names 
  2146. are associated with your database by using the stem variable name you pass to 
  2147. the RexxBase Functions. 
  2148.  
  2149. Also, RexxBase provides a stem variable for system errors.  The field name is 
  2150. rexxbase.error .  Refer to the section on error processing for more information 
  2151. and a list of potential error messages. 
  2152.  
  2153. Name      Description. 
  2154. "database name".RECORDCOUNT 
  2155.           Number of record on the file.  Where database name is the name your 
  2156.           program passes to RexxBase. 
  2157. "database name".RECORDNUMBER 
  2158.           The current record number.  Where database name is the name your 
  2159.           program passes to RexxBase. 
  2160. "database name".FILESTATUS 
  2161.           TOF - Top of file, BOF - End of file, or null. 
  2162. "database name".RECORDSTATUS 
  2163.           DELETED - current record is deleted, or null. 
  2164. "database name".LASTUPDATE 
  2165.           Last day file was updated. 
  2166. "database name".FIELDCOUNT 
  2167.           Number of fields on the database. 
  2168. database name".FIELDNAME.# 
  2169.           Field names on the database.  Where # is any number from 1 to the 
  2170.           number of fields as specified in FIELDCOUNT. 
  2171. "fieldname".TYPE 
  2172.           The database type for the respective field, see FIELDNAME.#. 
  2173.           "fieldname" is the name of the field in the database. 
  2174. "fieldname".LENGTH 
  2175.           The length of the respective field, see FIELDNAME.#.  "fieldname" is 
  2176.           the name of the field in the database.  Numeric fields will have in 
  2177.           the value in the format of xx.yy where xx is the length of the field 
  2178.           and yy is the number of decimal positions.  Memo fields are always 
  2179.           10.  Logical fields are always 1. 
  2180.  
  2181.  
  2182. ΓòÉΓòÉΓòÉ 5.1.1. Field Naming Convention. ΓòÉΓòÉΓòÉ
  2183.  
  2184. With the exception of RexxBase database names, all database field names are 
  2185. prefixed by the Rexx variable you use to specify the database.  For example if 
  2186. you used the REXX variable DNAME as the database name the field count variable 
  2187. name would be DNAME.FIELDCOUNT. 
  2188.  
  2189. Database field names are directly accessible by the field name in the database. 
  2190. For example if your database had three fields defined as NAME, CITY, ZIP, then 
  2191. your REXX procedure will be able to read from and write to these fields by 
  2192. using the name directly.  The database name is not prefixed to the fields 
  2193. names. 
  2194.  
  2195. To find out the field names in a database use the following example: 
  2196.  
  2197. /* REXX */
  2198. parse arg dbfname
  2199. do i = 1 to dbfname.fieldcount
  2200.   k = "say dbfname.fieldname.i "
  2201.   k = k || " dbfname."dbfname.fieldname.i".type"
  2202.   k = k || " dbfname."dbfname.fieldname.i".length"
  2203.   interpret k
  2204. end /* do */
  2205. say dbfname
  2206. do i = 1 to dbfname.recordcount
  2207.   say dbfname.recordstatus
  2208.   say reading is rexxbase_readdbf("dbfname")
  2209.   do j = 1 to dbfname.fieldcount
  2210.     k = "say dbfname.fieldname.j "
  2211.     k = k || " is " || dbfname.fieldname.j
  2212.     interpret k     /* don't let the quoted field name fool you */
  2213.     /* the first dbfname.fieldname.j will appear as the field name after interpretation*/
  2214.     /* the second will have the value appear after interpretation */
  2215.    end /* do */
  2216.  end /* do */
  2217. say rexxbase_closedbf("dbfname")
  2218. return
  2219.  
  2220.  
  2221. ΓòÉΓòÉΓòÉ 5.1.2. Your Program Changing a RexxBase Field Value. ΓòÉΓòÉΓòÉ
  2222.  
  2223. In most cases if you change a RexxBase field value, like FIELDCOUNT there will 
  2224. be no effect internally to RexxBase or the actual database file. 
  2225.  
  2226.  
  2227. ΓòÉΓòÉΓòÉ 5.2. Database Fields. ΓòÉΓòÉΓòÉ
  2228.  
  2229. Database field name are accessible by concatenating the database variable name, 
  2230. your procedure assigns when opening the database, with the field name in the 
  2231. database.  For example if your database had three fields defined as NAME, CITY, 
  2232. ZIP, and your REXX procedure opened the database as ADDRESS then your REXX 
  2233. procedure will be able to read from and write to these fields by using the 
  2234. names ADDRESS.NAME, ADDRESS.CITY AND ADDRESS.ZIP. 
  2235.  
  2236. The database name is prefixed to the fields names. 
  2237.  
  2238.  
  2239. ΓòÉΓòÉΓòÉ 5.2.1. Example of Field Naming. ΓòÉΓòÉΓòÉ
  2240.  
  2241. Unlike RexxBase field names, database field are never prefixed with the 
  2242. database name when used as a function parameter or in field definitions.  For 
  2243. example when sorting on a field, you must specify what field to sort using the 
  2244. databasename.SORTFIELD.# construct.  The field name you put into the assignment 
  2245. is simply the field name as defined to the dBase database. 
  2246.  
  2247. /* to sort on field ZIP in database ADDRESS */
  2248. address.sortfield.0 = 1
  2249. address.sortfield.1 = zip /* wrong */
  2250. /* address.sortfield.1 = address.zip */
  2251. /* this will assign the value of address.zip to address.sortfield.1 */
  2252. /* which will only work if the value of address.zip is zip */
  2253.  
  2254.  
  2255. ΓòÉΓòÉΓòÉ 5.3. Field Verification. ΓòÉΓòÉΓòÉ
  2256.  
  2257. The following field verifications and edits are used. 
  2258.  
  2259.  
  2260. ΓòÉΓòÉΓòÉ 5.3.1. Date Fields ΓòÉΓòÉΓòÉ
  2261.  
  2262. Dates are validated based on two parameters. 
  2263.  
  2264. First, is the RexxBase Variable RexxBase.FormatDate. 
  2265.  
  2266. Second, is the Country Code, as defined by OS/2 NLS. 
  2267.  
  2268. RexxBase.FormatDate takes precedence.  If it is turned "OFF" then all date 
  2269. fields are assumed to be in the following 8 numeric-character format: 
  2270. CCYYMMDD. 
  2271.  
  2272. CC - century. 
  2273.  
  2274. YY - year. 
  2275.  
  2276. MM - month. 
  2277.  
  2278. DD - day. 
  2279.  
  2280. If you need to use dates that go past 1999/12/31 then you should always use 
  2281. this format.  This is because the default century for the other formats is 
  2282. "1900." 
  2283.  
  2284. If RexxBase.FormatDate is "ON", the default value, then date fields are 
  2285. formatted based on the Country Code.  As follows:  (all are 8 bytes long with 
  2286. separators). 
  2287.  
  2288. MM/DD/YY, slashes or some other separator is required 
  2289.  
  2290. DD/MM/YY, slashes or some other separator is required 
  2291.  
  2292. YY/MM/DD, slashes or some other separator is required 
  2293.  
  2294. Edits are performed on all 4 types of date fields. 
  2295.  
  2296. Century is ignored and defaults to 19. 
  2297.  
  2298. Year is any numeric value from 00 to 99. 
  2299.  
  2300. Month is any numeric value from 01 to 12. 
  2301.  
  2302. Day is any numeric value from 01 to last day of month.  h3.Numeric Fields 
  2303.  
  2304. Numeric field verification skips over white space characters until an 
  2305. alphanumeric character is found.  If the first non-white space character is 
  2306. alphabetic then the value is stored as zero - NOTE:  there is no error message. 
  2307. Field values larger than the defined length (and/or decimal count) are 
  2308. truncated. 
  2309.  
  2310.  
  2311. ΓòÉΓòÉΓòÉ 5.3.2. Logical fields ΓòÉΓòÉΓòÉ
  2312.  
  2313. Logical fields are tested and verified for correctness as follows: 
  2314.  
  2315. ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ
  2316. ΓöéFirst Byte of       ΓöéStored Γöé                              Γöé
  2317. ΓöéLogical Field Value ΓöéAs     Γöé                              Γöé
  2318. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  2319. ΓöéT, t, Y, or y       ΓöéT      Γöé                              Γöé
  2320. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  2321. ΓöéF, f, N, or n       ΓöéF      Γöé                              Γöé
  2322. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  2323. ΓöéAny other value     ΓöéF      ΓöéLook for error message on     Γöé
  2324. Γöé                    Γöé       Γöérexxbase.error  stem variable.Γöé
  2325. ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ
  2326.  
  2327.  
  2328. ΓòÉΓòÉΓòÉ 5.3.3. MEMO Fields. ΓòÉΓòÉΓòÉ
  2329.  
  2330. Memo field names follow the same field naming convention as other field names 
  2331. except they are compound (stem or array) variables.  Each stem entry in the 
  2332. field is up to 512 bytes of data for the memo field.  The zeroth field name 
  2333. contains the total number of stems associated with the field. 
  2334.  
  2335. For instance, your database, dbf, has a memo field named RESPONSE.  On the 
  2336. first record, RESPONSE has a total length of 2499 bytes.  Then data stored in 
  2337. RESPONSE is accessible using the following example.  In this example 
  2338. dbf.response.0 will equal 5 because 5 x 512 blocks are needed to store 2499 
  2339. bytes. 
  2340.  
  2341. rlen = dbf.response.0
  2342. do dlen = 1 to rlen
  2343.   say dbf.response.dlen
  2344.  end
  2345.  
  2346.  
  2347. ΓòÉΓòÉΓòÉ 6. When You Are Done - Release The Functions. ΓòÉΓòÉΓòÉ
  2348.  
  2349. After using the RexxBase functions your REXX command file may drop the RexxBase 
  2350. functions.  To do this use the REXX command RXFUNCDROP. 
  2351.  
  2352. While the IBM documentation recommends dropping functions.  we feel that it is 
  2353. an unnecessary exercise.  Do this only if you have literally thousands of 
  2354. functions registered.  The space requirements are minimal, but the search time, 
  2355. for thousands of functions, may be significant. 
  2356.  
  2357. The format of the command is  RXFUNCDROP(function) 
  2358.  
  2359. function is the name of the RexxBase routine as your procedure defined it. 
  2360.  
  2361.  
  2362. ΓòÉΓòÉΓòÉ 6.1. Example of Dropping a RexxBase Function. ΓòÉΓòÉΓòÉ
  2363.  
  2364. rxfuncdrop(rexxbase_opendbf) 
  2365.  
  2366. Return codes most likely to be returned are: 
  2367.  
  2368. o  0 - ok. 
  2369. o  40 - function not found. 
  2370.  
  2371.  
  2372. ΓòÉΓòÉΓòÉ 7. Returned Values. ΓòÉΓòÉΓòÉ
  2373.  
  2374. o "" - null string. 
  2375.  
  2376. o  others. 
  2377.  
  2378.  
  2379. ΓòÉΓòÉΓòÉ 8. Error, File, and Date Control Variables ΓòÉΓòÉΓòÉ
  2380.  
  2381. The following is a description of RexxBase error handling and extended file 
  2382. control facilities. 
  2383.  
  2384.  
  2385. ΓòÉΓòÉΓòÉ 8.1. RexxBase Errors ΓòÉΓòÉΓòÉ
  2386.  
  2387. Errors are reported in two different ways, return codes and the error stem 
  2388. variable. If the RexxBase function returns a value other than "" then the 
  2389. function did not complete successfully. 
  2390.  
  2391.  
  2392. ΓòÉΓòÉΓòÉ 8.1.1. Where To Find Internal Error Messages ΓòÉΓòÉΓòÉ
  2393.  
  2394. Whether a function failed or not, there maybe other types of errors and warning 
  2395. messages that are useful to your program. These messages are found in the 
  2396. RexxBase error stem variable. 
  2397.  
  2398. All internal system and control errors are directed to a stem variable named 
  2399. REXXBASE.ERROR.  The zeroth element is a counter This element contains them 
  2400. number of errors in the stem variable.  Each time you call a RexxBase function 
  2401. the counter is reset to zero.  Your procedure should check what is returned 
  2402. from the function call. 
  2403.  
  2404. For a further description of stem variables refer to your Rexx documentation. 
  2405.  
  2406.  
  2407. ΓòÉΓòÉΓòÉ 8.1.2. Internal Error List. ΓòÉΓòÉΓòÉ
  2408.  
  2409. The following is a list of errors and a brief explanation. 
  2410.  
  2411. Error     Description 
  2412. All other data ignored after Sort DBF name 
  2413.           More parameters were specified than are required 
  2414. Logic field value invalid, value set to 'F' 
  2415.           The value of a logic field, which will be adding to or updating a 
  2416.           database record contained an invalid value. 
  2417. Can't position at end of memo file 
  2418.           There is a severe error with a DBT file. 
  2419. Bad field type when getting field value 
  2420.           Internal error - A field type has changed 
  2421. Bad date found, changed to all spaces. 
  2422.           The value of a date field, which will be added to or updating a 
  2423.           database record contained an invalid value. 
  2424. All other data ignored after DBF name 
  2425.           More parameters were specified than are required 
  2426. Dos open error ### for file @@@@@@@@@@ 
  2427.           Operating system error, value found in ###, while trying to open file 
  2428.           @@@@@@@@@@@ 
  2429. Dos read anchor error #### for file @@@@@@@@@@ 
  2430.           Operating system error, value found in ###, while trying to read file 
  2431.           @@@@@@@@@@@ 
  2432. Unknown field specified in key file open 
  2433.           A field name specified in an index build is not part of the database 
  2434. Can't make memo field part of a key 
  2435.           A field name specified in an index build is a memo field.  Memo 
  2436.           fields can not be part of an index. 
  2437. Can't make logical field part of a key 
  2438.           A field name specified in an index build is a logical field.  Logical 
  2439.           fields can not be part of an index. 
  2440. Unknown field specified in key file define 
  2441.           A field name specified in an index build is not in the database. 
  2442. Key length too short 
  2443.           Internal error, the calculated length for a key is less than one (1). 
  2444. Would add duplicate 
  2445.           Writing a new record to database creates a duplicate key.  Unique key 
  2446.           value is FALSE. 
  2447. Dos write anchor error #### for file @@@@@@@@@@ 
  2448.           Operating system error, value found in ###, while trying to write 
  2449.           file @@@@@@@@@@@ 
  2450. Not enough memory for index sorting. 
  2451.           Not enough internal memory space to create temporary sort file for 
  2452.           indexing function. 
  2453. Can't rename file for modify 
  2454.           Modify Structure function attempts to rename the old file.  Failure 
  2455.           probably caused by duplicate name. 
  2456. Can't rebuild, old file not open 
  2457.           Internal error.  Somehow the file has been closed. 
  2458. Can't rebuild, new file not created 
  2459.           Modify Structure function attempted to create the new file.  Old file 
  2460.           has been renamed but ...failure probably caused by duplicate name or 
  2461.           lack of disk space. 
  2462. Unable to allocate temp file memory ## 
  2463.           Not enough internal memory space to create file space.  Operating 
  2464.           system error value is ## 
  2465. Dos open error ### for text file @@@@@@@@@@@ 
  2466.           Operating system error, value found in ###, while trying to open DBT 
  2467.           file @@@@@@@@@@@ 
  2468. Field Not Defined 
  2469.           Create function error - can not find variable. 
  2470. Bad Field Count 
  2471.           Field count for Create is either less than 1 or greater than 128 
  2472. Field Name Not Okay 
  2473.           Field name does not satisfy naming convention. 
  2474. Field Type Not Defined 
  2475.           Create function needs to know the field type(characteristics) 
  2476. Field Type Not Valid 
  2477.           Field type specified is not C, D, L, N or M. 
  2478. Field Type Not Valid 
  2479.           Create function needs to know the field length 
  2480. Field Length Not Defined Correctly 
  2481.           The field length requested does not satisfy the length limitations 
  2482.           for its type. 
  2483. Record Size Too Large 
  2484.           Calculated record length is greater than 4000.  4000 is maximum 
  2485.           allowed. 
  2486.  
  2487.  
  2488. ΓòÉΓòÉΓòÉ 8.2. File Control Variables ΓòÉΓòÉΓòÉ
  2489.  
  2490. RexxBase offers several control variables to enhance control over your database 
  2491. files. 
  2492.  
  2493.  
  2494. ΓòÉΓòÉΓòÉ 8.2.1. Safety - Preventing File Deletion ΓòÉΓòÉΓòÉ
  2495.  
  2496. REXXBASE.SAFETY allows for a level of protection from destroying, deleting or 
  2497. overwriting database and index files. 
  2498.  
  2499. When your routine sets REXXBASE.SAFETY to "ON", anytime RexxBase opens a file, 
  2500. in a creation function (i.e.  sort output file, create index, etc.)  the 
  2501. function will fail.  Check both the return code from the function and/or the 
  2502. rexxbase.error  stem variable. 
  2503.  
  2504. When REXXBASE.SAFETY is set to "OFF" then any routine can destroy a file. 
  2505. There may be information in the  rexxbase.error  stem variable but the return 
  2506. code, even if successful, will be "". 
  2507.  
  2508. The default value is "OFF".  If set incorrectly the default value will be used. 
  2509.  
  2510.  
  2511. ΓòÉΓòÉΓòÉ 8.2.2. REXXBASE.READ ΓòÉΓòÉΓòÉ
  2512.  
  2513. When REXXBASE.READ is set to "OFF" then the Rexxbase_OpenDBF will open the file 
  2514. for NO read access.  This means any routine that reads a file, that was opened 
  2515. when set REXXBASE.READ was set to "OFF", will fail. 
  2516.  
  2517. The default value is "ON".  If set incorrectly the default value will be used. 
  2518.  
  2519.  
  2520. ΓòÉΓòÉΓòÉ 8.2.3. REXXBASE.WRITE ΓòÉΓòÉΓòÉ
  2521.  
  2522. When REXXBASE.WRITE is set to "OFF" then the Rexxbase_OpenDBF will open the 
  2523. file for NO write access.  This means any routine that writes to a file, that 
  2524. was opened when set REXXBASE.READ was set to "OFF", will fail. 
  2525.  
  2526. The default value is "ON".  If set incorrectly the default value will be used. 
  2527.  
  2528.  
  2529. ΓòÉΓòÉΓòÉ 8.2.4. REXXBASE.UNIQUE ΓòÉΓòÉΓòÉ
  2530.  
  2531. When REXXBASE.UNIQUE is set to "ON" then the Rexxbase_CreateIndex creates an 
  2532. index file with unique keys.  This prevents duplicate keys from being added to 
  2533. the index file. 
  2534.  
  2535. When REXXBASE.UNIQUE is set to "OFF" then the Rexxbase_CreateIndex creates an 
  2536. index file without unique keys.  This prevents duplicate keys from being added 
  2537. to the index file with Rexxbase_ReadDBF and Rexxbase_UpdateDBF functions. 
  2538.  
  2539. The default value is "OFF".  If set incorrectly the default value will be used. 
  2540.  
  2541.  
  2542. ΓòÉΓòÉΓòÉ 8.2.5. REXXBASE.SHARE ΓòÉΓòÉΓòÉ
  2543.  
  2544. Rexxbase offers a facility for file sharing your databases. 
  2545.  
  2546. When REXXBASE.SHARE is set to "OFF" then the Rexxbase_OpenDBF will open the 
  2547. file NO OTHER external program file access.  This will prevent any other 
  2548. program in the system from accessing the file.  Also, if the file is already 
  2549. opened, by another program, your routine will fail.  This is file locking. 
  2550.  
  2551. When REXXBASE.SHARE is set to "READ" then the Rexxbase_OpenDBF will open the 
  2552. file for read only sharing.  This will allow any other program in the system to 
  2553. read your open database file. 
  2554.  
  2555. Also, if the file is already opened by another program for no read sharing, 
  2556. your routine will fail. 
  2557.  
  2558. When REXXBASE.SHARE is set to "WRITE" then the Rexxbase_OpenDBF will open the 
  2559. file for write only sharing.  This will allow any other program in the system 
  2560. to have write access the file, not read access. 
  2561.  
  2562. Also, if the file is already opened by another program for no write sharing, 
  2563. your routine will fail. 
  2564.  
  2565. When REXXBASE.SHARE is set to "READWRITE" then the Rexxbase_OpenDBF will open 
  2566. the file for read and write sharing.  This will allow any other program in the 
  2567. system to have access the file. 
  2568.  
  2569. Also, if the file is already opened by another program for no sharing, your 
  2570. routine will fail. 
  2571.  
  2572. The default value is "OFF".  If set incorrectly the default value will be used. 
  2573.  
  2574. You may set REXXBASE.SHARE at anytime and as often as you like.  But it is only 
  2575. used when the database is opened with a Rexxbase_OpenDBF. 
  2576.  
  2577.  
  2578. ΓòÉΓòÉΓòÉ 8.3. Controlling Date Format. ΓòÉΓòÉΓòÉ
  2579.  
  2580. RexxBase offers a way to control the format of dates.  By turning the format 
  2581. control on and off dates are presented in either internal xBase format or in a 
  2582. display format. 
  2583.  
  2584.  
  2585. ΓòÉΓòÉΓòÉ 8.3.1. RexxBase Variable RexxBase.FormatDate. ΓòÉΓòÉΓòÉ
  2586.  
  2587. When RexxBase.FormatDate is turned "OFF" then all date fields are in the 
  2588. following 8 numeric-character format:  CCYYMMDD. 
  2589.  
  2590. CC - century. 
  2591.  
  2592. YY - year. 
  2593.  
  2594. MM - month. 
  2595.  
  2596. DD - day. 
  2597.  
  2598. If RexxBase.FormatDate is "ON", the default value, then date fields are 
  2599. formatted based on the Country Code.  as follows:  (all are 8 bytes long with 
  2600. separators). 
  2601.  
  2602. MM/DD/YY, slashes or some other separator is required 
  2603.  
  2604. DD/MM/YY, slashes or some other separator is required 
  2605.  
  2606. YY/MM/DD, slashes or some other separator is required 
  2607.  
  2608. The default value is "ON".  If set incorrectly the default value will be used. 
  2609.  
  2610.  
  2611. ΓòÉΓòÉΓòÉ 9. Next Releases. ΓòÉΓòÉΓòÉ
  2612.  
  2613. The following is a list of the next planned releases. 
  2614.  
  2615. This is a statement of direction.  In any event, American Coders may, at 
  2616. anytime, decide not to complete any or all of these releases. 
  2617.  
  2618. Also, this does not guarantee the these releases will be completed in this 
  2619. order. 
  2620.  
  2621. This list is not complete. 
  2622.  
  2623.  
  2624. ΓòÉΓòÉΓòÉ 9.1. Filters ΓòÉΓòÉΓòÉ
  2625.  
  2626. To limit the access to records that meet a specified condition. 
  2627.  
  2628.  
  2629. ΓòÉΓòÉΓòÉ 9.2. Database Relations and Joining. ΓòÉΓòÉΓòÉ
  2630.  
  2631. Logically join two or more databases on common fields. 
  2632.  
  2633.  
  2634. ΓòÉΓòÉΓòÉ 9.3. SOM/DSOM Interface To The Database Routines. ΓòÉΓòÉΓòÉ
  2635.  
  2636. Gain access to the database, outside the realm of Rexx, using C/C++ class 
  2637. libraries through objects. 
  2638.  
  2639.  
  2640. ΓòÉΓòÉΓòÉ 10. Suggestions and Bugs. ΓòÉΓòÉΓòÉ
  2641.  
  2642. Please call or write to us at our address with suggestions or to report bugs. 
  2643.  
  2644. You can reach us through CompuServe by contacting Joe McVerry at 74150,2370 
  2645.  
  2646.  
  2647. ΓòÉΓòÉΓòÉ 11. Shareware Software ΓòÉΓòÉΓòÉ
  2648.  
  2649. DEFINITION OF SHAREWARE SOFTWARE 
  2650.  
  2651. Shareware Software distribution gives users a chance to try software before 
  2652. buying it.  If you try a Shareware software program and continue using it, you 
  2653. are expected to register.  Individual programs differ on details -- some 
  2654. request registration while others require it, some specify a maximum trial 
  2655. period.  With registration, you get anything from the simple right to continue 
  2656. using the software to an updated program with printed manual. 
  2657.  
  2658.  
  2659. ΓòÉΓòÉΓòÉ 11.1. Copyright ΓòÉΓòÉΓòÉ
  2660.  
  2661. Copyright laws apply to both Shareware and commercial software, and the 
  2662. copyright holder retains all rights, with a few specific exceptions as stated 
  2663. below.  Shareware software authors are accomplished programmers, just like 
  2664. commercial authors, and the programs are of comparable quality.  (In both 
  2665. cases, there are good programs and bad ones!)  The main difference is in the 
  2666. method of distribution.  The author specifically grants the right to copy and 
  2667. distribute the software, either to all and sundry or to a specific group.  For 
  2668. example, some authors require written permission before a commercial disk 
  2669. vendor may copy their Shareware software. 
  2670.  
  2671.  
  2672. ΓòÉΓòÉΓòÉ 11.2. Distribution. ΓòÉΓòÉΓòÉ
  2673.  
  2674. Shareware software is a distribution method, not a type of software.  You 
  2675. should find software that suits your needs and pocketbook, whether it's 
  2676. commercial or Shareware software.  The Shareware software system makes fitting 
  2677. your needs easier, because you can try before you buy.  And because the 
  2678. overhead is low, prices are low also.  Shareware software has the ultimate 
  2679. money-back guarantee -- if you don't use the product, you don't pay for it. 
  2680.  
  2681.  
  2682. ΓòÉΓòÉΓòÉ 12. Disclaimer ΓòÉΓòÉΓòÉ
  2683.  
  2684. DISCLAIMER - AGREEMENT 
  2685.  
  2686. Users of RexxBase must accept this disclaimer of warranty:  "REXXBASE IS 
  2687. SUPPLIED AS IS.  AMERICAN CODERS DISCLAIMS ALL WARRANTIES, EXPRESSED OR 
  2688. IMPLIED, INCLUDING, WITHOUT LIMITATION, THE WARRANTIES OF MERCHANTABILITY AND 
  2689. OF FITNESS FOR ANY PURPOSE.  AMERICAN CODERS LTD.  ASSUMES NO LIABILITY FOR 
  2690. DAMAGES, DIRECT OR CONSEQUENTIAL, WHICH MAY RESULT FROM THE USE OF REXXBASE." 
  2691.  
  2692.  
  2693. ΓòÉΓòÉΓòÉ 13. Sharing RexxBase ΓòÉΓòÉΓòÉ
  2694.  
  2695. RexxBase is a "Shareware software program" and is provided at no charge to the 
  2696. user for evaluation.  Feel free to share it with your friends, but please do 
  2697. not give it away altered or as part of another system.  The essence of 
  2698. "user-supported" software is to provide personal computer users with quality 
  2699. software without high prices, and yet to provide incentive for programmers to 
  2700. continue to develop new products.  If you find this program useful and find 
  2701. that you are using RexxBase and continue to use RexxBase after a reasonable 
  2702. trial period of 30 days, you must make a registration payment of $95.00 to 
  2703. American Coders, Ltd.  The $95.00 registration fee will license one copy for 
  2704. use on any one computer at any one time.  You must treat this software just 
  2705. like a book.  An example is that this software may be used by any number of 
  2706. people and may be freely moved from one computer location to another, so long 
  2707. as there is no possibility of it being used at one location while it's being 
  2708. used at another.  Just as a book cannot be read by two different persons at the 
  2709. same time. 
  2710.  
  2711.  
  2712. ΓòÉΓòÉΓòÉ 13.1. Commercial Users ΓòÉΓòÉΓòÉ
  2713.  
  2714. Commercial users of RexxBase must register and pay for their copies of RexxBase 
  2715. within 30 days of first use or their license is withdrawn.  Site-License 
  2716. arrangements may be made by contacting American Coders, Ltd. 
  2717.  
  2718.  
  2719. ΓòÉΓòÉΓòÉ 13.2. Distributing ΓòÉΓòÉΓòÉ
  2720.  
  2721. Anyone distributing RexxBase for any kind of remuneration must first contact 
  2722. American Coders, Ltd. at our address below for authorization.  This 
  2723. authorization will be automatically granted to distributors recognized by the 
  2724. (ASP) as adhering to its guidelines for shareware distributors, and such 
  2725. distributors may begin offering RexxBase immediately (However American Coders, 
  2726. Ltd.  must still be advised so that the distributor can be kept up-to-date with 
  2727. the latest version of RexxBase.). 
  2728.  
  2729.  
  2730. ΓòÉΓòÉΓòÉ 13.3. Pass Along ΓòÉΓòÉΓòÉ
  2731.  
  2732. You are encouraged to pass a copy of RexxBase along to your friends for 
  2733. evaluation.  Please encourage them to register their copy if they find that 
  2734. they can use it.  All registered users will receive a copy of the latest 
  2735. version of the RexxBase system.