home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: InfoMgt / InfoMgt.zip / mbupd108.zip / RXDbase.doc < prev    next >
Text File  |  1997-08-19  |  29KB  |  830 lines

  1. RXDbase: A NetRexx DB class implementation  1.0 - Max Marsiglietti 1996,97.
  2.  
  3. This is the official RXDbase documentation. You'll find here all the 
  4. information you need for using the RXDbase library for NetRexx.
  5.  
  6. To get best results in visualization of this document, use a monospaced font.
  7. English is not my language, as ever. :)
  8.  
  9. INDEX:
  10.  1.... Introduction
  11.   1.1.   - What is RXDbase.
  12.  
  13.  
  14.  2.... Use of the RXDbase class 
  15.   2.1    - in Java.
  16.   2.2    - in NetRexx.
  17.   2.3    - A detailed explanation of all the methods.
  18.    2.3.2   ** RXDbase constructors in NetRexx **
  19.    2.3.3   ** The CONNECT method **
  20.    2.3.4   ** The DISCONNECT method **
  21.    2.3.5   ** The STATUS method **
  22.    2.3.6   ** The SAVEREC method **
  23.    2.3.7   ** The LOADREC method **
  24.    2.3.8   ** The MODIREC method **
  25.    2.3.9   ** The DELEREC method **
  26.    2.3.10  ** The GETDBINFO method **
  27.    2.3.11  ** The GETDBSTATS method **
  28.    2.3.12  ** The DELETEDB method **
  29.    2.3.13  ** The GLOBALREBUILDIDX method **
  30.    2.3.14  ** The REBUILDIDX method **
  31.    2.3.15  ** The ADDFIELD method **
  32.    2.3.16  ** The DELFIELD method **
  33.    2.3.17  ** The MODFIELDIDX method **
  34.    2.3.18  ** The PACK method **
  35.    2.3.19  ** The GETDBSTATUS method **
  36.    2.3.20  ** The DEFINEFILTER method **
  37.    2.3.21  ** The LOADRECWITHFILTER method **
  38.    2.3.22  ** The MODFIELDNAME method **
  39.    2.3.23  ** The MODFIELDLENGTH method **
  40.  
  41.  
  42.  
  43.  3.... Other stuff
  44.   3.1    - This package contents.
  45.   3.2    - License.
  46.   3.3    - Contacting the author.
  47.   3.4    - Release History.
  48.  
  49.  
  50.  
  51. 1. I N T R O D U C T I O N
  52. --------------------------
  53.  
  54. Notice: NetRexx, OS/2 are copyright of IBM Corp.
  55.         JAVA is a copyright of SUN Microsystems, Inc.
  56.  
  57. Other trademarks in this document are owned by the respective companies.
  58. Whatever. :)
  59.  
  60. NetRexx is a great language, promising to be a 'better Java than Java';
  61. it lacks nonetheless the file I/O APIs.
  62. That's why I've started some months ago to develop RXFile, a NetRexx class
  63. that implements linein, stream, chars and all the rest, plus some other
  64. bonuses. Opening and closing files all day long is anyway no great fun;
  65. there is the need to have a little database handy for all those situations
  66. where JDBC is overkill. Why not to do it directly in NetRexx, then?
  67.  
  68.  
  69.  
  70. 1.1 What is RXDbase.
  71. --------------------
  72.  
  73. My goal is to provide a simple yet efficient database class which will have
  74. the following features:
  75.  
  76.  *) Fixed length fields (this feat may be removed by popular demand).
  77.  *) ISAM and B+Tree indexing.
  78.  *) string-oriented.
  79.  *) easy to use.
  80.  
  81. I did drop the following feature:
  82.  
  83.  *) will have some tools to link a dbase to another (i.e. client + article = sale)
  84.  
  85. Because I plan to insert it into a separate package, to make them better than a timid
  86. attempt to link a couple of databases.
  87.  
  88. It requires RXFile up-to-date, but one copy of this latter is always distributed 
  89. with the RXDbase package; it can be used both from Java (by installing the NetRexx
  90. classes) that from NetRexx (NetRexx is really a translator that generates Java code).
  91. If you ask me what of the two to use, I'll tell you 'NetRexx'.
  92.  
  93. Check by yourself at http://www2.hursley.ibm.com/netrexx/
  94.  
  95.  
  96.  
  97. 2. U S E  O F  T H E  R X D B A S E  C L A S S 
  98. ----------------------------------------------
  99.  
  100.  
  101. 2.1 In JAVA:
  102. ------------
  103.  
  104. Just make sure that your Java environment variables
  105. knows where RXDbase.class is stored, then you can just
  106. add this line to your source:
  107.  
  108. import RXDbase;
  109.  
  110. along with the required NetRexx imports.
  111.  
  112.  
  113. 2.2 In NetRexx:
  114. ---------------
  115.  
  116.  import RXDbase
  117.  
  118. Is required in your NetRexx source file.
  119.  
  120.  
  121.  
  122. 2.3 A detailed explanation of all the methods.
  123. ----------------------------------------------
  124.  
  125.  Why did I state 'methods', and not also 'properties' or 'exceptions' ?
  126. Simply put, the RXDbase class has no public properties (variables), 
  127. and doesn't throw exceptions. Instead, it has methods to find out
  128. if there have been errors, and to query the value of some properties.
  129.  
  130.  
  131. 2.3.1 Before we begin
  132. ---------------------
  133.  
  134. Warning: in this version (0.4) I have changed the syntax of most functions.
  135. This was done because I've added indexes; a great amount of new code has
  136. been written, and while I've managed to keep this package very simple to
  137. use, I had nonetheless to change something also at functions level.
  138. If I can, I'll try not to change anymore the syntax of the functions in
  139. the future; I am pretty confident to succeed, since only a few things
  140. are missing from the code base.
  141. The data format also has changed, so you can't migrate your existing database 
  142. to this new release format. I _promise_ not to change this format anymore.
  143.  
  144. Update: As of release 0.55 I had to change the file format of the RXDbase, because the RXDbase itself has completed the beta stage. RXDbase was given to an Italian firm which produces OS/2 software - it will be included in a commercial package. 
  145. But since RXDbase was derived from a Rexx library that I developed some years ago independently from that firm, I am now porting directly that library, while maintaining the RXDbase syntax and structures. The only thing that will change is the file format, and this already happened it this release. Speaking about file format you will notice that starting from this release I have dropped the use of a .def file, and I don't plan to return to it since the new file format works better without. One advantage of the new file format is that the database can be seen more easily by the programs that can read ascii databases, such as StarOffice from Star Division. 
  146.  
  147. Update: As of release 0.81 I had to change the file format - once again - to accomodate for the presence
  148. on two new features: NO NULLS and NO DUPLICATES.
  149.  
  150. Note: As you may know, the newline sequence is not standard among the operating
  151. systems. I.e., in Unix it's \n, in DOS-Win-OS/2 is \r\n, in Macs is \r etc.
  152. Since the RXDbase format is something like:
  153.  
  154. Y:N|field|..|field<newline>
  155.  
  156. [Where 'Y' at the begin of the line means that the record is valid, and
  157. 'N' means that the record is currently about to be discarded (it is
  158. marked as deleted)]
  159.  
  160. You may think you have to care about what <newline> you will have to use;
  161. the answer is no, RXDbase automatically sets the correct newline 
  162. (currently \n, \r and \r\n are supported, since I know of these) for your system.
  163.  
  164. Cute heh?
  165.  
  166. Limitations: 
  167. *) you cannot have currently more than 1000 fields in a record [upped from 256].
  168. *) you have to have at least an index, but you can choose the type (ISAM or B+Tree).
  169.    (Current limitation: only the ISAM indexing has been implemented)
  170. *) still to do: B+Tree indexing, some neat 'search' function, expanding
  171.    the docs/examples,  providing a function to correct errors in the
  172.    database.
  173.  
  174. In this document all the calls are documented with Java parameter/return
  175. convention. You should be able to guess the correspondant NetRexx syntax.
  176. If you need more help, look at the examples.
  177.  
  178. A note about names:
  179. a database is a collection of records, a record is a collection of fields.
  180.  
  181.     the whole database
  182.  ------------|-------------
  183. /                          \
  184. -------------+-------------+
  185. Massimiliano | Marsiglietti|  <--- A record (_that_ person)
  186. -------------+-------------|
  187. Cristina     | Severi      |
  188. -------------+-------------+
  189.   |
  190.   \---- A field (name of a person)
  191.  
  192.  
  193. 2.3.2 ** RXDbase constructors in NetRexx **
  194. -------------------------------------------
  195.  
  196. Note that the semicolon is optional:
  197.  
  198. MyDB = RXDbase();
  199.  
  200. or
  201.  
  202. MyDB = RXDbase(Rexx rName, Rexx[][] rRec)
  203. MyDB = RXDbase(Rexx rName)
  204.  
  205. The above two constructors works as in the CONNECT method.
  206.  
  207.  
  208. The default return strings for the following functions are: 
  209.  DBNOTSTARTED:              (can't work on nothing)
  210.  READY:                     (no errors)
  211.  SYNTAX ERROR:              (go figure)
  212.  ERROR:FILE ACCESS PROBLEMS (something weird at file level)
  213.  
  214. Unless stated otherwise. More error codes will be introduced as
  215. the RXDbase will be enhanced.
  216.  
  217.  
  218. 2.3.3   ** The CONNECT method **
  219. ---------------------------------
  220.  
  221. This method is the very first to issue, if you have not instantiated
  222. an RXDbase variable with the two-parameters or one-parameter constructor.
  223. If you have, you can omit this method.
  224.  
  225. Syntax:
  226. Rexx connect(Rexx rName, Rexx[][] rRec)
  227.  
  228. Where:
  229. rName is the name of the file _without_any_extension_ that is
  230. hosting/will host the database on the disk.
  231. RXDbase will add the file name extension '.dat' to this name.
  232.  
  233. rRec is a bi-dimensional Rexx array that has to be built this way:
  234.  
  235. rRec[0][0]   --> Number of fields in the database.
  236. rRec[n][0]   --> Length (a whole number stored in a Rexx variable) of field 'n'.
  237. rRec[n][1]   --> Name of field 'n' (it will be used later).
  238. rRec[n][2]   --> Indexing method of the field: it can be any of the following:
  239.                  ISAM = Indexed Sequential Access Method, good if you need
  240.                         to work on the database ordered on this field.
  241.                  B+TREE = Balanced binary tree. Useful if you need to look
  242.                           for a single item quickly. NOT YET IMPLEMENTED.
  243.                  NONE = when you don't do much operations on this field.
  244.  
  245. More on the indexing: if you want a field not to allow null values or duplicate
  246. values, you should append an '1' or a '0' to the indexing string like here:
  247.  
  248. ISAM00 = ISAM indexing, duplicate and null values are allowed.
  249. ISAM11 = ISAM indexing, duplicate and null values are NOT allowed.
  250. ISAM10 = ISAM indexing, duplicate values are NOT allowed, null values are.
  251. ISAM01 = ISAM indexing, duplicate values are allowed, null values are NOT.
  252. NONE0  = No indexing, null values are allowed.
  253. NONE1  = No indexing, null values are NOT allowed.
  254.  
  255. As you may have noticed, you cannot specify 'no duplicate values' for the
  256. no-index strategy of indexing.
  257.  
  258.  
  259. Notes: 
  260. *) you cannot have currently more than 1000 fields in a record.
  261. *) you have to have at least an index, but you can choose the type (ISAM or B+Tree).
  262.    (Current limitation: only the ISAM indexing has been implemented)
  263. *) when you create a database, several files will be created.
  264.    One, .dat is the real data base; then, you have a file for every index. 
  265.    This was done for speed.
  266.  
  267. Syntax:
  268. Rexx connect(Rexx rName)
  269.  
  270. This method simply connects to an existing database.
  271.  
  272.  
  273. 2.3.4   ** The DISCONNECT method **
  274. ------------------------------------
  275.  
  276. Simply put, this method closes all the db activities for the
  277. database being used.
  278.  
  279. Syntax:
  280. Rexx disconnect()
  281.  
  282.  
  283. 2.3.5   ** The STATUS method **
  284. --------------------------------
  285.  
  286. With this method, you can query the internal status of
  287. the database (ready, dbnotstarted, etc).
  288.  
  289. Syntax:
  290. Rexx status()
  291.  
  292.  
  293. 2.3.6   ** The SAVEREC method **
  294. ---------------------------------
  295.  
  296. This method lets you write a record on disk.
  297. All of the indexes are automatically updated.
  298.  
  299. Syntax:
  300. Rexx saverec(Rexx[][] rToSave, Rexx rMode)
  301.  
  302. Where rMode can only be 'overwrite' or 'append' (case isn't 
  303. significative). 
  304.  
  305. rToSave is to be built this way:
  306.  
  307. rToSave[0,0]  --> number of records to be written.
  308. rToSave[n,m]  --> field n of record m. 
  309.                   Warning: both n,m are to start from 1 (one).
  310.  
  311. Warning: When you specify 'overwrite', _the_whole_database_
  312. will be overwritten (deleted), and the indexes will be resetted.
  313.  
  314. Returns:
  315.  
  316. An appropriate error message is shown in case of errors, else you 
  317. will be returned a Rexx string, in which every character is
  318. either '0' or '1', where '0' means that the specified record
  319. was not succesfully saved (a null value where nulls weren't allowed,
  320. or a duplicate value where there sholdn't be any) and a '1' means
  321. that the record was saved succesfully.
  322. The position of the character is corresponding to the passed record 
  323. number, ie if I try to save 3 record and I get '010', that means
  324. that only the 2-nd record among the ones passed to SAVEREC was saved 
  325. succesfully.
  326.  
  327.  
  328.  
  329. 2.3.7   ** The LOADREC method **
  330. ---------------------------------
  331.  
  332. Loadrec loads in memory a number of records from the
  333. database.
  334.  
  335. Syntax:
  336. Rexx[][] loadrec(Rexx rIdx, Rexx rHowManyRec, Rexx rStart, boolean bForward)
  337.  
  338. Where:
  339. rIdx         --> an EXISTING index to use as a reference. It can be a number
  340.                  (i.e. rIdx = 1 means 'the index on the first field')
  341.                  or a name (that field's EXACT name, i.e. "Name").
  342. rHowManyRec  --> the number of the records to be loaded, ie '72'.
  343.                  It can also have the value 'ALL', meaning you
  344.                  want all of the records from rStart on.
  345. rStart       --> starting record. The first record is labeled '1'.
  346.                  A valid value for this variable is also 'LAST', which
  347.                  means 'go to the last record'.
  348. bForward     --> If "1", it means take rHowManyRec records starting from rStart on,
  349.                  else it means take them from rStart back.
  350.  
  351. It returns a bidimensional array which is made this way:
  352.  
  353. rArray[0,0]  --> number of records fitting the filter condition (= total number of
  354.                  records in the archive, if no filter is present).
  355. rArray[0,1]  --> number of returned records. All the returned records are active,
  356.                  i.e. not deleted.
  357. rArray[n,m]  --> field n of record m (m = 1 to rArray[0,0]).
  358. rArray[N+1, m] --> "Y" or "N", depending on the given record: "Y" means active,
  359.                    "N" means deleted (only active records are returned, as of this
  360.                    release).
  361. rArray[N+2, m] --> position of the m-th record on the archive (NOT on the index).
  362. rArray[N+3, m] --> position of the m-th record on the used index (NOT on the archive);
  363.                    this information is meaningless if a filter (see DEFINEFILTER) 
  364.                    is present.
  365.  
  366. Notes:
  367.  
  368. When you have defined a filter (see DEFINEFILTER), 
  369. rToLoad[0, 0] is the total number of records FOUND
  370. by the query, rToLoad[0, 1] the total number of
  371. records REPORTED by the query. E.g. if you want to
  372. get all the people whose name begins with "m" but
  373. you want to skip the first 10, rToLoad[0, 0] would
  374. report, say, 100, while rToLoad[0, 1] would report
  375. 90.
  376.  
  377. When you delete a record, you only mark it 'deleted', 
  378. and in fact you can undelete it, unless you use the PACK 
  379. function.
  380.  
  381. The 'z+1'-th field, where 'z' is the total number of fields, 
  382. will be a 'V' or 'D'. The latter means 'Deleted', the former 'Valid'.
  383. You shouldn't get 'D'eleted records, since you load by means of
  384. the index, which doesn't tracks deleted fields.
  385.  
  386. The 'z+2'-th field, where 'z' is the total number of fields, 
  387. is the real record's position in the database.
  388.  
  389. The 'z+3'-th field, where 'z' is the total number of fields, 
  390. is the record's position in the index used for loadrec.
  391.  
  392.  
  393. 2.3.8   ** The MODIREC method **
  394. ---------------------------------
  395.  
  396. Modirec is used to modify one or more records in the database.
  397.  
  398. Syntax:
  399. Rexx modirec(Rexx[][] rToModi)
  400.  
  401. rToModi is to be built this way:
  402.  
  403. rToModi[0][0]  --> Number of records to be modified
  404. rToModi[n][m]  --> field n of the m-th record to be
  405.                    modified. n and m always start from 1 (one).
  406. rToModi[0][m]  --> ACTUAL number of the record in the database
  407.                    (NOT A NUMBER RELATIVE TO AN INDEX)
  408.                    to be overwritten. The first record in
  409.                    the database is marked as '1'.
  410.  
  411. Warning: this method doesn't update single fields,
  412. it overwrites whole records.
  413.  
  414. Note: there is not an order on the records to be modified,
  415. i.e. you can have:
  416.  
  417. rToModi[0][1] = 5
  418. rToModi[0][2] = 3
  419. rToModi[0][3] = 18
  420.  
  421. Returns:
  422.  
  423. An appropriate error message is shown in case of errors, else you 
  424. will be returned a Rexx string, in which every character is
  425. either '0' or '1', where '0' means that the specified record
  426. was not succesfully saved (a null value where nulls weren't allowed,
  427. or a duplicate value where there sholdn't be any) and a '1' means
  428. that the record was saved succesfully.
  429. The position of the character is corresponding to the passed record 
  430. number, ie if I try to save 3 record and I get '010', that means
  431. that only the 2-nd record among the ones passed to MODIREC was saved 
  432. succesfully.
  433.  
  434.  
  435.  
  436. 2.3.9   ** The DELEREC method **
  437. ---------------------------------
  438.  
  439. Delerec is used to delete/undelete one or more records.
  440.  
  441. Syntax:
  442. Rexx delerec(Rexx[] rToDele, boolean bDelete)
  443.  
  444. rToDele[0] has to be the total number of records to be
  445. (un)deleted, and rToDele[n] is the ACTUAL position of 
  446. the n-th record to be (un)deleted on the database
  447. (NOT A NUMBER RELATIVE TO AN INDEX). 
  448. The first record on the database is 1 (one).
  449.  
  450. When bDelete = 1, the records are to be deleted,
  451. when bDelete = 0, the records are to be undeleted.
  452.  
  453. No errors will come by deleting an already deleted record,
  454. or the other way around.
  455.  
  456. Modirec returns one of the standard RXDbase error codes.
  457.  
  458.  
  459. 2.3.10  ** The GETDBINFO method **
  460. -----------------------------------
  461.  
  462. This method returns the database structure (names and field
  463. length, along with the number of fields).
  464.  
  465. Syntax:
  466. Rexx[][] getdbinfo()
  467.  
  468. The returned values are: (let's say we stored the contents in rRec[][])
  469.  
  470. rRec[0][0]   --> Number of fields in the database.
  471. rRec[n][0]   --> Length (a whole number stored in a Rexx variable) of field 'n'.
  472. rRec[n][1]   --> Name of field 'n'.
  473. rRec[n][2]   --> Indexing method of the field: it can be any of the following:
  474.                  ISAMXX = Indexed Sequential Access Method, good if you need
  475.                           to work on the database ordered on this field.
  476.                           XX = 00, 01, 10, 11.
  477.                  B+TREE = Balanced binary tree. Useful if you need to look
  478.                           for a single item quickly. NOT YET IMPLEMENTED.
  479.                  NONEX = when you don't do much operations on this field.
  480.                          X = 0, 1.
  481. See the "connect" method for a listing of valid XX, X values.
  482.  
  483.  
  484.  
  485.  
  486. 2.3.11  ** The GETDBSTATS method **
  487. ------------------------------------
  488.  
  489. This method returns some useful statistics about the database.
  490.  
  491. Syntax:
  492. Rexx[] getdbstats()
  493.  
  494. This function returns a vector in which:
  495.  
  496. Element 0 is the db size in bytes.
  497. Element 1 is the record size in bytes.
  498. Element 2 is the total number of records in the database.
  499. Element 3 is the number of active records (not marked with 'D') in the database.
  500.  
  501.  
  502.  
  503. 2.3.12  ** The DELETEDB method **
  504. ----------------------------------
  505.  
  506. This method deletes an entire database, indexes and all.
  507.  
  508. Syntax:
  509. Rexx deletedb(Rexx rDbName)
  510.  
  511.  
  512.  
  513. 2.3.13  ** The GLOBALREBUILDIDX method **
  514. ---------------------------------------
  515.  
  516. With this method you can rebuild all the indexes of the database currently in use.
  517. Useful to correct errors, or to restore all the indexes after a backup+restore.
  518. (This way if you need to backup your archives, you can backup only the .dat file,
  519. and issueing the globalrebuildidx method after the restore you will get back all of
  520. your indexes).
  521.  
  522. Syntax:
  523. Rexx globalrebuildidx()
  524.  
  525. Note: It may take some time to execute.
  526.  
  527.  
  528.  
  529. 2.3.14  ** The REBUILDIDX method **
  530. ------------------------------------
  531.  
  532. This method is similar to globalrebuildidx, but must be invoked explicitly on an index.
  533.  
  534. Syntax:
  535.  
  536. Rexx rebuildidx(Rexx rFieldName)
  537.  
  538. Note: As ever, rFieldName can be the name of the field (ie, 'name') or the number which
  539. references the field (ie, '4', if the 4-th field is 'name').
  540.  
  541.  
  542.  
  543. 2.3.15  ** The ADDFIELD method **
  544. ----------------------------------
  545.  
  546. With this method you can add a field to a database; you can also specify an
  547. index, which will be built automatically for you.
  548.  
  549. Syntax:
  550.  
  551. Rexx addfield(Rexx rFieldName, Rexx rFieldLength, Rexx rFieldIndexingMethod)
  552.  
  553. Notes: Don't use names already in use in the same database, and specify a valid
  554. indexing method (currently supported: "ISAMxx" and "NONEx"); The new fields' contents
  555. will be blank for all records (of course).
  556. See the "connect" method for a listing of valid XX, X values.
  557.  
  558.  
  559.  
  560. 2.3.16  ** The DELFIELD method **
  561. ----------------------------------
  562.  
  563. With this method you can delete a field from a database, including indexes (if any).
  564.  
  565. Syntax:
  566.  
  567. Rexx delfield(Rexx rFieldName)
  568.  
  569. Note: As ever, rFieldName can be the name of the field (ie, 'name') or the number which
  570. references the field (ie, '4', if the 4-th field is 'name').
  571.  
  572. Warning: The field will disappear *physically* from the archive. No undo, no restore, zippo.
  573.  
  574.  
  575.  
  576. 2.3.17  ** The MODFIELDIDX method **
  577. -------------------------------------
  578.  
  579. Modfieldidx lets you modify the indexing method for a given, existing, field.
  580. It automatically rebuilds the index, if passing from no index to some kind of index.
  581. It is useful if you decide that you don't need anymore an index, or if you think
  582. that you should have put an index on a field at database definion time, but you
  583. didn't.
  584.  
  585. Syntax:
  586.  
  587. Rexx modfieldidx(Rexx rFieldName, Rexx rFieldIndexingMethod)
  588.  
  589. Note: rFieldIndexingMethod can be one of the following: "ISAMXX", "NONEX".
  590. See the "connect" method for a listing of valid XX, X values.
  591.  
  592.  
  593.  
  594. 2.3.18  ** The PACK method **
  595. ------------------------------
  596.  
  597. When you delete a record by means of the DELEREC function, that record doesn't physically
  598. get deleted from the archive, it is instead marked as 'deleted'.
  599. PACK does what the name says, it permanently deletes records from the archive, updating
  600. automatically all the indexes.
  601.  
  602. Syntax:
  603.  
  604. Rexx pack()
  605.  
  606.  
  607.  
  608. 2.3.19  ** The GETDBSTATUS method **
  609. -------------------------------------
  610.  
  611. This method lets you retrieve the RXDbase revision and the presence of a filter.
  612.  
  613. Syntax:
  614.  
  615. Rexx[] getdbstatus()
  616.  
  617. Returns:
  618.  
  619. rVar[0] = "No Filter" or "Filter Present" or "No DB loaded"
  620. rVar[1] = RXDbase version number (e.g. "RXDbase 1.0 Max Marsiglietti 1997").
  621.  
  622.  
  623.  
  624. 2.3.20  ** The DEFINEFILTER method **
  625. --------------------------------------
  626.  
  627. By means of this method you can specify a filter with which all subsequent LOADREC calls
  628. will have to comply.
  629.  
  630. Syntax:
  631.  
  632. Rexx definefilter(Rexx[])
  633.  
  634. Parameters:
  635.  
  636. rVar[0] = number of filter conditions.
  637. rVar[1] .. [N] = The filter conditions.
  638.  
  639. Note:
  640. Valid filter conditions are:
  641. <fieldname> <operator> <value>
  642.  
  643. Where <fieldname> is a valid field name, e.g. 'Name'.
  644.       <operator> can be one of the following: =,<>,>,>=,<,<=
  645.       <value> is a valid value for that field, e.g. 'Robert'
  646.  
  647. Wildcards are allowed only for the = and <> operators, and they are represented by
  648. the symbol '*', which means "every number of any character".
  649. So, Ro* can be Robert, Ronald, etc. 
  650.     *t can be Matt, Robert, etc.
  651.     M*t can be Matt, mount, etc. (The search is always case-insensitive)
  652.  
  653. You can use only one '*' on a given filter (e.g. you can't query for "Name = *u*i*l*"),
  654. with the notable exception of the form *value*, which means "find a substring anywhere
  655. that is equal to 'value'".
  656. Example: "Telephone = *555*" will search for all phone numbers with a 555 in them.
  657.  
  658. Your filter conditions will not produce anything until the next LOADREC method is issued,
  659. from them on all the calls to LOADREC will use your filter. When requesting records, if
  660. a filter condition is present, the infos about the absolute position on the index of the
  661. records will not be meaningful.
  662.  
  663. If you specify a filter condition when another one is in use, the first one will be
  664. dropped, and the most recent one will be used.
  665.  
  666. Passing an array which has as the 0-th element the null string or the "" value will reset
  667. the filter conditions.
  668.  
  669.  
  670. 2.3.21  ** The LOADRECWITHFILTER method **
  671. -------------------------------------------
  672.  
  673. This method lets you perform a loadrec with a certain filter, then reset the filter to whatever
  674. it was before.
  675.  
  676. Syntax:
  677.  
  678. Rexx[,] loadrecwithfilter(Rexx rIdx, Rexx rHowManyRec, Rexx rStart, boolean bForward, Rexx[] rFilter)
  679.  
  680. The parameters exactly match those for methods LOADREC and DEFINEFILTER.
  681.  
  682.  
  683.  
  684. 2.3.22  ** The MODFIELDNAME method **
  685. --------------------------------------
  686.  
  687. This method lets you change the name of a field.
  688.  
  689. Syntax:
  690.  
  691. Rexx modfieldname(Rexx rOldName, Rexx rNewName)
  692.  
  693. The field with name rOldName will get rNewName name.
  694. Note: As ever, rOldName can be a number (eg. '4' 
  695. meaning the 4th field) or a name (eg. "surname").
  696.  
  697.  
  698. 2.3.22  ** The MODFIELDLENGTH method **
  699. ----------------------------------------
  700.  
  701. This method lets you change the length of a field.
  702.  
  703. Syntax:
  704.  
  705. Rexx modfieldlength(Rexx rFieldName, Rexx rNewLength)
  706.  
  707. Note: All the information in excess of the new length will
  708. be lost.
  709. Note2: As ever, rOldName can be a number (eg. '4' 
  710. meaning the 4th field) or a name (eg. "surname").
  711.  
  712.  
  713.  
  714.  
  715. 3. O T H E R   S T U F F
  716. ------------------------
  717.  
  718.  
  719.  
  720. 3.1 THIS PACKAGE CONTENTS
  721. -------------------------
  722.  
  723. This package should contain:
  724.  
  725.  RXDbase.doc   .. this document.
  726.  RXDbase.class .. the RXDbase class for NetRexx (and Java).
  727.  *.nrx         .. Examples for the RXDbase class.
  728.  RIOXXX.ZIP    .. Latest version (XXX) of RXfile.
  729.  MaxBase.*     .. Latest MaxBase .class file, readme.
  730.  Readme.1st    .. Last addenda. Start there, please.
  731.  NetRexxR.zip  .. NetRexx runtime.
  732.  taligent.zip  .. Some neat widget done by Taligent (www.taligent.com).
  733.  NetRDB.zip    .. Networking utilities and classes.
  734.  
  735.  
  736. 3.2 LICENSE
  737. ------------
  738.  
  739. With "program", it is intended the whole set of .class files included
  740. in this package.
  741.  
  742. If you have received this program as shareware, be warned that you
  743. have a period of 30 days to evaluate it, then you must choose:
  744. 1) if you want to continue using this product, you must pay for it.
  745.  
  746. Please contact the author (see next section) in order to know how to
  747. register. I am dealing with several shareware distributors in order
  748. to let you have the possibility to register this program quickly
  749. and in many ways (via the Web, by snail mail, etc).
  750.  
  751.  Register fees are:
  752.   US Dollars   29 .. for the standard edition (full local database
  753.                       + server able to receive 2 clients at once)
  754.   US Dollars   89 .. for the extended edition (full local database
  755.                       + server able to receive all the clients 
  756.                       it can handle at once)
  757.  
  758. 2) if you don't like this program, or are unable to contact the author,
  759. you *must* stop using the program and you *must* uninstall it after the
  760. 30 days period.
  761.  
  762. 3) If you build an application with RXDbase, a *small* one-time fee
  763. must be paid to the author (contact me for details).
  764.  
  765. 4) Non profit organizations: please contact me for details; discounts
  766. are available.
  767.  
  768. I am not responsible or liable in any way for any damages 
  769. deriving from the use of this product. Use it at your own risk.
  770.  
  771. The sources for RXDbase are not provided, and you cannot modify or disassemble
  772. the class, in any way. Also, you can not re-distribute this program unless
  773. you have the permission of the author (Max Marsiglietti).
  774.  
  775. RXDBase is (c) Max Marsiglietti 1996, 97.
  776.  
  777. See Also Talicense.txt (in the directory where you found this) and license.txt
  778. inside NetRexxR.zip.
  779.  
  780.  
  781.  
  782. 3.3 CONTACTING THE AUTHOR
  783. -------------------------
  784.  
  785. If you find any bug, or have suggestions, please 
  786. report all of your comments to:
  787.  
  788.  Max Marsiglietti, 
  789.  
  790.  E-mail:
  791.   maxmars@pianeta.it (Internet), 2:332/529.12 (Fidonet)
  792.  
  793.  Snail Mail:
  794.   V.Landino 13, 
  795.   41049, Sassuolo (MO)
  796.   Italy.
  797.  
  798.  
  799.  
  800.  
  801. 3.4 History
  802. -----------
  803.  
  804. 1.08 -- Corrected: introduced modifications to the methods in
  805.         order to run RXDbase correctly under Win32 and possibly
  806.         other operating systems. [18-aug-97]
  807. 1.07 -- Corrected: other minor filter failures. Speeded up filter 
  808.         operations, multithreaded the whole class (speeded up the
  809.         saverec/modirec/delerec operations), finished loadrec by
  810.         allowing a direction and a starting point even when working
  811.         with filters. [09-jun-1997]
  812. 1.06 -- Corrected: Minor filter failures. Speeded up filter operations.
  813.         [26-may-1997]
  814. 1.05 -- Corrected the NODUPLICATES behaviour: now also records in the middle
  815.         of an archive are correctly checked for duplicate values. [16-may-97]
  816. 1.04 -- Corrected an error on search functions (weren't case-insensitive).
  817.         [14-may-97]
  818. 1.03 -- Corrected an error on index handling. [8-may-97]
  819. 1.02 -- Corrected errors in the dbf to dat utilities; Updated online reference;
  820.         Enhanced installation program; added .dbf conversion on MaxBase startup;
  821.         added automatical rebuild of indexes on MaxBase startup (only when necessary).
  822.         (4-may-97)
  823. 1.01 -- Added information for registering the software with BTM Micro; corrected a
  824.         small bug with indexes (2-may-1997).
  825. 1.00 -- Initial release (2-may-1997).
  826.  
  827. Thanks, and good work with RXDbase!
  828.  
  829. EOF
  830.