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