home *** CD-ROM | disk | FTP | other *** search
/ DP Tool Club 17 / CD_ASCQ_17_101194.iso / vrac_os2 / rxbas134.zip / REXXBASE.INF (.txt) < prev    next >
OS/2 Help File  |  1994-09-08  |  76KB  |  3,443 lines

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