├── .gitattributes ├── .gitignore ├── LICENSE.md ├── README.md ├── docs ├── content │ ├── amemmgt.js │ ├── api.js │ ├── cursors.js │ ├── cycles.js │ ├── escmsgs.js │ ├── example_1.js │ ├── example_2.js │ ├── example_3.js │ ├── examples.js │ ├── installation.js │ ├── introduction.js │ ├── longprnms.js │ ├── mapval.js │ ├── restrict.js │ ├── rm_.js │ ├── rm__.js │ ├── rm__a.js │ ├── rm__aa.js │ ├── rm__d.js │ ├── rm__i.js │ ├── rm__n.js │ ├── rm__p.js │ ├── rm__s.js │ ├── rm__sa.js │ ├── rm__t.js │ ├── rm__x.js │ ├── rm__xp.js │ ├── rm__z.js │ ├── rm_a.js │ ├── rm_a1_.js │ ├── rm_a1__.js │ ├── rm_a2_.js │ ├── rm_a2__.js │ ├── rm_a3_.js │ ├── rm_a3__.js │ ├── rm_a_.js │ ├── rm_a__.js │ ├── rm_aa.js │ ├── rm_aap.js │ ├── rm_add_event_handler.js │ ├── rm_ap.js │ ├── rm_ceq.js │ ├── rm_cge.js │ ├── rm_cgt.js │ ├── rm_cle.js │ ├── rm_clt.js │ ├── rm_cmp.js │ ├── rm_cpy.js │ ├── rm_cpyd.js │ ├── rm_cur.js │ ├── rm_d.js │ ├── rm_d_.js │ ├── rm_d__.js │ ├── rm_dis.js │ ├── rm_fed.js │ ├── rm_fedr.js │ ├── rm_gav.js │ ├── rm_gcf.js │ ├── rm_get.js │ ├── rm_gik.js │ ├── rm_hit.js │ ├── rm_hks.js │ ├── rm_hky.js │ ├── rm_hsn.js │ ├── rm_hsp.js │ ├── rm_i.js │ ├── rm_i1.js │ ├── rm_i1_.js │ ├── rm_i1__.js │ ├── rm_i2.js │ ├── rm_i2_.js │ ├── rm_i2__.js │ ├── rm_i_.js │ ├── rm_i__.js │ ├── rm_inm.js │ ├── rm_ins.js │ ├── rm_ins1.js │ ├── rm_insc.js │ ├── rm_insc1.js │ ├── rm_inscm.js │ ├── rm_insm.js │ ├── rm_insx.js │ ├── rm_insx1.js │ ├── rm_insxm.js │ ├── rm_isa.js │ ├── rm_isaa.js │ ├── rm_isd.js │ ├── rm_isi.js │ ├── rm_isi1.js │ ├── rm_isi2.js │ ├── rm_ism.js │ ├── rm_ismm.js │ ├── rm_isn.js │ ├── rm_isp.js │ ├── rm_isp1.js │ ├── rm_isp2.js │ ├── rm_isp3.js │ ├── rm_iss.js │ ├── rm_issa.js │ ├── rm_ist.js │ ├── rm_isv.js │ ├── rm_isx.js │ ├── rm_isxp.js │ ├── rm_isz.js │ ├── rm_itm.js │ ├── rm_key.js │ ├── rm_m.js │ ├── rm_mm.js │ ├── rm_mmi.js │ ├── rm_mmm.js │ ├── rm_n.js │ ├── rm_n_.js │ ├── rm_n__.js │ ├── rm_nit.js │ ├── rm_num.js │ ├── rm_p.js │ ├── rm_p1.js │ ├── rm_p1_.js │ ├── rm_p1__.js │ ├── rm_p2.js │ ├── rm_p2_.js │ ├── rm_p2__.js │ ├── rm_p3.js │ ├── rm_p3_.js │ ├── rm_p3__.js │ ├── rm_p_.js │ ├── rm_p__.js │ ├── rm_rdn.js │ ├── rm_rdp.js │ ├── rm_remove_event_handler.js │ ├── rm_rmv.js │ ├── rm_rmva.js │ ├── rm_s.js │ ├── rm_s1_.js │ ├── rm_s1__.js │ ├── rm_s2_.js │ ├── rm_s2__.js │ ├── rm_s3_.js │ ├── rm_s3__.js │ ├── rm_s_.js │ ├── rm_s__.js │ ├── rm_sa.js │ ├── rm_sab.js │ ├── rm_sav.js │ ├── rm_sb.js │ ├── rm_scf.js │ ├── rm_sgt.js │ ├── rm_sgtp.js │ ├── rm_sll.js │ ├── rm_slln.js │ ├── rm_t.js │ ├── rm_t_.js │ ├── rm_t__.js │ ├── rm_usrd.js │ ├── rm_v.js │ ├── rm_x.js │ ├── rm_x_.js │ ├── rm_x__.js │ ├── rm_xp.js │ ├── rm_xp_.js │ ├── rm_xp__.js │ ├── rm_z.js │ ├── rm_z_.js │ ├── rm_z__.js │ ├── sortord.js │ ├── threads.js │ ├── usage.js │ └── vectors.js ├── css │ ├── main.css │ └── normalize.min.css └── index.html └── src ├── BUILD.sh ├── LICENSE ├── RPGMAP.BND ├── RPGMAP.RPGLE ├── RPGMAPCVA.t.RPGLE ├── RPGMAPCVAH.RPGLE ├── RPGMAPGDEF.t.RPGLE ├── RPGMAPGMF.t.RPGLE ├── RPGMAPGMFH.RPGLE ├── RPGMAPI001.RPGLE ├── RPGMAPI002.RPGLE ├── RPGMAPI003.RPGLE ├── RPGMAPI051.RPGLE ├── RPGMAPI052.RPGLE ├── RPGMAPI053.RPGLE ├── RPGMAPI054.RPGLE ├── RPGMAPI055.RPGLE ├── RPGMAPI056.RPGLE ├── RPGMAPI057.RPGLE ├── RPGMAPI058.RPGLE ├── RPGMAPI059.RPGLE ├── RPGMAPI060.RPGLE ├── RPGMAPI061.RPGLE ├── RPGMAPI062.RPGLE ├── RPGMAPI063.RPGLE ├── RPGMAPI064.RPGLE ├── RPGMAPI101.RPGLE ├── RPGMAPI102.RPGLE ├── RPGMAPI103.RPGLE ├── RPGMAPI104.RPGLE ├── RPGMAPI151.RPGLE ├── RPGMAPI152.RPGLE ├── RPGMAPI153.RPGLE ├── RPGMAPI154.RPGLE ├── RPGMAPI155.RPGLE ├── RPGMAPI156.RPGLE ├── RPGMAPI157.RPGLE ├── RPGMAPI158.RPGLE ├── RPGMAPI159.RPGLE ├── RPGMAPI160.RPGLE ├── RPGMAPI161.RPGLE ├── RPGMAPI162.RPGLE ├── RPGMAPI163.RPGLE ├── RPGMAPI164.RPGLE ├── RPGMAPLPN.t.RPGLE ├── RPGMAPLPNH.RPGLE ├── RPGMAPMAIN.t.RPGLE ├── RPGMAPRBTC.C ├── RPGMAPRBTC.H ├── RPGMAPRBTC.RPGLE ├── RPGMAPSYS.RPGLE ├── RPGMAPSYSH.RPGLE ├── RPGMAPT000.t.RPGLE ├── RPGMAPT001.t.RPGLE ├── RPGMAPT002.t.RPGLE ├── RPGMAPT003.t.RPGLE ├── RPGMAPVAL.t.RPGLE └── RPGMAPVALH.RPGLE /.gitattributes: -------------------------------------------------------------------------------- 1 | * text eol=lf 2 | *.bin binary 3 | *.zip binary 4 | *.png binary 5 | *.jpg binary 6 | *.jpeg binary 7 | *.RPG linguist-language=RPG 8 | *.RPGLE linguist-language=RPG 9 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # 2 | .DS_Store 3 | .vscode 4 | -------------------------------------------------------------------------------- /LICENSE.md: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2017-2019 John Erps 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy of 6 | this software and associated documentation files (the "Software"), to deal in 7 | the Software without restriction, including without limitation the rights to 8 | use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies 9 | of the Software, and to permit persons to whom the Software is furnished to do 10 | so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS 17 | FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR 18 | COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER 19 | IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 20 | CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 21 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | ## RpgMap v1.2.1 2 | 3 | #### RpgMap implements a versatile in-memory ordered key/value store, like a Java TreeMap or a Python dict, for use with the RPG programming language 4 | 5 | *** 6 | 7 | ### [Docs](https://johnerps.com/RpgMap/docs/index.html) 8 | 9 | *** 10 | 11 | ### License 12 | 13 | RpgMap is [MIT Licensed](LICENSE.md). You may use, distribute and copy it under the license terms. 14 | 15 | File RPGMAPRBTC.C (RedBlackTree implementation) was originally developed by Emin Martinian. 16 | 17 | ### Changes 18 | 19 | * v1.2.1 (march 2019) 20 | 21 | * Dir Source renamed to src. Misc. changes. 22 | 23 | * v1.2.0 (july 2018) 24 | 25 | * New procedures: 26 | 27 | * Fixed bug "obj already contained" in `rm_ins?m`. 28 | 29 | * RPGMAP signature is now "V1" and only changes when the major version number is changed. 30 | 31 | * `rm_??__` to immediately dispose an RpgMap value after unwrapping. 32 | 33 | * `rm_inm (rm_in_map)` to test whether a map or value is (contained) in a map. 34 | 35 | * `rm_mmm (rm_make_map_manually_disposed)` to make a map manually disposed. 36 | 37 | * `rm_mmi (rm_make_map_immutable)` to make a map immutable. 38 | 39 | * v1.1.0 (dec 2017) 40 | 41 | * Start with semver versioning scheme. 42 | 43 | * V2017.3 (sept 2017) 44 | 45 | * Fixed bug which caused procedure `rm_isv` to return *on for a normal map. 46 | 47 | * Maps can have event handlers which listen to "insert" and "remove" events. 48 | 49 | * Values and maps can now have associated "user data", which is an arbitrary integer value between 1 and 65.000. 50 | 51 | * Procedure `rm_sav (rm_set_attr_value)` now accepts up to 100 attribute name/values. 52 | 53 | * Parameter `pos` is now optional for procedures `rm_slln` and `rm_sgtp`. 54 | 55 | * New procedures: 56 | 57 | * `rm_usrd (rm_user_data)` (return user data) returns the user data associated with a map or value. 58 | 59 | * `rm_ismm` (is manually disposed map?) to test whether an object is a manually disposed map. 60 | 61 | * `rm_add_event_handler` (add event handler) to add an event handler to a map. 62 | 63 | * `rm_remove_event_handler` (remove event handler) to remove an event handler from a map. 64 | 65 | * V2017.2 (aug 2017) 66 | 67 | * Many procedures now have a long procedure name besides the short name. The long name 68 | can optionally be used when a more descriptive name is needed. For example `rm_insc` can also be called as `rm_insert_cond`. 69 | 70 | * New procedures: 71 | 72 | * `rm_hit (rm_has_item)` (has item?) to test whether a map has an item equal to a given item. 73 | 74 | * `rm_nit (rm_num_items)` (number of items) which returns the number of items equal to a given item. 75 | 76 | * `rm_gik (rm_get_item_key)` (get item key) which returns the key of the first or last item equal to a given item. 77 | 78 | * V2017.1 (jul 2017) 79 | 80 | * Initial 81 | -------------------------------------------------------------------------------- /docs/content/amemmgt.js: -------------------------------------------------------------------------------- 1 | document.write('\ 2 | \ 3 |

Automatic Memory Management

\ 4 |
\ 5 |

\ 6 | Maps and values must be disposed at some time to free the used memory and not cause memory leaks. \ 7 | To help with that RpgMap implements some simple rules that govern automatic disposal of maps and values.\ 8 |

\ 9 |

\ 10 | Procedure rm_dis is used to explicitly dispose values, maps and cursors.\ 11 |

\ 12 |

\ 13 | Every data type has a rm_??__ procedure (two trailing underscores) to dispose a value immediately \ 14 | after unwrapping.\ 15 |

\ 16 |

\ 17 |  When a value is inserted in a map as key or item and the map is disposed or the key/item pair is removed \ 18 | from the map then the value is disposed.
\ 19 |
\ 20 |  When a value is used as an argument, e.g. as a key when calling rm_get, \ 21 | and the value has not been inserted into a map then the value is immediately disposed after being used.
\ 22 |

\ 23 | Because a value is automatically disposed it can not be inserted into more than one map.\ 24 |

\ 25 |

\ 26 | Maps come in mainly two flavors: automatically (rm_m) or manually (rm_mm) disposed.\ 27 |

\ 28 |

\ 29 |  Automatically disposed maps are governed by the same memory management rules as values.
\ 30 |

\ 31 |

\ 32 | I.e. they\'re disposed when the containing map is disposed or when an automatically disposed map is removed \ 33 | from the map, or when it has been used as an argument and is not contained in a map.\ 34 |

\ 35 |

\ 36 | An automatically disposed map can not be inserted into more than one map.\ 37 |

\ 38 |

\ 39 | The documentation of procedures accepting automatically disposed maps are values as arguments clearly state whether \ 40 | any arguments will be disposed.\ 41 |

\ 42 |

\ 43 | A manually disposed map must always be explicitly disposed with rm_dis. \ 44 | But unlike an automatically disposed map a manually disposed map can be inserted into more than one map.\ 45 |

\ 46 |

\ 47 | A value or an automatically disposed map that has been inserted into a map can not be explicitly disposed \ 48 | with rm_dis, or with one of the rm_??__ procedures.\ 49 |

\ 50 |

\ 51 | When a map is copied (rm_cpy) the copy contains a copy of the \ 52 | values and automatically disposed maps in the original. Manually disposed maps are only copied \ 53 | when a deep copy is made (rm_cpyd).\ 54 |

\ 55 |

\ 56 | Similar to copying a map, when keys/items are inserted from a map (e.g. rm_insm) then \ 57 | only manually disposed maps are directly inserted, while a copy of the values and automatically disposed \ 58 | maps is inserted.\ 59 |

\ 60 |

\ 61 | An automatically disposed map (not a vector) can be made manually disposed with rm_mmm, \ 62 | but not vice versa.\ 63 |

\ 64 | \ 65 | '); 66 | -------------------------------------------------------------------------------- /docs/content/api.js: -------------------------------------------------------------------------------- 1 | document.write('\ 2 | \ 3 |

API

\ 4 |
\ 5 |

\ 6 | The following is the list of all procedures that make up the API of RpgMap. \ 7 | For every procedure the signature is shown which specifies the result type \ 8 | and the parameters. If a procedure has a short and long name then the long name \ 9 | is shown just below the short name.\ 10 |

\ 11 | \ 12 | '); 13 | -------------------------------------------------------------------------------- /docs/content/cursors.js: -------------------------------------------------------------------------------- 1 | document.write('\ 2 | \ 3 |

Cursors

\ 4 |
\ 5 |

\ 6 | Cursors are used to iterate through the key/item pairs of a map. A cursor maintains a current position \ 7 | within the key/item pairs of a map. A cursor must first be created with rm_cur.\ 8 |

\ 9 |

\ 10 | A cursor\'s position can be set with set-lower-limit, rm_sll, or \ 11 | set-greater-than, rm_sgt. Procedures rm_rdn \ 12 | and rm_rdp must be used to read the next or previous key/item pair. \ 13 | Procedures rm_key and rm_itm \ 14 | must be used to read the current key and item.\ 15 |

\ 16 |

\ 17 | A cursor must be disposed with rm_dis, or it is automatically \ 18 | disposed when it\'s associated map is disposed.\ 19 |

\ 20 |

\ 21 | See example 2 and example 3.\ 22 |

\ 23 |

\ 24 | Procedure rm_fed can also be used to iterate through key/item pairs. It uses \ 25 | a cursor under the covers.\ 26 |

\ 27 | \ 28 | '); 29 | -------------------------------------------------------------------------------- /docs/content/cycles.js: -------------------------------------------------------------------------------- 1 | document.write('\ 2 | \ 3 |

Cycles

\ 4 |
\ 5 |

\ 6 | When inserting maps into other maps cycles may be created. For example, when map1 contains map2 \ 7 | which contains map1 again.\ 8 |

\ 9 |

\ 10 | RpgMap does not detect cycles. Care should be taken to avoid them. If a cycle is \ 11 | created then that will likely result in corruption and/or a stack overflow error.\ 12 |

\ 13 | \ 14 | '); 15 | -------------------------------------------------------------------------------- /docs/content/example_1.js: -------------------------------------------------------------------------------- 1 | document.write('\ 2 | \ 3 |

Example 1

\ 4 |
\ 5 |

\ 6 | The following code creates a new map which is immediately populated with 3 key/item pairs, \ 7 | where the keys are dates and the items are packed decimals.\ 8 |

\ 9 |
\
10 | map = rm_m(
\ 11 | rm_d(d\'2017-01-01\') : rm_p(100.50) :
\ 12 | rm_d(d\'2017-05-01\') : rm_p(50) :
\ 13 | rm_d(d\'2017-07-02\') : rm_p(201.10) );
\ 14 |
\ 15 |

\ 16 | An alternative way of creating the same map would be as follows.\ 17 |

\ 18 |
\
19 | map = rm_insert(rm_m() :
\ 20 | rm_d(d\'2017-01-01\') : rm_p(100.50) :
\ 21 | rm_d(d\'2017-05-01\') : rm_p(50) :
\ 22 | rm_d(d\'2017-07-02\') : rm_p(201.10) );
\ 23 |
\ 24 |

\ 25 | Procedure rm_m creates a new map, which is immediately \ 26 | populated. Procedure rm_insert inserts the \ 27 | key/item pairs into the new map, and returns the new map that was passed as the first \ 28 | argument. Procedures that return their first argument, the map/value, can be used for \ 29 | "chaining" procedure calls.\ 30 |

\ 31 |

\ 32 | Procedures rm_d and rm_p \ 33 | create a new RpgMap date value and a new RpgMap packed decimal value, that are inserted into \ 34 | the map as a key and an item. Every supported data type has a rm_?? procedure to \ 35 | create new values, where ?? is 1 or 2 characters that identify the type.\ 36 |

\ 37 |

\ 38 | RPG values are wrapped into RpgMap values using the rm_?? procedures, \ 39 | so that RpgMap can handle values of different types uniformly. Later when these RPG values \ 40 | are needed they are unwrapped again using the rm_??_ procedures, \ 41 | such as rm_d_ and rm_p_ \ 42 | (with trailing underscore).\ 43 |

\ 44 |

\ 45 | To retrieve the item with key 2017-05-01 one of the following statements can be used.\ 46 |

\ 47 |
\
48 | x = rm_get(map: rm_d(d\'2017-05-01\') ); // supports only one key, \'*f\'/\'*l\'
\ 49 | x = rm__( map: rm_d(d\'2017-05-01\') ); // supports mutiple keys
\ 50 | x = rm__d( map: d\'2017-05-01\' ); // " " " without wrapping
\ 51 |
\ 52 |

\ 53 | The date argument for rm_get and rm__ \ 54 | is an RpgMap date value that will be automatically disposed (i.e. released, deallocated). See \ 55 | Automatic Memory Management) for details.\ 56 |

\ 57 |

\ 58 | Variable x is a pointer which now points to the RpgMap packed decimal value, \ 59 | an opaque data structure, that was created with rm_p earlier, \ 60 | and which is still contained in the map. Expression rm_p_(x) (rm_p with \ 61 | trailing underscore) converts (unwraps) the RpgMap packed decimal value x to a real \ 62 | RPG packed decimal value.\ 63 |

\ 64 |

\ 65 | The following statement displays the sum of the items with keys 2017-05-01 and 2017-07-02.\ 66 |

\ 67 |
\
68 | display(%char( rm_p_(rm__d(map:d\'2017-05-01\')) + rm_p_(rm__d(map:d\'2017-07-02\')) ));
\ 69 |
\ 70 |
\ 71 |
\
72 | DSPLY  251.1000
\ 73 |
\ 74 |

\ 75 | When map is not needed anymore we need to dispose it with rm_dispose \ 76 | to release/deallocate/free the memory it is using. This will also dispose all contained values, automatically \ 77 | disposed maps and associated cursors.\ 78 |

\ 79 |
\
80 | rm_dispose(map);
\ 81 |
\ 82 | \ 83 | '); 84 | -------------------------------------------------------------------------------- /docs/content/example_2.js: -------------------------------------------------------------------------------- 1 | document.write('\ 2 | \ 3 |

Example 2

\ 4 |
\ 5 |

\ 6 | The following map has composite keys, consisting of an integer and a date. The dates with \ 7 | key 5 have the "reversed order" property set (with :0).\ 8 |

\ 9 |
\
10 | map = rm_m(
\ 11 | rm_v( rm_i(1) : rm_d(d\'2017-01-01\' ) ) : rm_p(100.50) :
\ 12 | rm_v( rm_i(1) : rm_d(d\'2017-01-05\' ) ) : rm_p(10) :
\ 13 | rm_v( rm_i(1) : rm_d(d\'2017-02-22\' ) ) : rm_p(50) :
\ 14 | rm_v( rm_i(5) : rm_d(d\'2017-01-01\':0) ) : rm_p(15.9) :
\ 15 | rm_v( rm_i(5) : rm_d(d\'2017-02-02\':0) ) : rm_p(7.5) :
\ 16 | rm_v( rm_i(5) : rm_d(d\'2017-03-03\':0) ) : rm_p(80) :
\ 17 | rm_v( rm_i(7) : rm_d(d\'2017-05-01\' ) ) : rm_p(100) :
\ 18 | rm_v( rm_i(7) : rm_d(d\'2017-06-02\' ) ) : rm_p(1) :
\ 19 | rm_v( rm_i(7) : rm_d(d\'2017-07-03\' ) ) : rm_p(5) );
\ 20 |
\ 21 |

\ 22 | A composite key is represented with a "vector" (see Vectors), which \ 23 | is a special kind of map, created with rm_v. The keys of a vector must \ 24 | be all integers and two vectors are compared in a special way. For example, vectors rm_v(rm_i(1):rm_i(2)) \ 25 | and rm_v(rm_i(1)) are considered to be equal. Only the items are specified for rm_v; \ 26 | the keys are implicitly created.\ 27 |

\ 28 |

\ 29 | Iteration is done through cursors, which must first be created with rm_cursor. \ 30 | A cursor maintains a current position within the key/item pairs of a map. The position can be \ 31 | set using rm_setll (set-lower-limit) or rm_setgt \ 32 | (set-greater-than). The next key/item pair can be read with rm_read_next. \ 33 | Procedures rm_key and rm_item are \ 34 | used to retrieve the current key/item.\ 35 |

\ 36 |

\ 37 | The following code simply iterates through all key/item pairs and displays them.\ 38 |

\ 39 |
\
40 | c = rm_setll(rm_cursor(map));
\ 41 | dow rm_read_next(c);
\ 42 | display( %char( rm_i_( rm__i(rm_key(c):1) ) ) +
\ 43 | \'/\' + %char( rm_d_( rm__i(rm_key(c):2) ) ) +
\ 44 | \': \' + %char( rm_p_( rm_item(c) ) );
\ 45 | enddo;
\ 46 |
\ 47 |
\ 48 |
\
49 | DSPLY  1/2017-01-05: 10.0000
\ 50 | DSPLY 1/2017-02-01: 100.5000
\ 51 | DSPLY 1/2017-02-22: 50.0000
\ 52 | DSPLY 5/2017-03-03: 80.0000
\ 53 | DSPLY 5/2017-02-02: 7.5000
\ 54 | DSPLY 5/2017-01-01: 15.9000
\ 55 | DSPLY 7/2017-05-01: 100.0000
\ 56 | DSPLY 7/2017-06-01: 5.0000
\ 57 | DSPLY 7/2017-06-02: 1.0000
\ 58 |
\ 59 |

\ 60 | The cursor should be disposed if it\'s not used anymmore.\ 61 |

\ 62 |
\
63 | rm_dispose(c);
\ 64 |
\ 65 |

\ 66 | The following code iterates through all key/item pairs with integer 5, displays each date, \ 67 | and the sum of the items.\ 68 |

\ 69 |
\
70 | sum = 0;
\ 71 | c = rm_setll(rm_cursor(map):rm_v(rm_i(5)));
\ 72 | dow rm_read_next(c:rm_v(rm_i(5)));
\ 73 | sum += rm_p_(rm_item(c));
\ 74 | display(%char(rm_d_(rm__i(rm_key(c):2))));
\ 75 | enddo;
\ 76 | display(%char(sum));
\ 77 |
\ 78 |
\ 79 |
\
80 | DSPLY  2017-03-03
\ 81 | DSPLY 2017-02-02
\ 82 | DSPLY 2017-01-01
\ 83 | DSPLY 103.4000
\ 84 |
\ 85 |

\ 86 | The keys that were passed as argument to rm_setll and rm_read_next, \ 87 | rm_v(rm_i(5)), are automatically disposed.\ 88 |

\ 89 |

\ 90 | The map is disposed, and associated cursors are also disposed.\ 91 |

\ 92 |
\
93 | rm_dispose(map);
\ 94 |
\ 95 | \ 96 | '); 97 | -------------------------------------------------------------------------------- /docs/content/example_3.js: -------------------------------------------------------------------------------- 1 | document.write('\ 2 | \ 3 |

Example 3

\ 4 |
\ 5 |

\ 6 | The following map represents three loans. Each loan has several attributes such as client \ 7 | name, amount, total payed. A loan can have registered payments, and a call log.\ 8 |

\ 9 |

\
10 | map = rm_m(
\ 11 |
\ 12 | rm_v( rm_d(d\'2017-01-01\') : rm_i(1) ) : rm_m(
\ 13 | rm_a(\'client name\') : rm_s(\'fransen\') :
\ 14 | rm_a(\'amount\') : rm_p(100.90) :
\ 15 | rm_a(\'payed\') : *null :
\ 16 | rm_a(\'creditstop\') : rm_n(*on) )
\ 17 | :
\ 18 | rm_v( rm_d(d\'2017-05-01\') : rm_i(1) ) : rm_m(
\ 19 | rm_a(\'client name\') : rm_s(\'piet\') :
\ 20 | rm_a(\'amount\') : rm_p(50.00) :
\ 21 | rm_a(\'payed\') : rm_p(20.00) :
\ 22 | rm_a(\'creditstop\') : rm_n(*off) :
\ 23 | rm_a(\'payments\') : rm_m(
\ 24 | rm_z(z\'2017-05-05-16.15.00\') : rm_p(15.00) :
\ 25 | rm_z(z\'2017-05-12-12.00.00\') : rm_p(5.00) ) )
\ 26 | :
\ 27 | rm_v( rm_d(d\'2017-05-01\') : rm_i(2) ) : rm_m(
\ 28 | rm_a(\'client name\') : rm_s(\'jan\') :
\ 29 | rm_a(\'amount\') : rm_p(200.00) :
\ 30 | rm_a(\'payed\') : rm_p(10.50) :
\ 31 | rm_a(\'creditstop\') : rm_n(*off) :
\ 32 | rm_a(\'payments\') : rm_m(
\ 33 | rm_z(z\'2017-05-10-10.00.00\') : rm_p(10.50) ) :
\ 34 | rm_a(\'call log\') : rm_m(
\ 35 | rm_z(z\'2017-05-12-15.10.00\') : rm_v(
\ 36 | rm_t(t\'00.10.05\') : rm_s(\'+1-202-555-0195\') : rm_s(\'+
\ 37 | promised to pay 50 next week\') ) :
\ 38 | rm_z(z\'2017-05-23-11.30.00\') : rm_v(
\ 39 | rm_t(t\'00.02.00\') : rm_s(\'+1-202-555-0195\') : rm_s(\'+
\ 40 | pays tomorrow\') ) ) )
\ 41 | );
\ 42 |
\ 43 |

\ 44 | The following code displays each loan\'s client name, all payments, and total call time, \ 45 | from 2017-05-01.\ 46 |

\ 47 |
\
48 | cur1 = rm_sll(rm_cur(map):rm_v(rm_d(d\'2017-05-01\')));
\ 49 | dow rm_rdn(cur1);
\ 50 | k = rm_key(cur1);
\ 51 | i = rm_itm(cur1);
\ 52 | display(rm_s_(rm__a(i:\'client name\')) + \':\');
\ 53 | m = rm__a(i:\'payments\');
\ 54 | if m <> *null;
\ 55 | display(\' payments:\');
\ 56 | cur2 = rm_cur(m);
\ 57 | dow rm_rdn(cur2);
\ 58 | display(\' \' + %char(rm_z_(rm_key(cur2))) +
\ 59 | \': \' + %char(rm_p_(rm_itm(cur2))));
\ 60 | enddo;
\ 61 | rm_dis(cur2);
\ 62 | endif;
\ 63 | m = rm__a(i:\'call log\');
\ 64 | if m <> *null;
\ 65 | x = 0;
\ 66 | cur2 = rm_cur(m);
\ 67 | dow rm_rdn(cur2);
\ 68 | x += %diff(rm_t_(rm__i(rm_itm(cur2):1)):t\'00.00.00\':*minutes);
\ 69 | enddo;
\ 70 | rm_dis(cur2);
\ 71 | display(\' call time: \' + %char(x));
\ 72 | endif;
\ 73 | enddo;
\ 74 | rm_dis(map);
\ 75 |
\ 76 |
\ 77 |
\
78 | DSPLY  piet:
\ 79 | DSPLY payments:
\ 80 | DSPLY 2017-05-05-16.15.00.000000: 15.0000
\ 81 | DSPLY 2017-05-12-12.00.00.000000: 5.0000
\ 82 | DSPLY jan:
\ 83 | DSPLY payments:
\ 84 | DSPLY 2017-05-10-10.00.00.000000: 10.5000
\ 85 | DSPLY call time: 12
\ 86 |
\ 87 | \ 88 | '); 89 | -------------------------------------------------------------------------------- /docs/content/examples.js: -------------------------------------------------------------------------------- 1 | document.write('\ 2 | \ 3 |

Examples

\ 4 |
\ 5 |

\ 6 | Many procedures have both a short name and a long(er) name. Examples 1 and 2 use the long names. \ 7 | Example 3 uses the short names.\ 8 |

\ 9 |

\ 10 | The examples use the following procedure, display.\ 11 |

\ 12 |
\
13 | dcl-proc display;
\ 14 | dcl-pi *n;
\ 15 | text varchar(500) value;
\ 16 | end-pi;
\ 17 | dcl-s t char(52);
\ 18 | t = text;
\ 19 | dsply t;
\ 20 | end-proc;
\ 21 |
\ 22 | \ 23 | '); 24 | -------------------------------------------------------------------------------- /docs/content/installation.js: -------------------------------------------------------------------------------- 1 | document.write('\ 2 | \ 3 |

Installation

\ 4 |
\ 5 |

\ 6 | RpgMap is on Github. It\'s installed by putting library RPGMAP on your i. At the moment RpgMap can \ 7 | only be installed by building it from source. The IBM i version used must be at least 7.2.\ 8 |

\ 9 |

Building library RPGMAP from source

\ 10 |

\ 11 | Download RpgMap-1.2.1.zip and put it somewhere on the IFS, e.g. /home/...
\ 12 | If you didn\'t already, start QSH (QSHELL, not PASE).
\ 13 | Cd into the directory with the zip file.
\ 14 | Unzip the file with jar xvf RpgMap-1.2.1.zip.
\ 15 | Cd into directory "RpgMap-1.2.1/src".
\ 16 | Start the build with chmod +x BUILD.sh && ./BUILD.sh.
\ 17 | This will create the library (default RPGMAP) and the necessary objects in it, using mostly \ 18 | the default system settings such as object owner and authorities.
\ 19 | The last message should say "OK; serviceprogram {lib}/RPGMAP has been created.".\ 20 |

\ 21 |

Changing the alternate sort sequence

\ 22 |

\ 23 | The alternate sort sequence used for values such as rm_aa \ 24 | is determined at build time. Variable SRTSEQ in build script BUILD.sh can be set to the \ 25 | desired sort sequence. By default the RPG module is compiled with altseq(*EXT) and \ 26 | srtseq(*LANGIDSHR).\ 27 |

\ 28 | \ 29 | '); 30 | -------------------------------------------------------------------------------- /docs/content/introduction.js: -------------------------------------------------------------------------------- 1 | document.write('\ 2 | \ 3 |

Introduction

\ 4 |
\ 5 |

\ 6 | In many languages, such as Java or Python, collection types such as maps/dictionaries, \ 7 | lists, etc, are commonly used. They are the workhorses for in-memory data processing.\ 8 |

\ 9 |

\ 10 | RpgMap implements a versatile in-memory ordered key/value store, like a Java TreeMap or \ 11 | a Python dict, for use with the RPG programming language. An RpgMap stores key/item pairs. \ 12 | It associates keys with items. The keys and items in an RpgMap can be values such as \ 13 | integers and dates or other RpgMaps. An RpgMap can contain any mix of types. The key/item \ 14 | pairs are always sorted by key. Items can be retrieved by key very fast because of an \ 15 | efficient red-black tree implementation.\ 16 |

\ 17 |

\ 18 | An RpgMap may contain duplicate keys.\ 19 |

\ 20 |

\ 21 | An RpgMap is simply called a "map" from here on.\ 22 |

\ 23 |

\ 24 | Maps support a rich set of operations, such as different ways of populating (new) maps \ 25 | with keys and items, looking up items by key, testing the existence of keys, iterating \ 26 | through key/item pairs using cursors which support set-lower-limit, set-greater-than, \ 27 | read, read-previous, read-equal semantics, etc.\ 28 |

\ 29 |

\ 30 | Key/item pairs can be inserted and removed while iterating through a map. The behavior \ 31 | is well defined.\ 32 |

\ 33 |

\ 34 | The keys and items in a map can be any mix of maps and values of different types. The \ 35 | supported value types are integer, packed decimal, date, time, timestamp, indicator, \ 36 | (procedure) pointer and character data.\ 37 |

\ 38 |

\ 39 | Besides normal character data, there is an extra "string" value type, which is character data \ 40 | in utf-8 format (text). There is also a special map type, "vector", which is used to represent \ 41 | simple lists or sequences. Because of the way vectors are compared with each other they are \ 42 | especially useful as (partial) composite keys (e.g. a key which consists of a date and an integer).\ 43 |

\ 44 |

\ 45 | A special type of character data or string conforms to an alternate sort (collating) sequence, \ 46 | such as *langidshr, when compared with the same type (see "altseq"/"srtseq" RPG control spec \ 47 | keywords). Values and maps can have the special "reversed order" property, which reverses their \ 48 | sort order when compared to other values and maps. Character data and strings can have the \ 49 | "case insensitive order" property.\ 50 |

\ 51 |

\ 52 | Maps can have one or more attributes. These can be used to store settings and other metadata \ 53 | related to a map.\ 54 |

\ 55 |

\ 56 | Most procedures have short names to facilitate compact code. Many procedures also have \ 57 | a long name that is more descriptive.\ 58 |

\ 59 |

\ 60 | There are some restrictions. Floating point values and zoned decimals are not supported. \ 61 | Character data and strings can not be longer than 30.000 bytes. Integer values can be int(10) \ 62 | or int(20). Packed decimal values can be packed(14:4), packed(28:8) or packed(46:16).\ 63 |

\ 64 | \ 65 | '); 66 | -------------------------------------------------------------------------------- /docs/content/longprnms.js: -------------------------------------------------------------------------------- 1 | document.write('\ 2 | \ 3 |

Short And Long Procedure Names

\ 4 |
\ 5 |

\ 6 | Many procedures have a short name and a long name. The short name can be used for compact code \ 7 | and the long(er) name can be used when a more descriptive name is desired.\ 8 |

\ 9 |

\ 10 | Below is a list of all procedures that have both a short and long name.\ 11 |

\ 12 |
\
13 | rm_inm   : rm_in_map
\ 14 | rm_mmm : rm_make_map_manually_disposed
\ 15 | rm_mmi : rm_make_map_immutable
\ 16 | rm_dis : rm_dispose
\ 17 | rm_ins : rm_insert
\ 18 | rm_ins1 : rm_insert_1
\ 19 | rm_insm : rm_insert_map
\ 20 | rm_insc : rm_insert_cond
\ 21 | rm_insc1 : rm_insert_cond_1
\ 22 | rm_inscm : rm_insert_cond_map
\ 23 | rm_insx : rm_insert_excl
\ 24 | rm_insx1 : rm_insert_excl_1
\ 25 | rm_insxm : rm_insert_excl_map
\ 26 | rm_rmv : rm_remove
\ 27 | rm_rmva : rm_remove_all
\ 28 | rm_cmp : rm_compare
\ 29 | rm_cmpeq : rm_compare_eq
\ 30 | rm_cmplt : rm_compare_lt
\ 31 | rm_cmple : rm_compare_le
\ 32 | rm_cmpgt : rm_compare_gt
\ 33 | rm_cmpge : rm_compare_ge
\ 34 | rm_ : rm_set_prop
\ 35 | rm_hky : rm_has_key
\ 36 | rm_hks : rm_has_keys
\ 37 | rm_num : rm_num_keys
\ 38 | rm_hit : rm_has_item
\ 39 | rm_nit : rm_num_items
\ 40 | rm_gik : rm_get_item_key
\ 41 | rm_cpy : rm_copy
\ 42 | rm_cpyd : rm_copy_deep
\ 43 | rm_cur : rm_cursor
\ 44 | rm_sll : rm_setll
\ 45 | rm_sgt : rm_setgt
\ 46 | rm_rdn : rm_read_next
\ 47 | rm_rdp : rm_read_prev
\ 48 | rm_itm : rm_item
\ 49 | rm_slln : rm_setll_read_next
\ 50 | rm_sgtp : rm_setgt_read_prev
\ 51 | rm_hsn : rm_has_next
\ 52 | rm_hsp : rm_has_prev
\ 53 | rm_fed : rm_for_each_do
\ 54 | rm_fedr : rm_for_each_do_rev
\ 55 | rm_scf : rm_set_comp_fun
\ 56 | rm_gcf : rm_get_comp_fun
\ 57 | rm_sav : rm_set_attr_val
\ 58 | rm_gav : rm_get_attr_val
\ 59 | rm_usrd : rm_user_data
\ 60 |
\ 61 | \ 62 | '); 63 | -------------------------------------------------------------------------------- /docs/content/restrict.js: -------------------------------------------------------------------------------- 1 | document.write('\ 2 | \ 3 |

Restrictions

\ 4 |
\ 5 |

\ 6 | RPG constant RPGMAP_MAXBYTES defines the maximum number of bytes for character and \ 7 | string values, which is 30.000 bytes.\ 8 |

\ 9 |

\ 10 | The following RPG constants define the minimum and maximum value for each numeric \ 11 | value type.\ 12 |

\ 13 |
\
14 | RPGMAP_I1_MIN                       -2147483648
\ 15 | RPGMAP_I1_MAX 2147483647
\ 16 | RPGMAP_I2_MIN -9223372036854775808
\ 17 | RPGMAP_I2_MAX 9223372036854775807
\ 18 | RPGMAP_P1_MIN -9999999999.9999
\ 19 | RPGMAP_P1_MAX 9999999999.9999
\ 20 | RPGMAP_P2_MIN -99999999999999999999.99999999
\ 21 | RPGMAP_P2_MAX 99999999999999999999.99999999
\ 22 | RPGMAP_P3_MIN -999999999999999999999999999999.9999999999999999
\ 23 | RPGMAP_P3_MAX 999999999999999999999999999999.9999999999999999\ 24 |
\ 25 | \ 26 | '); 27 | -------------------------------------------------------------------------------- /docs/content/rm__.js: -------------------------------------------------------------------------------- 1 | document.write('\ 2 | \ 3 |
rm__
  
  Retrieve item with one or more keys
\ 4 |
\
 5 | <<pointer
\ 6 | map pointer value
\ 7 | k01 pointer value options(*nopass)
\ 8 | ...
\ 9 | k10 pointer value options(*nopass)
\ 10 |
\ 11 |

\ 12 |  Like rm_get, but procedures rm__?? retrieve an item using one or more \ 13 | keys. There is a version for each data type, so that the keys can be given \ 14 | as normal RPG data types (although they can\'t be intermixed).
\ 15 |  When multiple keys are given the item is retrieved through one or more \ 16 | nested maps.
\ 17 |  First the item in map with key equal to the first passed key is retrieved. \ 18 | If found and the item is a map and there is a second key passed then the item \ 19 | in this map with key equal to the second key is retrieved, etc. Return the last \ 20 | item retrieved, or *null if a key was not found in a map or if there are more \ 21 | keys passed than there are nested maps.
\ 22 |  Up to 10 keys can be passed. Parameters k01 through k10 are all \ 23 | optional. If none are passed then *null is returned. Keys that are *null \ 24 | are ignored.
\ 25 |  Use procedure rm__ as a generic procedure which accepts keys of any type. \ 26 | Use procedures rm__?? as a shortcut to pass keys as normal RPG values \ 27 | of a certain type. For character and string keys up to 200 bytes can be \ 28 | passed.
\ 29 |  If there are multiple keys equal to key then the first one is selected.
\ 30 |  Procedure rm__ disposes all passed keys automatically, unless a key is \ 31 | a manually disposed map, or a value/map contained in a map.\ 32 |

\ 33 | \ 34 | '); 35 | -------------------------------------------------------------------------------- /docs/content/rm__a.js: -------------------------------------------------------------------------------- 1 | document.write('\ 2 | \ 3 |
rm__a
  
  Retrieve item with one or more char. data keys
\ 4 |
\
 5 | <<pointer
\ 6 | map pointer value
\ 7 | k01 varchar(200) value options(*nopass)
\ 8 | ...
\ 9 | k10 varchar(200) value options(*nopass)
\ 10 |
\ 11 |

\ 12 |  See rm__.\ 13 |

\ 14 | \ 15 | '); 16 | -------------------------------------------------------------------------------- /docs/content/rm__aa.js: -------------------------------------------------------------------------------- 1 | document.write('\ 2 | \ 3 |
rm__aa
  
  Retrieve item with one or more char. data (altseq) keys
\ 4 |
\
 5 | <<pointer
\ 6 | map pointer value
\ 7 | k01 varchar(200) value options(*nopass)
\ 8 | ...
\ 9 | k10 varchar(200) value options(*nopass)
\ 10 |
\ 11 |

\ 12 |  See rm__.\ 13 |

\ 14 | \ 15 | '); 16 | -------------------------------------------------------------------------------- /docs/content/rm__d.js: -------------------------------------------------------------------------------- 1 | document.write('\ 2 | \ 3 |
rm__d
  
  Retrieve item with one or more date keys
\ 4 |
\
 5 | <<pointer
\ 6 | map pointer value
\ 7 | k01 date(*iso-) value options(*nopass)
\ 8 | ...
\ 9 | k10 date(*iso-) value options(*nopass)
\ 10 |
\ 11 |

\ 12 |  See rm__.\ 13 |

\ 14 | \ 15 | '); 16 | -------------------------------------------------------------------------------- /docs/content/rm__i.js: -------------------------------------------------------------------------------- 1 | document.write('\ 2 | \ 3 |
rm__i
  
  Retrieve item with one or more integer keys
\ 4 |
\
 5 | <<pointer
\ 6 | map pointer value
\ 7 | k01 int(20) value options(*nopass)
\ 8 | ...
\ 9 | k10 int(20) value options(*nopass)
\ 10 |
\ 11 |

\ 12 |  See rm__.\ 13 |

\ 14 | \ 15 | '); 16 | -------------------------------------------------------------------------------- /docs/content/rm__n.js: -------------------------------------------------------------------------------- 1 | document.write('\ 2 | \ 3 |
rm__n
  
  Retrieve item with one or more indicator keys
\ 4 |
\
 5 | <<pointer
\ 6 | map pointer value
\ 7 | k01 ind value options(*nopass)
\ 8 | ...
\ 9 | k10 ind value options(*nopass)
\ 10 |
\ 11 |

\ 12 |  See rm__.\ 13 |

\ 14 | \ 15 | '); 16 | -------------------------------------------------------------------------------- /docs/content/rm__p.js: -------------------------------------------------------------------------------- 1 | document.write('\ 2 | \ 3 |
rm__p
  
  Retrieve item with one or more packed decimal keys
\ 4 |
\
 5 | <<pointer
\ 6 | map pointer value
\ 7 | k01 packed(46:16) value options(*nopass)
\ 8 | ...
\ 9 | k10 packed(46:16) value options(*nopass)
\ 10 |
\ 11 |

\ 12 |  See rm__.\ 13 |

\ 14 | \ 15 | '); 16 | -------------------------------------------------------------------------------- /docs/content/rm__s.js: -------------------------------------------------------------------------------- 1 | document.write('\ 2 | \ 3 |
rm__s
  
  Retrieve item with one or more string keys
\ 4 |
\
 5 | <<pointer
\ 6 | map pointer value
\ 7 | k01 varchar(200) ccsid(*utf8) value options(*nopass)
\ 8 | ...
\ 9 | k10 varchar(200) ccsid(*utf8) value options(*nopass)
\ 10 |
\ 11 |

\ 12 |  See rm__.\ 13 |

\ 14 | \ 15 | '); 16 | -------------------------------------------------------------------------------- /docs/content/rm__sa.js: -------------------------------------------------------------------------------- 1 | document.write('\ 2 | \ 3 |
rm__sa
  
  Retrieve item with one or more string (altseq) keys
\ 4 |
\
 5 | <<pointer
\ 6 | map pointer value
\ 7 | k01 varchar(200) ccsid(*utf8) value options(*nopass)
\ 8 | ...
\ 9 | k10 varchar(200) ccsid(*utf8) value options(*nopass)
\ 10 |
\ 11 |

\ 12 |  See rm__.\ 13 |

\ 14 | \ 15 | '); 16 | -------------------------------------------------------------------------------- /docs/content/rm__t.js: -------------------------------------------------------------------------------- 1 | document.write('\ 2 | \ 3 |
rm__t
  
  Retrieve item with one or more time keys
\ 4 |
\
 5 | <<pointer
\ 6 | map pointer value
\ 7 | k01 time value options(*nopass)
\ 8 | ...
\ 9 | k10 time value options(*nopass)
\ 10 |
\ 11 |

\ 12 |  See rm__.\ 13 |

\ 14 | \ 15 | '); 16 | -------------------------------------------------------------------------------- /docs/content/rm__x.js: -------------------------------------------------------------------------------- 1 | document.write('\ 2 | \ 3 |
rm__x
  
  Retrieve item with one or more pointer keys
\ 4 |
\
 5 | <<pointer
\ 6 | map pointer value
\ 7 | k01 pointer value options(*nopass)
\ 8 | ...
\ 9 | k10 pointer value options(*nopass)
\ 10 |
\ 11 |

\ 12 |  See rm__.\ 13 |

\ 14 | \ 15 | '); 16 | -------------------------------------------------------------------------------- /docs/content/rm__xp.js: -------------------------------------------------------------------------------- 1 | document.write('\ 2 | \ 3 |
rm__xp
  
  Retrieve item with one or more procedure pointer keys
\ 4 |
\
 5 | <<pointer
\ 6 | map pointer value
\ 7 | k01 pointer(*proc) value options(*nopass)
\ 8 | ...
\ 9 | k10 pointer(*proc) value options(*nopass)
\ 10 |
\ 11 |

\ 12 |  See rm__.\ 13 |

\ 14 | \ 15 | '); 16 | -------------------------------------------------------------------------------- /docs/content/rm__z.js: -------------------------------------------------------------------------------- 1 | document.write('\ 2 | \ 3 |
rm__z
  
  Retrieve item with one or more timestamp keys
\ 4 |
\
 5 | <<pointer
\ 6 | map pointer value
\ 7 | k01 timestamp value options(*nopass)
\ 8 | ...
\ 9 | k10 timestamp value options(*nopass)
\ 10 |
\ 11 |

\ 12 |  See rm__.\ 13 |

\ 14 | \ 15 | '); 16 | -------------------------------------------------------------------------------- /docs/content/rm_a.js: -------------------------------------------------------------------------------- 1 | document.write('\ 2 | \ 3 |
rm_a
  
  Create a new character data value
\ 4 |
\
 5 | <<pointer
\ 6 | value varchar(30000) const
\ 7 | opt int(10) value options(*nopass)
\ 8 |
\ 9 |

\ 10 |  Create a new character data value, up to 30.000 bytes long.
\ 11 |  Pass opt to set special property or user data (see rm_).\ 12 |

\ 13 | \ 14 | '); 15 | -------------------------------------------------------------------------------- /docs/content/rm_a1_.js: -------------------------------------------------------------------------------- 1 | document.write('\ 2 | \ 3 |
rm_a1_
  
  Convert character data to RPG character data (100)
\ 4 |
\
 5 | <<varchar(100)
\ 6 | value pointer value
\ 7 | default varchar(100) const options(*nopass)
\ 8 |
\ 9 |

\ 10 |  See rm_a_.\ 11 |

\ 12 | \ 13 | '); 14 | -------------------------------------------------------------------------------- /docs/content/rm_a1__.js: -------------------------------------------------------------------------------- 1 | document.write('\ 2 | \ 3 |
rm_a1__
  
  Same as rm_a1_, and dispose the character data
\ 4 |
\
 5 | <<varchar(100)
\ 6 | value pointer value
\ 7 | default varchar(100) const options(*nopass)
\ 8 |
\ 9 |

\ 10 |  Same as rm_a1_. Additionally, value is immediately disposed.\ 11 |

\ 12 | \ 13 | '); 14 | -------------------------------------------------------------------------------- /docs/content/rm_a2_.js: -------------------------------------------------------------------------------- 1 | document.write('\ 2 | \ 3 |
rm_a2_
  
  Convert character data to RPG character data (1000)
\ 4 |
\
 5 | <<varchar(1000)
\ 6 | value pointer value
\ 7 | default varchar(1000) const options(*nopass)
\ 8 |
\ 9 |

\ 10 |  See rm_a_.\ 11 |

\ 12 | \ 13 | '); 14 | -------------------------------------------------------------------------------- /docs/content/rm_a2__.js: -------------------------------------------------------------------------------- 1 | document.write('\ 2 | \ 3 |
rm_a2__
  
  Same as rm_a2_, and dispose the character data
\ 4 |
\
 5 | <<varchar(1000)
\ 6 | value pointer value
\ 7 | default varchar(1000) const options(*nopass)
\ 8 |
\ 9 |

\ 10 |  Same as rm_a2_. Additionally, value is immediately disposed.\ 11 |

\ 12 | \ 13 | '); 14 | -------------------------------------------------------------------------------- /docs/content/rm_a3_.js: -------------------------------------------------------------------------------- 1 | document.write('\ 2 | \ 3 |
rm_a3_
  
  Convert character data to RPG character data (10000)
\ 4 |
\
 5 | <<varchar(10000)
\ 6 | value pointer value
\ 7 | default varchar(10000) const options(*nopass)
\ 8 |
\ 9 |

\ 10 |  See rm_a_.\ 11 |

\ 12 | \ 13 | '); 14 | -------------------------------------------------------------------------------- /docs/content/rm_a3__.js: -------------------------------------------------------------------------------- 1 | document.write('\ 2 | \ 3 |
rm_a3__
  
  Same as rm_a2_, and dispose the character data
\ 4 |
\
 5 | <<varchar(10000)
\ 6 | value pointer value
\ 7 | default varchar(10000) const options(*nopass)
\ 8 |
\ 9 |

\ 10 |  Same as rm_a3_. Additionally, value is immediately disposed.\ 11 |

\ 12 | \ 13 | '); 14 | -------------------------------------------------------------------------------- /docs/content/rm_a_.js: -------------------------------------------------------------------------------- 1 | document.write('\ 2 | \ 3 |
rm_a_
  
  Convert character data to RPG character data
\ 4 |
\
 5 | <<varchar(30000)
\ 6 | value pointer value
\ 7 | default varchar(30000) const options(*nopass)
\ 8 |
\ 9 |

\ 10 |  Return an RPG varchar(30000) from value, which must be character data \ 11 | or a string. If value is a string then the raw bytes are returned; \ 12 | no text conversion. If value is *null then return \'\', or default \ 13 | when passed. If value is not compatible escape message RM00011 (value \ 14 | not compatible) is sent.
\ 15 |  Procedures rm_a1_, rm_a2_ and rm_a3_ are a bit faster because \ 16 | of the shorter return value (100, 1000 or 10000).\ 17 |

\ 18 | \ 19 | '); 20 | -------------------------------------------------------------------------------- /docs/content/rm_a__.js: -------------------------------------------------------------------------------- 1 | document.write('\ 2 | \ 3 |
rm_a__
  
  Same as rm_a_, and dispose the character data
\ 4 |
\
 5 | <<varchar(30000)
\ 6 | value pointer value
\ 7 | default varchar(30000) const options(*nopass)
\ 8 |
\ 9 |

\ 10 |  Same as rm_a_. Additionally, value is immediately disposed.\ 11 |

\ 12 | \ 13 | '); 14 | -------------------------------------------------------------------------------- /docs/content/rm_aa.js: -------------------------------------------------------------------------------- 1 | document.write('\ 2 | \ 3 |
rm_aa
  
  Create a new character data value, alt. sort sequence
\ 4 |
\
 5 | <<pointer
\ 6 | value varchar(30000) const
\ 7 | opt int(10) value options(*nopass)
\ 8 |
\ 9 |

\ 10 |  Like rm_a, but the character data is compared using an alternate sort \ 11 | sequence. When two character data values are compared which are both \ 12 | created with rm_aa or rm_aap the comparison is done using the alternate \ 13 | sort sequence, instead of the default. Which sort sequence that is depends on \ 14 | the build options that were used, but usually it is *langidshr.
\ 15 |  Comparing data using an alternate sort sequence may take more resources than \ 16 | when the default sort sequence is used.
\ 17 |  Pass opt to set special property or user data (see rm_).\ 18 |

\ 19 | \ 20 | '); 21 | -------------------------------------------------------------------------------- /docs/content/rm_aap.js: -------------------------------------------------------------------------------- 1 | document.write('\ 2 | \ 3 |
rm_aap
  
  Create a new character data value, alt. sort seq., pointer to data
\ 4 |
\
 5 | <<pointer
\ 6 | addr pointer value
\ 7 | size int(10) value
\ 8 | opt int(10) value options(*nopass)
\ 9 |
\ 10 |

\ 11 |  Like rm_aa, but the data is taken from a pointer and a number of bytes (i.e. size).
\ 12 |  The size must be between 1 and 30.000.
\ 13 |  The passed number of bytes (size) are copied from the address to which \ 14 | the pointer (addr) points.
\ 15 |  Pass opt to set special property or user data (see rm_).\ 16 |

\ 17 | \ 18 | '); 19 | -------------------------------------------------------------------------------- /docs/content/rm_add_event_handler.js: -------------------------------------------------------------------------------- 1 | document.write('\ 2 | \ 3 |
rm_add_event_handler


  Add an event handler to a map
\ 4 |
\
 5 | <<pointer
\ 6 | map pointer value
\ 7 | hproc pointer(*proc) value
\ 8 | usrd pointer value options(*nopass)
\ 9 |
\ 10 |

\ 11 |  Add event handler hproc to the list of event handlers registered \ 12 | for map, and return map.
\ 13 |  Events are fired when key/item pairs are inserted into and removed \ 14 | from map. When an event is fired then all event handlers added to \ 15 | the map are called in the reversed order they were added (last one \ 16 | first).
\ 17 |  Procedure hproc must have the following signature:\ 18 |

\ 19 |
\
20 |   rtn type: int(10)
\ 21 | par. 1 : event int(10) value
\ 22 | 2 : map pointer value
\ 23 | 3 : key pointer value
\ 24 | 4 : item pointer value
\ 25 | 5 : usrd pointer value
\ 26 |
\ 27 |

\ 28 |  Parameter event is 1 when the "inserted" event has been triggered \ 29 | just after a key/item pair has been inserted, or 2 when the "removed" \ 30 | event has been triggered just before a key/item pair is removed.
\ 31 |  Parameters key and item is the key/item pair that has been inserted, \ 32 | or is about to be removed. In the latter case the key and value will be \ 33 | removed immediately after all the event handlers have been called. When \ 34 | the key and value are removed they\'re disposed (unless they\'re manually \ 35 | disposed maps).
\ 36 |  Parameter map is the map where the event was fired, usrd is the \ 37 | user data that was optionally passed with parameter usrd when adding \ 38 | the event handler with rm_add_event_handler (or *null if not passed).
\ 39 |  The handler\'s return value is ignored.
\ 40 |  If the same handler is added multiple times it will be called as many \ 41 | times as it was added.
\ 42 |  Event handlers are removed with procedure rm_remove_event_handler.
\ 43 |  If a map is disposed then no event handlers will be called. Use rm_rmva \ 44 | first to remove all key/value pairs and fire events, then dispose the map.\ 45 |

\ 46 | \ 47 | '); 48 | -------------------------------------------------------------------------------- /docs/content/rm_ap.js: -------------------------------------------------------------------------------- 1 | document.write('\ 2 | \ 3 |
rm_ap
  
  Create a new character data value, pointer to data
\ 4 |
\
 5 | <<pointer
\ 6 | addr pointer value
\ 7 | size int(10) value
\ 8 | opt int(10) value options(*nopass)
\ 9 |
\ 10 |

\ 11 |  Like rm_a, but the data is taken from a pointer and a number of bytes (i.e. size).
\ 12 |  The size must be between 1 and 30.000.
\ 13 |  The passed number of bytes (size) are copied from the address to which \ 14 | the pointer (addr) points.
\ 15 |  Pass opt to set special property or user data (see rm_).\ 16 |

\ 17 | \ 18 | '); 19 | -------------------------------------------------------------------------------- /docs/content/rm_ceq.js: -------------------------------------------------------------------------------- 1 | document.write('\ 2 | \ 3 |
rm_ceq
  
  obj1 = obj2 ?
\ 4 |
rm_compare_eq
\ 5 |
\
 6 | <<ind
\ 7 | obj1 pointer value
\ 8 | obj2 pointer value
\ 9 |
\ 10 |

\ 11 |  Return *on if obj1 is equal to obj2, else return *off.\ 12 |

\ 13 | \ 14 | '); 15 | -------------------------------------------------------------------------------- /docs/content/rm_cge.js: -------------------------------------------------------------------------------- 1 | document.write('\ 2 | \ 3 |
rm_cge
  
  obj1 >= obj2 ?
\ 4 |
rm_compare_ge
\ 5 |
\
 6 | <<ind
\ 7 | obj1 pointer value
\ 8 | obj2 pointer value
\ 9 |
\ 10 |

\ 11 |  Return *on if obj1 is equal to or greater than obj2, else return *off.\ 12 |

\ 13 | \ 14 | '); 15 | -------------------------------------------------------------------------------- /docs/content/rm_cgt.js: -------------------------------------------------------------------------------- 1 | document.write('\ 2 | \ 3 |
rm_cgt
  
  obj1 > obj2 ?
\ 4 |
rm_compare_gt
\ 5 |
\
 6 | <<ind
\ 7 | obj1 pointer value
\ 8 | obj2 pointer value
\ 9 |
\ 10 |

\ 11 |  Return *on if obj1 is greater than obj2, else return *off.\ 12 |

\ 13 | \ 14 | '); 15 | -------------------------------------------------------------------------------- /docs/content/rm_cle.js: -------------------------------------------------------------------------------- 1 | document.write('\ 2 | \ 3 |
rm_cle
  
  obj1 <= obj2 ?
\ 4 |
rm_compare_le
\ 5 |
\
 6 | <<ind
\ 7 | obj1 pointer value
\ 8 | obj2 pointer value
\ 9 |
\ 10 |

\ 11 |  Return *on if obj1 is equal to or less than obj2, else return *off.\ 12 |

\ 13 | \ 14 | '); 15 | -------------------------------------------------------------------------------- /docs/content/rm_clt.js: -------------------------------------------------------------------------------- 1 | document.write('\ 2 | \ 3 |
rm_clt
  
  obj1 < obj2 ?
\ 4 |
rm_compare_lt
\ 5 |
\
 6 | <<ind
\ 7 | obj1 pointer value
\ 8 | obj2 pointer value
\ 9 |
\ 10 |

\ 11 |  Return *on if obj1 is less than obj2, else return *off.\ 12 |

\ 13 | \ 14 | '); 15 | -------------------------------------------------------------------------------- /docs/content/rm_cpy.js: -------------------------------------------------------------------------------- 1 | document.write('\ 2 | \ 3 |
rm_cpy
  
  Copy map or value
\ 4 |
rm_copy
\ 5 |
\
 6 | <<pointer
\ 7 | obj pointer value
\ 8 | key1 pointer value options(*nopass)
\ 9 | key2 pointer value options(*nopass)
\ 10 |
\ 11 |

\ 12 |  Return a (shallow) copy of obj, which must be a map or a value.
\ 13 |  The new map or value has the same properties and attributes as obj, \ 14 | except that a new copy of a map is always mutable. The copy contains \ 15 | the same key/item pairs as obj. The keys/items in the copy that are \ 16 | values or automatically disposed maps are copies of the originals in \ 17 | obj. Manually disposed maps are not copied; the copy will contain \ 18 | the same instances.
\ 19 |  Event handlers are NOT copied; the copy has no event handlers.
\ 20 |  Return *null if obj is *null.
\ 21 |  Use rm_cpyd to make a deep copy of a map, \ 22 | in which case manually disposed maps are also (deep) copied.
\ 23 |  The new copy is always mutable. Maps contained in obj that are \ 24 | immutable stay immutable and copies of these maps that are included in the copy are also immutable.
\ 25 |  Be aware that when manually disposed maps are not used then rm_cpy \ 26 | and rm_cpyd have the same effect, i.e. contained maps are copied \ 27 | recursively, effectively producing a deep copy. Avoid excessive memory \ 28 | use. When only manually disposed maps are used instead of automatically \ 29 | disposed maps then rm_cpy will produce a real shallow copy.
\ 30 |  If key1 and/or key2 are passed and not *null the copy will only \ 31 | contain the key/item pairs from obj with key equal to or greater than \ 32 | key1, and equal to or less than key2. Both keys are optional. If \ 33 | key1 is not passed or *null it\'s assumed to be the lowest key. If \ 34 | key2 is not passed it\'s assumed to be the same as key1 (if key1 \ 35 | is passed). If key2 is *null it\'s assumed to be the highest key. \ 36 | Return an empty map if key1 is greater than key2, or if only key1 \ 37 | is passed with value *null.
\ 38 |  Ignore key1/key2 if obj is a value.
\ 39 |  An alternative way to copy for example an integer value: rm_i(rm_i_(val)).
\ 40 |  This procedure disposes key1 and key2 automatically, unless \ 41 | key1/key2 is a manually disposed map, or a value/map contained \ 42 | in a map.\ 43 |

\ 44 | \ 45 | '); 46 | -------------------------------------------------------------------------------- /docs/content/rm_cpyd.js: -------------------------------------------------------------------------------- 1 | document.write('\ 2 | \ 3 |
rm_cpyd
  
  Deep copy map or value
\ 4 |
rm_copy_deep
\ 5 |
\
 6 | <<pointer
\ 7 | obj pointer value
\ 8 | key1 pointer value options(*nopass)
\ 9 | key2 pointer value options(*nopass)
\ 10 |
\ 11 |

\ 12 |  Like rm_cpy, but returns a deep copy.
\ 13 |  For values, rm_cpyd has the same effect as rm_cpy.
\ 14 |  For maps, contained manually disposed maps are copied also, recursively, \ 15 | like automatically disposed maps.\ 16 |

\ 17 | \ 18 | '); 19 | -------------------------------------------------------------------------------- /docs/content/rm_cur.js: -------------------------------------------------------------------------------- 1 | document.write('\ 2 | \ 3 |
rm_cur
  
  Create a new cursor
\ 4 |
rm_cursor
\ 5 |
\
 6 | <<pointer
\ 7 | map pointer value
\ 8 | opt char(10) value options(*nopass)
\ 9 |
\ 10 |

\ 11 |  Return a new cursor for map. The cursor is positioned at the beginning \ 12 | or the end, depending on whether opt is \'*b\'/\'*begin\' or \'*e\'/\'*end\', \ 13 | resp. Optional parameter opt defaults to \'*b\'.
\ 14 |  The cursor should be disposed with rm_dis when it\'s not used anymore. It \ 15 | is automatically disposed when map is disposed.\ 16 |

\ 17 | \ 18 | '); 19 | -------------------------------------------------------------------------------- /docs/content/rm_d.js: -------------------------------------------------------------------------------- 1 | document.write('\ 2 | \ 3 |
rm_d
  
  Create a new date value
\ 4 |
\
 5 | <<pointer
\ 6 | value date(*iso-) value
\ 7 | opt int(10) value options(*nopass)
\ 8 |
\ 9 |

\ 10 |  Create a new date value.
\ 11 |  Pass opt to set special property or user data (see rm_).\ 12 |

\ 13 | \ 14 | '); 15 | -------------------------------------------------------------------------------- /docs/content/rm_d_.js: -------------------------------------------------------------------------------- 1 | document.write('\ 2 | \ 3 |
rm_d_
  
  Convert a date/timestamp to an RPG date value
\ 4 |
\
 5 | <<date(*iso-)
\ 6 | value pointer value
\ 7 | default date(*iso-) value options(*nopass)
\ 8 |
\ 9 |

\ 10 |  Return an RPG date from value, which must be a date or timestamp.
\ 11 |  If value is *null then return *loval, or default \ 12 | when passed. If value is not compatible escape message RM00011 (value not \ 13 | compatible) is sent.
\ 14 |  A timestamp is converted to a date using BIF %date.\ 15 |

\ 16 | \ 17 | '); 18 | -------------------------------------------------------------------------------- /docs/content/rm_d__.js: -------------------------------------------------------------------------------- 1 | document.write('\ 2 | \ 3 |
rm_d__
  
  Same as rm_d_, and dispose the date/timestamp
\ 4 |
\
 5 | <<date(*iso-)
\ 6 | value pointer value
\ 7 | default date(*iso-) value options(*nopass)
\ 8 |
\ 9 |

\ 10 |  Same as rm_d_. Additionally, value is immediately disposed.\ 11 |

\ 12 | \ 13 | '); 14 | -------------------------------------------------------------------------------- /docs/content/rm_dis.js: -------------------------------------------------------------------------------- 1 | document.write('\ 2 | \ 3 |
rm_dis
  
  Dispose maps, cursors and values
\ 4 |
rm_dispose
\ 5 |
\
 6 | <<-
\ 7 | o001 pointer value options(*nopass)
\ 8 | ...
\ 9 | o100 pointer value options(*nopass)
\ 10 |
\ 11 |

\ 12 |  Dispose objects o001 thru o100. Each object can be a map, a cursor \ 13 | or a value.
\ 14 |  When an object is disposed its memory is released/freed.
\ 15 |  Use this procedure when a map, cursor or value is not used anymore.
\ 16 |  If a map is disposed then all associated cursors are also disposed.
\ 17 |  If a map is disposed then all its keys and items are also disposed, i.e. \ 18 | all contained maps and values are disposed except manually disposed maps, \ 19 | which must always be disposed directly using rm_dis.
\ 20 |  Values and automatically disposed maps that are contained in (have been \ 21 | inserted into) a map can not be directly disposed with rm_dis.
\ 22 |  Send escape message RM00030 if the object to dispose is a value that is \ 23 | contained in a map, or is an automatically disposed map that is contained \ 24 | in a map.\ 25 |

\ 26 | \ 27 | '); 28 | -------------------------------------------------------------------------------- /docs/content/rm_fed.js: -------------------------------------------------------------------------------- 1 | document.write('\ 2 | \ 3 |
rm_fed
  
  For each do
\ 4 |
rm_for_each_do
\ 5 |
\
 6 | <<pointer
\ 7 | map pointer value
\ 8 | proc pointer(*proc) value
\ 9 | usrd pointer value options(*nopass)
\ 10 | key1 pointer value options(*nopass)
\ 11 | key2 pointer value options(*nopass)
\ 12 |
\ 13 |

\ 14 |  Call procedure proc for each key/item pair in map, injecting a \ 15 | pointer, then return the pointer that was returned with the last call \ 16 | to proc.
\ 17 |  Procedure proc must have the following signature:\ 18 |

\ 19 |
\
20 |   rtn type: pointer
\ 21 | par. 1 : key pointer value
\ 22 | 2 : item pointer value
\ 23 | 3 : usrd pointer value
\ 24 | 4 : stop ind
\ 25 |
\ 26 |

\ 27 |  Procedure proc is executed for each key/item pair in map, starting \ 28 | with the lowest key, up to the highest key, or until proc sets output \ 29 | parameter stop to *on.
\ 30 |  Use rm_fedr to start with the highest key down to the lowest key.
\ 31 |  Each time proc is executed the key and item are passed as arguments key \ 32 | and item. Parameter usrd is a pointer to data that is user defined and \ 33 | can be anything (e.g. a map or a value), or the pointer is *null. Procedure \ 34 | proc returns this, or another, pointer which is then passed as argument \ 35 | usrd the next time proc is called again. So the return value of proc \ 36 | is used as input for proc the next time it\'s called. The initial user data \ 37 | pointer that is passed the first time proc is called is passed to rm_fed \ 38 | or rm_fedr with parameter usrd.
\ 39 |  Parameter usrd is optional; if not passed the user data pointer is *null.
\ 40 |  If no key/item pair is read (and proc doesn\'t get called) the return \ 41 | value will be usrd, or *null if usrd is not passed.
\ 42 |  If key1 and/or key2 are passed then the key/item pairs that are \ 43 | processed are equal to or greater than key1, and equal to or less than \ 44 | key2. Both keys are optional. If key1 is not passed or *null it\'s \ 45 | assumed to be the lowest key. If key2 is not passed it\'s assumed to \ 46 | be the same as key1 (if key1 is passed). If key2 is *null it\'s \ 47 | assumed to be the highest key. Read nothing if key1 is greater than \ 48 | key2, or if only key1 is passed with value *null.
\ 49 |  These procedures dispose key1 and key2 automatically, unless \ 50 | key1/key2 is a manually disposed map, or a value/map contained \ 51 | in a map.\ 52 |

\ 53 | \ 54 | '); 55 | -------------------------------------------------------------------------------- /docs/content/rm_fedr.js: -------------------------------------------------------------------------------- 1 | document.write('\ 2 | \ 3 |
rm_fedr
  
  For each do, reversed
\ 4 |
rm_for_each_do_rev
\ 5 |
\
 6 | <<pointer
\ 7 | map pointer value
\ 8 | proc pointer(*proc) value
\ 9 | usrd pointer value options(*nopass)
\ 10 | key1 pointer value options(*nopass)
\ 11 | key2 pointer value options(*nopass)
\ 12 |
\ 13 |

\ 14 |  See rm_fed.\ 15 |

\ 16 | \ 17 | '); 18 | -------------------------------------------------------------------------------- /docs/content/rm_gav.js: -------------------------------------------------------------------------------- 1 | document.write('\ 2 | \ 3 |
rm_gav
  
  Get attribute value
\ 4 |
rm_get_attr_val
\ 5 |
\
 6 | <<varchar(100) ccsid(*utf8)
\ 7 | map pointer value
\ 8 | attr varchar(100) ccsid(*utf8) value
\ 9 |
\ 10 |

\ 11 |  Return the value of attribute attr of map, or \'\' if the \ 12 | attribute is not set.\ 13 |

\ 14 | \ 15 | '); 16 | -------------------------------------------------------------------------------- /docs/content/rm_gcf.js: -------------------------------------------------------------------------------- 1 | document.write('\ 2 | \ 3 |
rm_gcf
  
  Get compare function
\ 4 |
rm_get_comp_fun
\ 5 |
\
 6 | <<pointer
\ 7 | map pointer value
\ 8 |
\ 9 |

\ 10 |  Return the current compare function for map. Return *null if the default \ 11 | function, rm_cmp, is in effect.\ 12 |

\ 13 | \ 14 | '); 15 | -------------------------------------------------------------------------------- /docs/content/rm_get.js: -------------------------------------------------------------------------------- 1 | document.write('\ 2 | \ 3 |
rm_get
  
  Retrieve item with a key
\ 4 |
\
 5 | <<pointer
\ 6 | map pointer value
\ 7 | key pointer value
\ 8 | opt char(10) value options(*nopass)
\ 9 |
\ 10 |

\ 11 |  Return the item of the key/item pair in map with key equal to key.
\ 12 |  Return *null if not found.
\ 13 |  In case there are multiple keys equal to key then opt indicates \ 14 | which key: \'*f\' or \'*first\' for the first one (which is the default), \ 15 | or \'*l\' or \'*last\' for the last one.
\ 16 |  This procedure disposes key automatically, unless key is a manually \ 17 | disposed map, or a value/map contained in a map.\ 18 |

\ 19 | \ 20 | '); 21 | -------------------------------------------------------------------------------- /docs/content/rm_gik.js: -------------------------------------------------------------------------------- 1 | document.write('\ 2 | \ 3 |
rm_gik
  
  Get item key
\ 4 |
rm_get_item_key
\ 5 |
\
 6 | <<pointer
\ 7 | map pointer value
\ 8 | item pointer value
\ 9 | opt char(10) value options(*nopass)
\ 10 | key1 pointer value options(*nopass)
\ 11 | key2 pointer value options(*nopass)
\ 12 |
\ 13 |

\ 14 |  Return the key of the item in map that is equal to item.
\ 15 |  A slow linear search is performed.
\ 16 |  Items are always compared using the default compare function rm_cmp.
\ 17 |  In case there are multiple items equal to item then opt indicates \ 18 | which item: \'*f\' or \'*first\' for the first one (which is the default), \ 19 | or \'*l\' or \'*last\' for the last one (key order). Using \'*f\'/\'*first\' or \ 20 | \'*l\'/\'*last\' makes no difference in performance.
\ 21 |  If key1 and/or key2 are passed and not *null then only the items with \ 22 | keys equal to or greater than key1, and equal to or less than key2, \ 23 | will be considered. Both keys are optional. If key1 is not passed or *null \ 24 | it\'s assumed to be the lowest key. If key2 is not passed it\'s assumed to be \ 25 | the same as key1 (if key1 is passed). If key2 is *null it\'s assumed to \ 26 | be the highest key. Return *null if key1 is greater than key2, or if only \ 27 | key1 is passed with value *null.
\ 28 |  This procedure disposes item, key1 and key2 automatically, unless they\'re \ 29 | a manually disposed map, or a value/map contained in a map.\ 30 |

\ 31 | \ 32 | '); 33 | -------------------------------------------------------------------------------- /docs/content/rm_hit.js: -------------------------------------------------------------------------------- 1 | document.write('\ 2 | \ 3 |
rm_hit
  
  Has item?
\ 4 |
rm_has_item
\ 5 |
\
 6 | <<ind
\ 7 | map pointer value
\ 8 | item pointer value
\ 9 | key1 pointer value options(*nopass)
\ 10 | key2 pointer value options(*nopass)
\ 11 |
\ 12 |

\ 13 |  Return *on if map has an item that is equal to item, else return *off.
\ 14 |  A slow linear search is performed.
\ 15 |  Items are always compared using the default compare function rm_cmp.
\ 16 |  If key1 and/or key2 are passed and not *null then only the items with \ 17 | keys equal to or greater than key1, and equal to or less than key2, \ 18 | will be considered. Both keys are optional. If key1 is not passed or *null \ 19 | it\'s assumed to be the lowest key. If key2 is not passed it\'s assumed to be \ 20 | the same as key1 (if key1 is passed). If key2 is *null it\'s assumed to \ 21 | be the highest key. Return *off if key1 is greater than key2, or if only \ 22 | key1 is passed with value *null.
\ 23 |  This procedure disposes item, key1 and key2 automatically, unless they\'re \ 24 | a manually disposed map, or a value/map contained in a map.\ 25 |

\ 26 | \ 27 | '); 28 | -------------------------------------------------------------------------------- /docs/content/rm_hks.js: -------------------------------------------------------------------------------- 1 | document.write('\ 2 | \ 3 |
rm_hks
  
  Has keys?
\ 4 |
rm_has_keys
\ 5 |
\
 6 | <<ind
\ 7 | map pointer value
\ 8 | key pointer value
\ 9 | opt char(10) value options(*nopass)
\ 10 |
\ 11 |

\ 12 |  If opt is \'*ge\' or not passed, then return *on if \ 13 | map has 1 or more keys that are equal to or greater than key, else return *off. If opt \ 14 | is \'*le\' \then return *on if map has 1 or more keys that are equal to or less than key.
\ 15 |  This procedure disposes key automatically, unless key is a manually \ 16 | disposed map, or a value/map contained in a map.\ 17 |

\ 18 | \ 19 | '); 20 | -------------------------------------------------------------------------------- /docs/content/rm_hky.js: -------------------------------------------------------------------------------- 1 | document.write('\ 2 | \ 3 |
rm_hky
  
  Has key?
\ 4 |
rm_has_key
\ 5 |
\
 6 | <<ind
\ 7 | map pointer value
\ 8 | key pointer value
\ 9 |
\ 10 |

\ 11 |  Return *on if map has a key that is equal to key, else return *off.
\ 12 |  This procedure disposes key automatically, unless key is a manually \ 13 | disposed map, or a value/map contained in a map.\ 14 |

\ 15 | \ 16 | '); 17 | -------------------------------------------------------------------------------- /docs/content/rm_hsn.js: -------------------------------------------------------------------------------- 1 | document.write('\ 2 | \ 3 |
rm_hsn
  
  Has next?
\ 4 |
rm_has_next
\ 5 |
\
 6 | <<ind
\ 7 | cur pointer value
\ 8 | key1 pointer value options(*nopass)
\ 9 | key2 pointer value options(*nopass)
\ 10 |
\ 11 |

\ 12 |  Return *on if cursor cur has a next or previous (rm_hsn/rm_hsp) \ 13 | key/item pair, i.e. whether rm_rdn/rm_rdp will return *on or not.
\ 14 |  If key1 and/or key2 are passed then the next or previous key must be \ 15 | equal to or greater than key1, and equal to or less than key2, else \ 16 | return *off. Both keys are optional. If key1 is not passed or *null \ 17 | it\'s assumed to be the lowest key. If key2 is not passed it\'s assumed \ 18 | to be the same as key1 (if key1 is passed). If key2 is *null it\'s \ 19 | assumed to be the highest key. Always return *off if key1 is greater \ 20 | than key2, or if only key1 is passed with value *null.
\ 21 |  These procedures dispose key1 and key2 automatically, unless \ 22 | key1/key2 is a manually disposed map, or a value/map contained \ 23 | in a map.\ 24 |

\ 25 | \ 26 | '); 27 | -------------------------------------------------------------------------------- /docs/content/rm_hsp.js: -------------------------------------------------------------------------------- 1 | document.write('\ 2 | \ 3 |
rm_hsp
  
  Has previous?
\ 4 |
rm_has_prev
\ 5 |
\
 6 | <<ind
\ 7 | cur pointer value
\ 8 | key1 pointer value options(*nopass)
\ 9 | key2 pointer value options(*nopass)
\ 10 |
\ 11 |

\ 12 |  See rm_hsn.\ 13 |

\ 14 | \ 15 | '); 16 | -------------------------------------------------------------------------------- /docs/content/rm_i.js: -------------------------------------------------------------------------------- 1 | document.write('\ 2 | \ 3 |
rm_i
  
  Create a new integer value, 10 digits
\ 4 |
\
 5 | <<pointer
\ 6 | value int(10) value
\ 7 | opt int(10) value options(*nopass)
\ 8 |
\ 9 |

\ 10 |  Create a new integer value, with 10 digits.
\ 11 |  Pass opt to set special property or user data (see rm_).\ 12 |

\ 13 | \ 14 | '); 15 | -------------------------------------------------------------------------------- /docs/content/rm_i1.js: -------------------------------------------------------------------------------- 1 | document.write('\ 2 | \ 3 |
rm_i1
  
  Create a new integer value, 10 digits
\ 4 |
\
 5 | <<pointer
\ 6 | value int(10) value
\ 7 | opt int(10) value options(*nopass)
\ 8 |
\ 9 |

\ 10 |  Same as rm_i.\ 11 |

\ 12 | \ 13 | '); 14 | -------------------------------------------------------------------------------- /docs/content/rm_i1_.js: -------------------------------------------------------------------------------- 1 | document.write('\ 2 | \ 3 |
rm_i1_
  
  Convert a number to an RPG integer value, 10 digits
\ 4 |
\
 5 | <<int(10)
\ 6 | value pointer value
\ 7 | default int(10) value options(*nopass)
\ 8 |
\ 9 |

\ 10 |  Same as rm_i_.\ 11 |

\ 12 | \ 13 | '); 14 | -------------------------------------------------------------------------------- /docs/content/rm_i1__.js: -------------------------------------------------------------------------------- 1 | document.write('\ 2 | \ 3 |
rm_i1__
  
  Same as rm_i1_, and dispose the number
\ 4 |
\
 5 | <<int(10)
\ 6 | value pointer value
\ 7 | default int(10) value options(*nopass)
\ 8 |
\ 9 |

\ 10 |  Same as rm_i1_. Additionally, value is immediately disposed.\ 11 |

\ 12 | \ 13 | '); 14 | -------------------------------------------------------------------------------- /docs/content/rm_i2.js: -------------------------------------------------------------------------------- 1 | document.write('\ 2 | \ 3 |
rm_i2
  
  Create a new integer value, 20 digits
\ 4 |
\
 5 | <<pointer
\ 6 | value int(20) value
\ 7 | opt int(10) value options(*nopass)
\ 8 |
\ 9 |

\ 10 |  Create a new integer value, with 20 digits.
\ 11 |  Pass opt to set special property or user data (see rm_).\ 12 |

\ 13 | \ 14 | '); 15 | -------------------------------------------------------------------------------- /docs/content/rm_i2_.js: -------------------------------------------------------------------------------- 1 | document.write('\ 2 | \ 3 |
rm_i2_
  
  Convert a number to an RPG integer value, 20 digits
\ 4 |
\
 5 | <<int(20)
\ 6 | value pointer value
\ 7 | default int(20) value options(*nopass)
\ 8 |
\ 9 |

\ 10 |  Return an RPG int(20) from value, which must be a number.
\ 11 |  See rm_i_.\ 12 |

\ 13 | \ 14 | '); 15 | -------------------------------------------------------------------------------- /docs/content/rm_i2__.js: -------------------------------------------------------------------------------- 1 | document.write('\ 2 | \ 3 |
rm_i2__
  
  Same as rm_i2_, and dispose the number
\ 4 |
\
 5 | <<int(20)
\ 6 | value pointer value
\ 7 | default int(20) value options(*nopass)
\ 8 |
\ 9 |

\ 10 |  Same as rm_i2_. Additionally, value is immediately disposed.\ 11 |

\ 12 | \ 13 | '); 14 | -------------------------------------------------------------------------------- /docs/content/rm_i_.js: -------------------------------------------------------------------------------- 1 | document.write('\ 2 | \ 3 |
rm_i_
  
  Convert a number to an RPG integer value, 10 digits
\ 4 |
\
 5 | <<int(10)
\ 6 | value pointer value
\ 7 | default int(10) value options(*nopass)
\ 8 |
\ 9 |

\ 10 |  Return an RPG int(10) from value, which must be a number.
\ 11 |  If value is *null then return 0, or default when passed. If value \ 12 | is not a number escape message RM00011 (value not compatible) is sent. \ 13 | If the value is too big for the returned integer format then message \ 14 | MCH1210 (receiver value too small) is sent.\ 15 |

\ 16 | \ 17 | '); 18 | -------------------------------------------------------------------------------- /docs/content/rm_i__.js: -------------------------------------------------------------------------------- 1 | document.write('\ 2 | \ 3 |
rm_i__
  
  Same as rm_i_, and dispose the number
\ 4 |
\
 5 | <<int(10)
\ 6 | value pointer value
\ 7 | default int(10) value options(*nopass)
\ 8 |
\ 9 |

\ 10 |  Same as rm_i_. Additionally, value is immediately disposed.\ 11 |

\ 12 | \ 13 | '); 14 | -------------------------------------------------------------------------------- /docs/content/rm_inm.js: -------------------------------------------------------------------------------- 1 | document.write('\ 2 | \ 3 |
rm_inm
  
  In map?
\ 4 |
rm_in_map
\ 5 |
\
 6 | <<ind
\ 7 | obj pointer value
\ 8 |
\ 9 |

\ 10 |  Return *on if obj is (contained) in a map, else return *off.
\ 11 |  Send escape message RM09005 if obj is not a value or an \ 12 | automatically disposed map.\ 13 |

\ 14 | \ 15 | '); 16 | -------------------------------------------------------------------------------- /docs/content/rm_ins.js: -------------------------------------------------------------------------------- 1 | document.write('\ 2 | \ 3 |
rm_ins
  
  Insert key/item pairs
\ 4 |
rm_insert
\ 5 |
\
 6 | <<pointer
\ 7 | map pointer value
\ 8 | k001 pointer value options(*nopass)
\ 9 | i001 pointer value options(*nopass)
\ 10 | ...
\ 11 | k100 pointer value options(*nopass)
\ 12 | i100 pointer value options(*nopass)
\ 13 |
\ 14 |

\ 15 |  Insert up to 100 new key/item pairs into map and return map.
\ 16 |  The keys and items must be maps or values. Values are automatically \ 17 | disposed when their containing map is disposed, or when the key/item \ 18 | is removed from the map. Maps that are not created with rm_mm are \ 19 | also automatically disposed, just like values.
\ 20 |  A key/item pair is inserted into a specific slot, depending on the \ 21 | key\'s order among the other keys. This slot is fixed and the key\'s \ 22 | order should not be affected by changing the key\'s contents and/or \ 23 | properties.
\ 24 |  Values and maps that are automatically disposed can only be inserted \ 25 | once into a map. When an automatically disposed map or a value is \ 26 | inserted into a map and the map/value has already been inserted into \ 27 | a map then escape message RM00010/RM00012 is sent.
\ 28 |  Keys can not be *null.
\ 29 |  Items can be *null.
\ 30 |  A map is allowed to contain duplicate keys (i.e. keys that are equal). \ 31 | If map already contains one or more keys that are equal to key then \ 32 | key is inserted at the end. Searching among equal keys is linear \ 33 | time, O(n), and lots of duplicates and/or "equal" searches should therefore \ 34 | be avoided.
\ 35 |  Starting at the second argument, every even and uneven argument corresponds \ 36 | to a key/item pair that is to be inserted. Pairs where the key is *null \ 37 | are ignored.
\ 38 |  Items which were not inserted (because no key was specified) will be \ 39 | disposed, unless the item is a manually disposed map, or a value/map \ 40 | contained in a map.\ 41 |

\ 42 | \ 43 | '); 44 | -------------------------------------------------------------------------------- /docs/content/rm_ins1.js: -------------------------------------------------------------------------------- 1 | document.write('\ 2 | \ 3 |
rm_ins1
  
  Insert 1 key/item pair
\ 4 |
rm_insert_1
\ 5 |
\
 6 | <<pointer
\ 7 | map pointer value
\ 8 | key pointer value options(*nopass)
\ 9 | item pointer value options(*nopass)
\ 10 |
\ 11 |

\ 12 |  Like rm_ins, but with only one key/item pair.
\ 13 |  This is the faster version when only one key/item pair needs \ 14 | to be inserted.\ 15 |

\ 16 | \ 17 | '); 18 | -------------------------------------------------------------------------------- /docs/content/rm_insc.js: -------------------------------------------------------------------------------- 1 | document.write('\ 2 | \ 3 |
rm_insc
  
  Insert key/item pairs, conditionally
\ 4 |
rm_insert_cond
\ 5 |
\
 6 | <<pointer
\ 7 | map pointer value
\ 8 | k001 pointer value options(*nopass)
\ 9 | i001 pointer value options(*nopass)
\ 10 | ...
\ 11 | k100 pointer value options(*nopass)
\ 12 | i100 pointer value options(*nopass)
\ 13 |
\ 14 |

\ 15 |  Like rm_ins, but a key/item pair is only inserted if there is \ 16 | no key in map that is equal to the key to be inserted.
\ 17 |  Keys and items that are not inserted are disposed automatically, \ 18 | unless they are manually disposed maps, or values/maps contained \ 19 | in a map.\ 20 |

\ 21 | \ 22 | '); 23 | -------------------------------------------------------------------------------- /docs/content/rm_insc1.js: -------------------------------------------------------------------------------- 1 | document.write('\ 2 | \ 3 |
rm_insc1
  
  Insert 1 key/item pair, conditionally
\ 4 |
rm_insert_cond_1
\ 5 |
\
 6 | <<pointer
\ 7 | map pointer value
\ 8 | key pointer value options(*nopass)
\ 9 | item pointer value options(*nopass)
\ 10 |
\ 11 |

\ 12 |  Like rm_insc, but with only one key/item pair.
\ 13 |  This is the faster version when only one key/item pair needs \ 14 | to be inserted.\ 15 |

\ 16 | \ 17 | '); 18 | -------------------------------------------------------------------------------- /docs/content/rm_inscm.js: -------------------------------------------------------------------------------- 1 | document.write('\ 2 | \ 3 |
rm_inscm
  
  Insert key/item pairs, conditionally, from map
\ 4 |
rm_insert_cond_map
\ 5 |
\
 6 | <<pointer
\ 7 | map pointer value
\ 8 | map2 pointer value
\ 9 | key1 pointer value options(*nopass)
\ 10 | key2 pointer value options(*nopass)
\ 11 |
\ 12 |

\ 13 |  Like rm_insm, but a key/item pair is only inserted if there is \ 14 | no key in map that is equal to the key to be inserted.\ 15 |

\ 16 | \ 17 | '); 18 | -------------------------------------------------------------------------------- /docs/content/rm_insm.js: -------------------------------------------------------------------------------- 1 | document.write('\ 2 | \ 3 |
rm_insm
  
  Insert key/item pairs, from map
\ 4 |
rm_insert_map
\ 5 |
\
 6 | <<pointer
\ 7 | map pointer value
\ 8 | map2 pointer value
\ 9 | key1 pointer value options(*nopass)
\ 10 | key2 pointer value options(*nopass)
\ 11 |
\ 12 |

\ 13 |  Like rm_ins, but the key/item pairs to insert are contained in map2.
\ 14 |  The values and automatically disposed maps in map2 that are to be \ 15 | inserted are not inserted directly, but instead a copy is made (rm_cpy) \ 16 | that is actually inserted. Manually disposed maps are not copied; they\'re \ 17 | inserted directly.
\ 18 |  If key1 and/or key2 are passed and not *null then only the key/item \ 19 | pairs in map2 with key equal to or greater than key1, and equal to \ 20 | or less than key2, will be inserted. Both keys are optional. If key1 \ 21 | is not passed or *null it\'s assumed to be the lowest key. If key2 is \ 22 | not passed it\'s assumed to be the same as key1 (if key1 is passed). \ 23 | If key2 is *null it\'s assumed to be the highest key. Nothing is \ 24 | inserted if key1 is greater than key2, or if only key1 is passed \ 25 | with value *null.
\ 26 |  This procedure disposes key1 and key2 automatically, unless \ 27 | key1/key2 is a manually disposed map, or a value/map contained \ 28 | in a map.
\ 29 |  This procedure does not dispose map2 or it\'s keys/items.\ 30 |

\ 31 | \ 32 | '); 33 | -------------------------------------------------------------------------------- /docs/content/rm_insx.js: -------------------------------------------------------------------------------- 1 | document.write('\ 2 | \ 3 |
rm_insx
  
  Insert key/item pairs, exclusive
\ 4 |
rm_insert_excl
\ 5 |
\
 6 | <<pointer
\ 7 | map pointer value
\ 8 | k001 pointer value options(*nopass)
\ 9 | i001 pointer value options(*nopass)
\ 10 | ...
\ 11 | k100 pointer value options(*nopass)
\ 12 | i100 pointer value options(*nopass)
\ 13 |
\ 14 |

\ 15 |  Like rm_ins, but before a key/item pair is inserted all key/item \ 16 | pairs with a key equal to the key to be inserted are removed first \ 17 | (i.e. they\'re replaced).\ 18 |

\ 19 | \ 20 | '); 21 | -------------------------------------------------------------------------------- /docs/content/rm_insx1.js: -------------------------------------------------------------------------------- 1 | document.write('\ 2 | \ 3 |
rm_insx1
  
  Insert 1 key/item pair, exclusive
\ 4 |
rm_insert_excl_1
\ 5 |
\
 6 | <<pointer
\ 7 | map pointer value
\ 8 | key pointer value options(*nopass)
\ 9 | item pointer value options(*nopass)
\ 10 |
\ 11 |

\ 12 |  Like rm_insx, but with only one key/item pair.
\ 13 |  This is the faster version when only one key/item pair needs \ 14 | to be inserted.\ 15 |

\ 16 | \ 17 | '); 18 | -------------------------------------------------------------------------------- /docs/content/rm_insxm.js: -------------------------------------------------------------------------------- 1 | document.write('\ 2 | \ 3 |
rm_insxm
  
  Insert key/item pairs, exclusive, from map
\ 4 |
rm_insert_excl_map
\ 5 |
\
 6 | <<pointer
\ 7 | map pointer value
\ 8 | map2 pointer value
\ 9 | key1 pointer value options(*nopass)
\ 10 | key2 pointer value options(*nopass)
\ 11 |
\ 12 |

\ 13 |  Like rm_insm, but before a key/item pair is inserted all key/item \ 14 | pairs with a key equal to the key to be inserted are removed first.\ 15 |

\ 16 | \ 17 | '); 18 | -------------------------------------------------------------------------------- /docs/content/rm_isa.js: -------------------------------------------------------------------------------- 1 | document.write('\ 2 | \ 3 |
rm_isa
  
  Is character data?
\ 4 |
\
 5 | <<ind
\ 6 | obj pointer value
\ 7 |
\ 8 |

\ 9 |  Return *on if obj is character data, else return *off.\ 10 |

\ 11 | \ 12 | '); 13 | -------------------------------------------------------------------------------- /docs/content/rm_isaa.js: -------------------------------------------------------------------------------- 1 | document.write('\ 2 | \ 3 |
rm_isaa
  
  Is character data with alt. sort seq.?
\ 4 |
\
 5 | <<ind
\ 6 | obj pointer value
\ 7 |
\ 8 |

\ 9 |  Return *on if obj is character data with alt. sort seq., else return *off.\ 10 |

\ 11 | \ 12 | '); 13 | -------------------------------------------------------------------------------- /docs/content/rm_isd.js: -------------------------------------------------------------------------------- 1 | document.write('\ 2 | \ 3 |
rm_isd
  
  Is date?
\ 4 |
\
 5 | <<ind
\ 6 | obj pointer value
\ 7 |
\ 8 |

\ 9 |  Return *on if obj is a date, else return *off.\ 10 |

\ 11 | \ 12 | '); 13 | -------------------------------------------------------------------------------- /docs/content/rm_isi.js: -------------------------------------------------------------------------------- 1 | document.write('\ 2 | \ 3 |
rm_isi
  
  Is any integer?
\ 4 |
\
 5 | <<ind
\ 6 | obj pointer value
\ 7 |
\ 8 |

\ 9 |  Return *on if obj is any integer type, else return *off.\ 10 |

\ 11 | \ 12 | '); 13 | -------------------------------------------------------------------------------- /docs/content/rm_isi1.js: -------------------------------------------------------------------------------- 1 | document.write('\ 2 | \ 3 |
rm_isi1
  
  Is integer with 10 digits?
\ 4 |
\
 5 | <<ind
\ 6 | obj pointer value
\ 7 |
\ 8 |

\ 9 |  Return *on if obj is an integer with 10 digits, else return *off.\ 10 |

\ 11 | \ 12 | '); 13 | -------------------------------------------------------------------------------- /docs/content/rm_isi2.js: -------------------------------------------------------------------------------- 1 | document.write('\ 2 | \ 3 |
rm_isi2
  
  Is integer with 20 digits?
\ 4 |
\
 5 | <<ind
\ 6 | obj pointer value
\ 7 |
\ 8 |

\ 9 |  Return *on if obj is an integer with 20 digits, else return *off.\ 10 |

\ 11 | \ 12 | '); 13 | -------------------------------------------------------------------------------- /docs/content/rm_ism.js: -------------------------------------------------------------------------------- 1 | document.write('\ 2 | \ 3 |
rm_ism
  
  Is map?
\ 4 |
\
 5 | <<ind
\ 6 | obj pointer value
\ 7 |
\ 8 |

\ 9 |  Return *on if obj is a map/vector, else return *off.\ 10 |

\ 11 | \ 12 | '); 13 | -------------------------------------------------------------------------------- /docs/content/rm_ismm.js: -------------------------------------------------------------------------------- 1 | document.write('\ 2 | \ 3 |
rm_ismm
  
  Is manually disposed map?
\ 4 |
\
 5 | <<ind
\ 6 | obj pointer value
\ 7 |
\ 8 |

\ 9 |  Return *on if obj is a manually disposed map, else return *off.\ 10 |

\ 11 | \ 12 | '); 13 | -------------------------------------------------------------------------------- /docs/content/rm_isn.js: -------------------------------------------------------------------------------- 1 | document.write('\ 2 | \ 3 |
rm_isn
  
  Is indicator?
\ 4 |
\
 5 | <<ind
\ 6 | obj pointer value
\ 7 |
\ 8 |

\ 9 |  Return *on if obj is an indicator, else return *off.\ 10 |

\ 11 | \ 12 | '); 13 | -------------------------------------------------------------------------------- /docs/content/rm_isp.js: -------------------------------------------------------------------------------- 1 | document.write('\ 2 | \ 3 |
rm_isp
  
  Is any packed decimal?
\ 4 |
\
 5 | <<ind
\ 6 | obj pointer value
\ 7 |
\ 8 |

\ 9 |  Return *on if obj is any packed decimal type, else return *off.\ 10 |

\ 11 | \ 12 | '); 13 | -------------------------------------------------------------------------------- /docs/content/rm_isp1.js: -------------------------------------------------------------------------------- 1 | document.write('\ 2 | \ 3 |
rm_isp1
  
  Is packed decimal with 10.4 digits?
\ 4 |
\
 5 | <<ind
\ 6 | obj pointer value
\ 7 |
\ 8 |

\ 9 |  Return *on if obj is a packed decimal with 10.4 digits, else return *off.\ 10 |

\ 11 | \ 12 | '); 13 | -------------------------------------------------------------------------------- /docs/content/rm_isp2.js: -------------------------------------------------------------------------------- 1 | document.write('\ 2 | \ 3 |
rm_isp2
  
  Is packed decimal with 20.8 digits?
\ 4 |
\
 5 | <<ind
\ 6 | obj pointer value
\ 7 |
\ 8 |

\ 9 |  Return *on if obj is a packed decimal with 20.8 digits, else return *off.\ 10 |

\ 11 | \ 12 | '); 13 | -------------------------------------------------------------------------------- /docs/content/rm_isp3.js: -------------------------------------------------------------------------------- 1 | document.write('\ 2 | \ 3 |
rm_isp3
  
  Is packed decimal with 30.16 digits?
\ 4 |
\
 5 | <<ind
\ 6 | obj pointer value
\ 7 |
\ 8 |

\ 9 |  Return *on if obj is a packed decimal with 30.16 digits, else return *off.\ 10 |

\ 11 | \ 12 | '); 13 | -------------------------------------------------------------------------------- /docs/content/rm_iss.js: -------------------------------------------------------------------------------- 1 | document.write('\ 2 | \ 3 |
rm_iss
  
  Is string?
\ 4 |
\
 5 | <<ind
\ 6 | obj pointer value
\ 7 |
\ 8 |

\ 9 |  Return *on if obj is a string, else return *off.\ 10 |

\ 11 | \ 12 | '); 13 | -------------------------------------------------------------------------------- /docs/content/rm_issa.js: -------------------------------------------------------------------------------- 1 | document.write('\ 2 | \ 3 |
rm_issa
  
  Is string with alt. sort seq.?
\ 4 |
\
 5 | <<ind
\ 6 | obj pointer value
\ 7 |
\ 8 |

\ 9 |  Return *on if obj is a string with alt. sort seq., else return *off.\ 10 |

\ 11 | \ 12 | '); 13 | -------------------------------------------------------------------------------- /docs/content/rm_ist.js: -------------------------------------------------------------------------------- 1 | document.write('\ 2 | \ 3 |
rm_ist
  
  Is time?
\ 4 |
\
 5 | <<ind
\ 6 | obj pointer value
\ 7 |
\ 8 |

\ 9 |  Return *on if obj is a time, else return *off.\ 10 |

\ 11 | \ 12 | '); 13 | -------------------------------------------------------------------------------- /docs/content/rm_isv.js: -------------------------------------------------------------------------------- 1 | document.write('\ 2 | \ 3 |
rm_isv
  
  Is vector?
\ 4 |
\
 5 | <<ind
\ 6 | obj pointer value
\ 7 |
\ 8 |

\ 9 |  Return *on if obj is a vector, else return *off.\ 10 |

\ 11 | \ 12 | '); 13 | -------------------------------------------------------------------------------- /docs/content/rm_isx.js: -------------------------------------------------------------------------------- 1 | document.write('\ 2 | \ 3 |
rm_isx
  
  Is pointer?
\ 4 |
\
 5 | <<ind
\ 6 | obj pointer value
\ 7 |
\ 8 |

\ 9 |  Return *on if obj is a pointer, else return *off.\ 10 |

\ 11 | \ 12 | '); 13 | -------------------------------------------------------------------------------- /docs/content/rm_isxp.js: -------------------------------------------------------------------------------- 1 | document.write('\ 2 | \ 3 |
rm_isxp
  
  Is procedure pointer?
\ 4 |
\
 5 | <<ind
\ 6 | obj pointer value
\ 7 |
\ 8 |

\ 9 |  Return *on if obj is a procedure pointer, else return *off.\ 10 |

\ 11 | \ 12 | '); 13 | -------------------------------------------------------------------------------- /docs/content/rm_isz.js: -------------------------------------------------------------------------------- 1 | document.write('\ 2 | \ 3 |
rm_isz
  
  Is timestamp?
\ 4 |
\
 5 | <<ind
\ 6 | obj pointer value
\ 7 |
\ 8 |

\ 9 |  Return *on if obj is a timestamp, else return *off.\ 10 |

\ 11 | \ 12 | '); 13 | -------------------------------------------------------------------------------- /docs/content/rm_itm.js: -------------------------------------------------------------------------------- 1 | document.write('\ 2 | \ 3 |
rm_itm
  
  Return current item
\ 4 |
rm_item
\ 5 |
\
 6 | <<pointer
\ 7 | cur pointer value
\ 8 |
\ 9 |

\ 10 |  Return the current item for cursor cur, after calling rm_rdn or rm_rdp.
\ 11 |  The current item may be *null.
\ 12 |  Call rm_key to check whether there is a current key/item pair.\ 13 |

\ 14 | \ 15 | '); 16 | -------------------------------------------------------------------------------- /docs/content/rm_key.js: -------------------------------------------------------------------------------- 1 | document.write('\ 2 | \ 3 |
rm_key
  
  Return current key
\ 4 |
\
 5 | <<pointer
\ 6 | cur pointer value
\ 7 |
\ 8 |

\ 9 |  Return the current key for cursor cur, after calling rm_rdn or rm_rdp.
\ 10 |  Return *null if there is no current key/item pair.\ 11 |

\ 12 | \ 13 | '); 14 | -------------------------------------------------------------------------------- /docs/content/rm_m.js: -------------------------------------------------------------------------------- 1 | document.write('\ 2 | \ 3 |
rm_m
  
  Create a new map, automatically disposed
\ 4 |
\
 5 | <<pointer
\ 6 | k001 pointer value options(*nopass)
\ 7 | i001 pointer value options(*nopass)
\ 8 | ...
\ 9 | k100 pointer value options(*nopass)
\ 10 | i100 pointer value options(*nopass)
\ 11 |
\ 12 |

\ 13 |  Create a new map and return a pointer to it.
\ 14 |  The map should be disposed - with rm_dis \ 15 | - when it\'s not needed anymore. If the map is inserted into a map as a key or item it will \ 16 | be automatically disposed when the containing map is disposed or when \ 17 | the key/item is removed, and rm_dis can not be used \ 18 | anymore to dispose the map.
\ 19 |  Like a value, an automatically disposed map can be inserted into \ 20 | (contained in) one map only, i.e. it can be inserted only once (even \ 21 | when inserting into the same map). Escape message RM00010 will be sent \ 22 | if an automatically disposed map is inserted into a map for a second time.
\ 23 |  The new map can be immediately populated with key/item pairs by passing \ 24 | the keys and items as arguments. This is the same as calling rm_ins1 \ 25 | repeatedly, with arguments 1 and 2 as the first key and item, resp., \ 26 | arguments 3 and 4 as the second key and item, etc. Up to 100 key/item \ 27 | pairs can be passed. An item is optional (or *null). Key/items \ 28 | of which the key is *null are ignored.
\ 29 |  Items which were not inserted because no key was specified will be \ 30 | disposed, unless the item is a manually disposed map, or a value/map \ 31 | contained in a map.\ 32 |

\ 33 | \ 34 | '); 35 | -------------------------------------------------------------------------------- /docs/content/rm_mm.js: -------------------------------------------------------------------------------- 1 | document.write('\ 2 | \ 3 |
rm_mm
  
  Create a new map, manually disposed
\ 4 |
\
 5 | <<pointer
\ 6 | k001 pointer value options(*nopass)
\ 7 | i001 pointer value options(*nopass)
\ 8 | ...
\ 9 | k100 pointer value options(*nopass)
\ 10 | i100 pointer value options(*nopass)
\ 11 |
\ 12 |

\ 13 |  Same as rm_m except that the new map is not automatically disposed \ 14 | and must always be manually disposed with rm_dis. However, unlike automatically disposed \ 15 | maps, a manually disposed map can be inserted into multiple maps.\ 16 |

\ 17 | \ 18 | '); 19 | -------------------------------------------------------------------------------- /docs/content/rm_mmi.js: -------------------------------------------------------------------------------- 1 | document.write('\ 2 | \ 3 |
rm_mmi
  
  Make map immutable
\ 4 |
rm_make_map_immutable
\ 5 |
\
 6 | <<pointer
\ 7 | map pointer value
\ 8 | opt char(10) value options(*nopass)
\ 9 |
\ 10 |

\ 11 |  Make map immutable, and return map.
\ 12 |  An immutable map can not be mutated, i.e. no key/item pairs can be inserted \ 13 | into or removed from the map. If a key/item pair is inserted into or removed \ 14 | from an immutable map then escape message RM00005 is sent.
\ 15 |  All contained automatically disposed maps (thus including vectors) are also \ 16 | made immutable, recursively.
\ 17 |  If opt is passed and is \'*mm\' then all contained manually \ 18 | disposed maps are also made immutable, recursively, like contained automatically disposed maps.
\ 19 |  If map is already immutable then this operation has no effect.
\ 20 |  This operation can not be undone; an immutable map can not be made mutable again.
\ 21 |  When a map is copied (rm_cpy) then the new copy is mutable.\ 22 |

\ 23 | \ 24 | '); 25 | -------------------------------------------------------------------------------- /docs/content/rm_mmm.js: -------------------------------------------------------------------------------- 1 | document.write('\ 2 | \ 3 |
rm_mmm
  
  Make map manually disposed
\ 4 |
rm_make_map_manually_disposed
\ 5 |
\
 6 | <<pointer
\ 7 | map pointer value
\ 8 |
\ 9 |

\ 10 |  Make map a manually disposed map, and return map.
\ 11 |  Send escape message RM00051 if map is not an automatically disposed map, \ 12 | or if map is a vector.
\ 13 |  This operation can not be undone; a manually disposed map can not be made \ 14 | automatically disposed.\ 15 |

\ 16 | \ 17 | '); 18 | -------------------------------------------------------------------------------- /docs/content/rm_n.js: -------------------------------------------------------------------------------- 1 | document.write('\ 2 | \ 3 |
rm_n
  
  Create a new indicator value
\ 4 |
\
 5 | <<pointer
\ 6 | value ind value
\ 7 | opt int(10) value options(*nopass)
\ 8 |
\ 9 |

\ 10 |  Create a new indicator value.
\ 11 |  Pass opt to set special property or user data (see rm_).\ 12 |

\ 13 | \ 14 | '); 15 | -------------------------------------------------------------------------------- /docs/content/rm_n_.js: -------------------------------------------------------------------------------- 1 | document.write('\ 2 | \ 3 |
rm_n_
  
  Convert an indicator to an RPG indicator value
\ 4 |
\
 5 | <<ind
\ 6 | value pointer value
\ 7 | default ind value options(*nopass)
\ 8 |
\ 9 |

\ 10 |  Return an RPG ind from value, which must be an indicator.
\ 11 |  If value is *null then return *off, or default \ 12 | when passed. If value is not compatible escape message RM00011 (value not \ 13 | compatible) is sent.\ 14 |

\ 15 | \ 16 | '); 17 | -------------------------------------------------------------------------------- /docs/content/rm_n__.js: -------------------------------------------------------------------------------- 1 | document.write('\ 2 | \ 3 |
rm_n__
  
  Same as rm_n_, and dispose the indicator
\ 4 |
\
 5 | <<ind
\ 6 | value pointer value
\ 7 | default ind value options(*nopass)
\ 8 |
\ 9 |

\ 10 |  Same as rm_n_. Additionally, value is immediately disposed.\ 11 |

\ 12 | \ 13 | '); 14 | -------------------------------------------------------------------------------- /docs/content/rm_nit.js: -------------------------------------------------------------------------------- 1 | document.write('\ 2 | \ 3 |
rm_nit
  
  Number of items
\ 4 |
rm_num_items
\ 5 |
\
 6 | <<uns(20)
\ 7 | map pointer value
\ 8 | item pointer value
\ 9 | key1 pointer value options(*nopass)
\ 10 | key2 pointer value options(*nopass)
\ 11 |
\ 12 |

\ 13 |  Return the number of items in map that are equal to item.
\ 14 |  Items are always compared using the default compare function rm_cmp.
\ 15 |  If key1 and/or key2 are passed and not *null then only the items with \ 16 | keys equal to or greater than key1, and equal to or less than key2, \ 17 | will be considered. Both keys are optional. If key1 is not passed or *null \ 18 | it\'s assumed to be the lowest key. If key2 is not passed it\'s assumed to be \ 19 | the same as key1 (if key1 is passed). If key2 is *null it\'s assumed to \ 20 | be the highest key. Return 0 if key1 is greater than key2, or if only \ 21 | key1 is passed with value *null.
\ 22 |  This procedure disposes item, key1 and key2 automatically, unless they\'re \ 23 | a manually disposed map, or a value/map contained in a map.\ 24 |

\ 25 | \ 26 | '); 27 | -------------------------------------------------------------------------------- /docs/content/rm_num.js: -------------------------------------------------------------------------------- 1 | document.write('\ 2 | \ 3 |
rm_num
  
  Number of key/item pairs
\ 4 |
rm_num_keys
\ 5 |
\
 6 | <<uns(20)
\ 7 | map pointer value
\ 8 | key1 pointer value options(*nopass)
\ 9 | key2 pointer value options(*nopass)
\ 10 |
\ 11 |

\ 12 |  Return the number of key/item pairs in map with key equal to or \ 13 | greater than key1, and equal to or less than key2. Both keys \ 14 | are optional. If key1 is not passed or *null it\'s assumed to be \ 15 | the lowest key. If key2 is not passed it\'s assumed to be the same \ 16 | as key1 (if key1 is passed). If key2 is *null it\'s assumed to \ 17 | be the highest key. Return 0 if key1 is greater than key2, or \ 18 | only key1 is passed with value *null.
\ 19 |  This procedure is not efficient. Unless both keys are *null or not \ 20 | passed (i.e. all key/item pairs) it counts the number of keys each \ 21 | time it\'s called (no caching).
\ 22 |  This procedure disposes key1 and key2 automatically, unless \ 23 | key1/key2 is a manually disposed map, or a value/map contained \ 24 | in a map.\ 25 |

\ 26 | \ 27 | '); 28 | -------------------------------------------------------------------------------- /docs/content/rm_p.js: -------------------------------------------------------------------------------- 1 | document.write('\ 2 | \ 3 |
rm_p
  
  Create a new packed decimal value, 10.4 digits
\ 4 |
\
 5 | <<pointer
\ 6 | value packed(14:4) value
\ 7 | opt int(10) value options(*nopass)
\ 8 |
\ 9 |

\ 10 |  Create a new packed decimal value, with 10.4 digits.
\ 11 |  Pass opt to set special property or user data (see rm_).\ 12 |

\ 13 | \ 14 | '); 15 | -------------------------------------------------------------------------------- /docs/content/rm_p1.js: -------------------------------------------------------------------------------- 1 | document.write('\ 2 | \ 3 |
rm_p1
  
  Create a new packed decimal value, 10.4 digits
\ 4 |
\
 5 | <<pointer
\ 6 | value packed(14:4) value
\ 7 | opt int(10) value options(*nopass)
\ 8 |
\ 9 |

\ 10 |  Same as rm_p.\ 11 |

\ 12 | \ 13 | '); 14 | -------------------------------------------------------------------------------- /docs/content/rm_p1_.js: -------------------------------------------------------------------------------- 1 | document.write('\ 2 | \ 3 |
rm_p1_
  
  Convert a number to an RPG packed decimal value, 10.4 digits
\ 4 |
\
 5 | <<packed(14:4)
\ 6 | value pointer value
\ 7 | default packed(14:4) value options(*nopass)
\ 8 |
\ 9 |

\ 10 |  Same as rm_p_.\ 11 |

\ 12 | \ 13 | '); 14 | -------------------------------------------------------------------------------- /docs/content/rm_p1__.js: -------------------------------------------------------------------------------- 1 | document.write('\ 2 | \ 3 |
rm_p1__
  
  Same as rm_p_, and dispose the number
\ 4 |
\
 5 | <<packed(14:4)
\ 6 | value pointer value
\ 7 | default packed(14:4) value options(*nopass)
\ 8 |
\ 9 |

\ 10 |  Same as rm_p1_. Additionally, value is immediately disposed.\ 11 |

\ 12 | \ 13 | '); 14 | -------------------------------------------------------------------------------- /docs/content/rm_p2.js: -------------------------------------------------------------------------------- 1 | document.write('\ 2 | \ 3 |
rm_p2
  
  Create a new packed decimal value, 20.8 digits
\ 4 |
\
 5 | <<pointer
\ 6 | value packed(28:8) value
\ 7 | opt int(10) value options(*nopass)
\ 8 |
\ 9 |

\ 10 |  Create a new packed decimal value, with 20.8 digits.
\ 11 |  Pass opt to set special property or user data (see rm_).\ 12 |

\ 13 | \ 14 | '); 15 | -------------------------------------------------------------------------------- /docs/content/rm_p2_.js: -------------------------------------------------------------------------------- 1 | document.write('\ 2 | \ 3 |
rm_p2_
  
  Convert a number to an RPG packed decimal value, 20.8 digits
\ 4 |
\
 5 | <<packed(28:8)
\ 6 | value pointer value
\ 7 | default packed(28:8) value options(*nopass)
\ 8 |
\ 9 |

\ 10 |  Return an RPG packed(28:8) from value, which must be a number.
\ 11 |  See rm_p_.\ 12 |

\ 13 | \ 14 | '); 15 | -------------------------------------------------------------------------------- /docs/content/rm_p2__.js: -------------------------------------------------------------------------------- 1 | document.write('\ 2 | \ 3 |
rm_p2__
  
  Same as rm_p2_, and dispose the number
\ 4 |
\
 5 | <<packed(28:8)
\ 6 | value pointer value
\ 7 | default packed(28:8) value options(*nopass)
\ 8 |
\ 9 |

\ 10 |  Same as rm_p2_. Additionally, value is immediately disposed.\ 11 |

\ 12 | \ 13 | '); 14 | -------------------------------------------------------------------------------- /docs/content/rm_p3.js: -------------------------------------------------------------------------------- 1 | document.write('\ 2 | \ 3 |
rm_p3
  
  Create a new packed decimal value, 30.16 digits
\ 4 |
\
 5 | <<pointer
\ 6 | value packed(46:16) value
\ 7 | opt int(10) value options(*nopass)
\ 8 |
\ 9 |

\ 10 |  Create a new packed decimal value, with 30.16 digits.
\ 11 |  Pass opt to set special property or user data (see rm_).\ 12 |

\ 13 | \ 14 | '); 15 | -------------------------------------------------------------------------------- /docs/content/rm_p3_.js: -------------------------------------------------------------------------------- 1 | document.write('\ 2 | \ 3 |
rm_p3_
  
  Convert a number to an RPG packed decimal value, 30.16 digits
\ 4 |
\
 5 | <<packed(46:16)
\ 6 | value pointer value
\ 7 | default packed(46:16) value options(*nopass)
\ 8 |
\ 9 |

\ 10 |  Return an RPG packed(46:16) from value, which must be a number.
\ 11 |  See rm_p_.\ 12 |

\ 13 | \ 14 | '); 15 | -------------------------------------------------------------------------------- /docs/content/rm_p3__.js: -------------------------------------------------------------------------------- 1 | document.write('\ 2 | \ 3 |
rm_p3__
  
  Same as rm_p3_, and dispose the number
\ 4 |
\
 5 | <<packed(46:16)
\ 6 | value pointer value
\ 7 | default packed(46:16) value options(*nopass)
\ 8 |
\ 9 |

\ 10 |  Same as rm_p3_. Additionally, value is immediately disposed.\ 11 |

\ 12 | \ 13 | '); 14 | -------------------------------------------------------------------------------- /docs/content/rm_p_.js: -------------------------------------------------------------------------------- 1 | document.write('\ 2 | \ 3 |
rm_p_
  
  Convert a number to an RPG packed decimal value, 10.4 digits
\ 4 |
\
 5 | <<packed(14:4)
\ 6 | value pointer value
\ 7 | default packed(14:4) value options(*nopass)
\ 8 |
\ 9 |

\ 10 |  Return an RPG packed(14:4) from value, \ 11 | which must be a number. If value is *null then return 0, or default \ 12 | when passed. If value is not a number escape message RM00011 (value not \ 13 | compatible) is sent. If the value is too big for the returned packed \ 14 | decimal format then message MCH1210 (receiver value too small) is sent.\ 15 |

\ 16 | \ 17 | '); 18 | -------------------------------------------------------------------------------- /docs/content/rm_p__.js: -------------------------------------------------------------------------------- 1 | document.write('\ 2 | \ 3 |
rm_p__
  
  Same as rm_p_, and dispose the number
\ 4 |
\
 5 | <<packed(14:4)
\ 6 | value pointer value
\ 7 | default packed(14:4) value options(*nopass)
\ 8 |
\ 9 |

\ 10 |  Same as rm_p_. Additionally, value is immediately disposed.\ 11 |

\ 12 | \ 13 | '); 14 | -------------------------------------------------------------------------------- /docs/content/rm_rdn.js: -------------------------------------------------------------------------------- 1 | document.write('\ 2 | \ 3 |
rm_rdn
  
  Read next key/item pair
\ 4 |
rm_read_next
\ 5 |
\
 6 | <<ind
\ 7 | cur pointer value
\ 8 | key1 pointer value options(*nopass)
\ 9 | key2 pointer value options(*nopass)
\ 10 |
\ 11 |

\ 12 |  Call rm_rdn to read the next key/item pair for cursor cur, or \ 13 | call rm_rdp to read the previous key/item pair. The next/previous \ 14 | pair becomes the current key/item pair. Procedures rm_key and \ 15 | rm_itm are used to read the current key or item, resp.
\ 16 |  Return *on if there was a next or previous key/item. Return *off if \ 17 | the cursor is at the end or the beginning, in which case there is no current key/item anymore.
\ 18 |  Key/item pairs can be removed while a cursor iterates over them. \ 19 | If the current key/item pair is removed from the map then there is no \ 20 | current key/item pair anymore, and rm_key and rm_itm will return \ 21 | *null. If rm_rdn was used to read the current key/item the cursor is \ 22 | positioned just before the key/item pair that comes after the removed \ 23 | key/item. If rm_rdp was used the cursor is positioned just after the \ 24 | key/item pair that comes before the removed key/item. Procedures rm_rdn \ 25 | and rm_rdp must be used to get a current key/item pair again. The cursor \ 26 | is positioned at the end or beginning, resp., when there is no next or \ 27 | previous pair anymore.
\ 28 |  If key1 and/or key2 are passed then the next or previous key must be \ 29 | equal to or greater than key1, and equal to or less than key2, else \ 30 | return *off (the cursor is at the end/beginning and there is no current \ 31 | key/item anymore). Both keys are optional. If key1 is not passed or \ 32 | *null it\'s assumed to be the lowest key. If key2 is not passed it\'s \ 33 | assumed to be the same as key1 (if key1 is passed). If key2 is \ 34 | *null it\'s assumed to be the highest key. Always return *off if key1 \ 35 | is greater than key2, or if only key1 is passed with value *null.
\ 36 |  These procedures dispose key1 and key2 automatically, unless \ 37 | key1/key2 is a manually disposed map, or a value/map contained \ 38 | in a map.\ 39 |

\ 40 | \ 41 | '); 42 | -------------------------------------------------------------------------------- /docs/content/rm_rdp.js: -------------------------------------------------------------------------------- 1 | document.write('\ 2 | \ 3 |
rm_rdp
  
  Read previous key/item pair
\ 4 |
rm_read_prev
\ 5 |
\
 6 | <<ind
\ 7 | cur pointer value
\ 8 | key1 pointer value options(*nopass)
\ 9 | key2 pointer value options(*nopass)
\ 10 |
\ 11 |

\ 12 |  See rm_rdn.\ 13 |

\ 14 | \ 15 | '); 16 | -------------------------------------------------------------------------------- /docs/content/rm_remove_event_handler.js: -------------------------------------------------------------------------------- 1 | document.write('\ 2 | \ 3 |
rm_remove_event_handler


  Remove an event handler from a map
\ 4 |
\
 5 | <<pointer
\ 6 | map pointer value
\ 7 | hproc pointer(*proc) value
\ 8 |
\ 9 |

\ 10 |  Remove event handler hproc from the list of event handlers registered \ 11 | for map, and return map.
\ 12 |  If the handler was added mutiple times then only the last one added \ 13 | is removed.
\ 14 |  Do nothing if the handler isn\'t found.\ 15 |

\ 16 | \ 17 | '); 18 | -------------------------------------------------------------------------------- /docs/content/rm_rmv.js: -------------------------------------------------------------------------------- 1 | document.write('\ 2 | \ 3 |
rm_rmv
  
  Remove key/item pair
\ 4 |
rm_remove
\ 5 |
\
 6 | <<pointer
\ 7 | map pointer value
\ 8 | key pointer value
\ 9 | opt char(10) value options(*nopass)
\ 10 |
\ 11 |

\ 12 |  Remove the key/item pair with key equal to key from map, if \ 13 | found, and return map. If not found do nothing, and return map.
\ 14 |  If the key and/or item is a value or an automatically disposed map \ 15 | then they\'re disposed.
\ 16 |  In case there are multiple keys equal to key then opt indicates \ 17 | which key: \'*f\' or \'*first\' for the first one (which is the default), \ 18 | or \'*l\' or \'*last\' for the last one.
\ 19 |  This procedure disposes key automatically, unless key is a manually \ 20 | disposed map, or a value/map contained in a map.\ 21 |

\ 22 | \ 23 | '); 24 | -------------------------------------------------------------------------------- /docs/content/rm_rmva.js: -------------------------------------------------------------------------------- 1 | document.write('\ 2 | \ 3 |
rm_rmva
  
  Remove all key/item pairs
\ 4 |
rm_remove_all
\ 5 |
\
 6 | <<pointer
\ 7 | map pointer value
\ 8 | key1 pointer value options(*nopass)
\ 9 | key2 pointer value options(*nopass)
\ 10 |
\ 11 |

\ 12 |  Like rm_rmv, but all key/item pairs with key equal to or greater \ 13 | than key1, and equal to or less than key2 are removed from map.
\ 14 |  Both keys are optional. If key1 is not passed or *null it\'s assumed \ 15 | to be the lowest key. If key2 is not passed it\'s assumed to be the \ 16 | same as key1 (if key1 is passed). If key2 is *null it\'s assumed \ 17 | to be the highest key. Remove nothing if key1 is greater than key2, \ 18 | or if only key1 is passed with value *null.
\ 19 |  This procedure disposes key1 and key2 automatically, unless \ 20 | key1/key2 is a manually disposed map, or a value/map contained in \ 21 | a map.\ 22 |

\ 23 | \ 24 | '); 25 | -------------------------------------------------------------------------------- /docs/content/rm_s.js: -------------------------------------------------------------------------------- 1 | document.write('\ 2 | \ 3 |
rm_s
  
  Create a new string value
\ 4 |
\
 5 | <<pointer
\ 6 | value varchar(30000) ccsid(*utf8) const
\ 7 | opt int(10) value options(*nopass)
\ 8 |
\ 9 |

\ 10 |  Create a new string value, up to 30.000 bytes long.
\ 11 |  A string is character data (text) in utf-8 format.
\ 12 |  The raw bytes can be accessed with rm_a*_.
\ 13 |  Pass opt to set special property or user data (see rm_).
\ 14 |  The argument for parameter value is converted to utf-8 when it\'s CCSID is \ 15 | not 65535. Each utf-8 character consists of one to four bytes. This means care \ 16 | should be taken that the converted value does not exceed 30.000 bytes.\ 17 |

\ 18 | \ 19 | '); 20 | -------------------------------------------------------------------------------- /docs/content/rm_s1_.js: -------------------------------------------------------------------------------- 1 | document.write('\ 2 | \ 3 |
rm_s1_
  
  Convert string to RPG utf-8 character data (100)
\ 4 |
\
 5 | <<varchar(100) ccsid(*utf8)
\ 6 | value pointer value
\ 7 | default varchar(100) ccsid(*utf8) const options(*nopass)
\ 8 |
\ 9 |

\ 10 |  See rm_s_.\ 11 |

\ 12 | \ 13 | '); 14 | -------------------------------------------------------------------------------- /docs/content/rm_s1__.js: -------------------------------------------------------------------------------- 1 | document.write('\ 2 | \ 3 |
rm_s1__
  
  Same as rm_s1_, and dispose the string
\ 4 |
\
 5 | <<varchar(100) ccsid(*utf8)
\ 6 | value pointer value
\ 7 | default varchar(100) ccsid(*utf8) const options(*nopass)
\ 8 |
\ 9 |

\ 10 |  Same as rm_s1_. Additionally, value is immediately disposed.\ 11 |

\ 12 | \ 13 | '); 14 | -------------------------------------------------------------------------------- /docs/content/rm_s2_.js: -------------------------------------------------------------------------------- 1 | document.write('\ 2 | \ 3 |
rm_s2_
  
  Convert string to RPG utf-8 character data (1000)
\ 4 |
\
 5 | <<varchar(1000) ccsid(*utf8)
\ 6 | value pointer value
\ 7 | default varchar(1000) ccsid(*utf8) const options(*nopass)
\ 8 |
\ 9 |

\ 10 |  See rm_s_.\ 11 |

\ 12 | \ 13 | '); 14 | -------------------------------------------------------------------------------- /docs/content/rm_s2__.js: -------------------------------------------------------------------------------- 1 | document.write('\ 2 | \ 3 |
rm_s2__
  
  Same as rm_s2_, and dispose the string
\ 4 |
\
 5 | <<varchar(1000) ccsid(*utf8)
\ 6 | value pointer value
\ 7 | default varchar(1000) ccsid(*utf8) const options(*nopass)
\ 8 |
\ 9 |

\ 10 |  Same as rm_s2_. Additionally, value is immediately disposed.\ 11 |

\ 12 | \ 13 | '); 14 | -------------------------------------------------------------------------------- /docs/content/rm_s3_.js: -------------------------------------------------------------------------------- 1 | document.write('\ 2 | \ 3 |
rm_s3_
  
  Convert string to RPG utf-8 character data (10000)
\ 4 |
\
 5 | <<varchar(10000) ccsid(*utf8)
\ 6 | value pointer value
\ 7 | default varchar(10000) ccsid(*utf8) const options(*nopass)
\ 8 |
\ 9 |

\ 10 |  See rm_s_.\ 11 |

\ 12 | \ 13 | '); 14 | -------------------------------------------------------------------------------- /docs/content/rm_s3__.js: -------------------------------------------------------------------------------- 1 | document.write('\ 2 | \ 3 |
rm_s3__
  
  Same as rm_s3_, and dispose the string
\ 4 |
\
 5 | <<varchar(10000) ccsid(*utf8)
\ 6 | value pointer value
\ 7 | default varchar(10000) ccsid(*utf8) const options(*nopass)
\ 8 |
\ 9 |

\ 10 |  Same as rm_s3_. Additionally, value is immediately disposed.\ 11 |

\ 12 | \ 13 | '); 14 | -------------------------------------------------------------------------------- /docs/content/rm_s_.js: -------------------------------------------------------------------------------- 1 | document.write('\ 2 | \ 3 |
rm_s_
  
  Convert string to RPG utf-8 character data
\ 4 |
\
 5 | <<varchar(30000) ccsid(*utf8)
\ 6 | value pointer value
\ 7 | default varchar(30000) ccsid(*utf8) const options(*nopass)
\ 8 |
\ 9 |

\ 10 |  Return an RPG varchar(30000) in utf-8 format from value, which must \ 11 | be a string. If value is *null then return \'\', or default when \ 12 | passed. If value is not compatible escape message RM00011 (value \ 13 | not compatible) is sent.
\ 14 |  Procedures rm_s1_, rm_s2_ and rm_s3_ are a bit faster because \ 15 | of the shorter return value (100, 1000 or 10000).\ 16 |

\ 17 | \ 18 | '); 19 | -------------------------------------------------------------------------------- /docs/content/rm_s__.js: -------------------------------------------------------------------------------- 1 | document.write('\ 2 | \ 3 |
rm_s__
  
  Same as rm_s_, and dispose the string
\ 4 |
\
 5 | <<varchar(30000) ccsid(*utf8)
\ 6 | value pointer value
\ 7 | default varchar(30000) ccsid(*utf8) const options(*nopass)
\ 8 |
\ 9 |

\ 10 |  Same as rm_s_. Additionally, value is immediately disposed.\ 11 |

\ 12 | \ 13 | '); 14 | -------------------------------------------------------------------------------- /docs/content/rm_sa.js: -------------------------------------------------------------------------------- 1 | document.write('\ 2 | \ 3 |
rm_sa
  
  Create a new string value, alt. sort sequence
\ 4 |
\
 5 | <<pointer
\ 6 | value varchar(30000) ccsid(*utf8) const
\ 7 | opt int(10) value options(*nopass)
\ 8 |
\ 9 |

\ 10 |  Like rm_s, but the string is compared using an alternate sort sequence. \ 11 | When two strings are compared which are both created with rm_sa \ 12 | or rm_sab the comparison is done using the alternate sort sequence, \ 13 | instead of the default. Which sort sequence depends on the build options \ 14 | that were used, but usually it is *langidshr.
\ 15 |  Comparing strings using the alternate sort sequence takes considerably \ 16 | more resources than normal comparisons. Strings must be converted \ 17 | to the job CCSID first before they can be compared using the alternate \ 18 | sort sequence.
\ 19 |  Pass opt to set special property or user data (see rm_).\ 20 |

\ 21 | \ 22 | '); 23 | -------------------------------------------------------------------------------- /docs/content/rm_sab.js: -------------------------------------------------------------------------------- 1 | document.write('\ 2 | \ 3 |
rm_sab
  
  Create a new string value, alt. sort seq., from binary
\ 4 |
\
 5 | <<pointer
\ 6 | value varchar(30000) const
\ 7 | opt int(10) value options(*nopass)
\ 8 |
\ 9 |

\ 10 |  Like rm_sa, but value passes the raw bytes that is already in utf-8 format.
\ 11 |  Pass opt to set special property or user data (see rm_).\ 12 |

\ 13 | \ 14 | '); 15 | -------------------------------------------------------------------------------- /docs/content/rm_sav.js: -------------------------------------------------------------------------------- 1 | document.write('\ 2 | \ 3 |
rm_sav
  
  Set attribute values
\ 4 |
rm_set_attr_val
\ 5 |
\
 6 | <<pointer
\ 7 | map pointer value
\ 8 | a001 varchar(100) ccsid(*utf8) value options(*nopass)
\ 9 | v001 varchar(100) ccsid(*utf8) value options(*nopass)
\ 10 | ...
\ 11 | a100 varchar(100) ccsid(*utf8) value options(*nopass)
\ 12 | v100 varchar(100) ccsid(*utf8) value options(*nopass)
\ 13 |
\ 14 |

\ 15 |  Set up to 100 attributes of map to a value and return map.
\ 16 |  Each map can have one or more attributes set to a value, where \ 17 | each attribute has an utf-8 name, and an utf-8 value, both max. \ 18 | 100 bytes. There is no restriction on attribute names and values.
\ 19 |  The first attribute name and value is passed with parameters 2 and 3, \ 20 | a001 and v001, the second with a002 and v002, etc.
\ 21 |  Send escape message RM00102 if an attribute name is blank or empty.
\ 22 |  If a value is not passed or it is blank or empty then the attribute \ 23 | is "unset".
\ 24 |  If no attribute names or values are passed at all (i.e. only map \ 25 | is passed) then every attribute of map is unset (all are cleared).
\ 26 |  Attributes are used to store settings and meta data that is used \ 27 | by different software modules/applications, either built-in or external. \ 28 | Attributes should be named "module-name" where module is the name of the \ 29 | module or function and name is the attribute name. The module\'s docs \ 30 | should specify the attributes that are used and their meaning.
\ 31 |  Attribute names starting with "_" (underscore) should not be used \ 32 | as these are reserved for RpgMap.\ 33 |

\ 34 | \ 35 | '); 36 | -------------------------------------------------------------------------------- /docs/content/rm_sb.js: -------------------------------------------------------------------------------- 1 | document.write('\ 2 | \ 3 |
rm_sb
  
  Create a new string value, from binary
\ 4 |
\
 5 | <<pointer
\ 6 | value varchar(30000) const
\ 7 | opt int(10) value options(*nopass)
\ 8 |
\ 9 |

\ 10 |  Like rm_s, but value passes the raw bytes that is already in utf-8 format.
\ 11 |  Pass opt to set special property or user data (see rm_).\ 12 |

\ 13 | \ 14 | '); 15 | -------------------------------------------------------------------------------- /docs/content/rm_scf.js: -------------------------------------------------------------------------------- 1 | document.write('\ 2 | \ 3 |
rm_scf
  
  Set compare function
\ 4 |
rm_set_comp_fun
\ 5 |
\
 6 | <<pointer
\ 7 | map pointer value
\ 8 | comp pointer(*proc) value
\ 9 |
\ 10 |

\ 11 |  Set the compare function of map, which must be empty, to comp, \ 12 | and return map. Send escape messsage RM00041 if map is not empty.
\ 13 |  The compare function of map determines how the keys in map are \ 14 | compared/ordered. Normally rm_cmp is used as the compare function, \ 15 | but this can be overridden with another compare function, comp, for \ 16 | a specific map. When two keys that are both maps are compared, the \ 17 | order in which the keys and items are compared is determined by the \ 18 | compare functions of the two maps. But when two keys or items, from \ 19 | these two maps, are compared then the compare function of the containing \ 20 | map is used. Unless this behavior is changed with another \ 21 | compare function.
\ 22 |  Procedure comp must have the following signature:\ 23 |

\ 24 |
\
25 |   rtn type: int(10)
\ 26 | par. 1 : obj1 pointer value
\ 27 | 2 : obj2 pointer value
\ 28 |
\ 29 |

\ 30 |  Procedure comp compares obj1 and obj2, which can be *null or \ 31 | a value or a map, and returns 0 of they\'re equal, -1 if obj1 is \ 32 | less than obj2, or 1 if obj1 is greater than obj2.
\ 33 |  If comp returns something else than 0, 1 or -1 then the comparison \ 34 | falls back to rm_cmp.
\ 35 |  If comp is *null then rm_cmp is reset to be used as the compare \ 36 | function again.
\ 37 |  The following is a simple example of a comp procedure body, which \ 38 | has the effect that the sort order is reversed: return rm_cmp(obj1:obj2)*-1;.\ 39 |

\ 40 | \ 41 | '); 42 | -------------------------------------------------------------------------------- /docs/content/rm_sgt.js: -------------------------------------------------------------------------------- 1 | document.write('\ 2 | \ 3 |
rm_sgt
  
  Set greater than
\ 4 |
rm_setgt
\ 5 |
\
 6 | <<pointer
\ 7 | cur pointer value
\ 8 | key pointer value options(*nopass)
\ 9 |
\ 10 |

\ 11 |  See rm_sll.\ 12 |

\ 13 | \ 14 | '); 15 | -------------------------------------------------------------------------------- /docs/content/rm_sgtp.js: -------------------------------------------------------------------------------- 1 | document.write('\ 2 | \ 3 |
rm_sgtp
  
  Set greater than, read previous
\ 4 |
rm_setgt_read_prev
\ 5 |
\
 6 | <<ind
\ 7 | cur pointer value
\ 8 | pos ind options(*nopass:*omit)
\ 9 | key1 pointer value options(*nopass)
\ 10 | key2 pointer value options(*nopass)
\ 11 |
\ 12 |

\ 13 |  Analogous to rm_slln, this procedure combines rm_sgt and \ 14 | rm_rdp into one.
\ 15 |  Each time rm_sgtp is called: ① if pos is *on the cursor is \ 16 | positioned with rm_sgt on key1, ② pos is set to *off, ③ \ 17 | rm_rdp is called with key1 and key2 to read the previous \ 18 | key/item pair, ④ the result of calling rm_rdp is returned.
\ 19 |  Parameter key1 is passed as argument key to rm_sgt and key1 \ 20 | and key2 are passed to rm_rdp. See the docs for rm_sgt and \ 21 | rm_rdp on how optional parameters key1 and key2 are specified.
\ 22 |  The following code loops through all keys equal to d\'2017-01-01\', \ 23 | but backwards.\ 24 |

\ 25 |
\
26 | pos = *on;
\ 27 | dow rm_sgtp(cur:pos:rm_d(d\'2017-01-01\')); // \'pos\' is set to *off
\ 28 | ... // set \'pos\' to *on to trigger \'rm_sgt\' again while looping
\ 29 | enddo;
\ 30 |
\ 31 |

\ 32 |  If pos is not passed or is *OMITted then the procedure behaves as if \ 33 | pos would have been passed with value *on. This can be used to position \ 34 | the cursor and read the previous key/item pair in one call without having \ 35 | to provide an indicator field.
\ 36 |  This procedure disposes key1 and key2 automatically, unless \ 37 | key1/key2 is a manually disposed map, or a value/map contained \ 38 | in a map.\ 39 |

\ 40 | \ 41 | '); 42 | -------------------------------------------------------------------------------- /docs/content/rm_sll.js: -------------------------------------------------------------------------------- 1 | document.write('\ 2 | \ 3 |
rm_sll
  
  Set lower limit
\ 4 |
rm_setll
\ 5 |
\
 6 | <<pointer
\ 7 | cur pointer value
\ 8 | key pointer value options(*nopass)
\ 9 |
\ 10 |

\ 11 |  Position cursor cur on key and return cur.
\ 12 |  Call rm_sll to position the cursor just before the lowest key that is equal \ 13 | to or greater than key. Call rm_sgt to position the cursor just after the \ 14 | highest key that is equal to or less than key. If key is *null or not passed \ 15 | then the cursor is positioned at the beginning or the end, resp.
\ 16 |  After calling one of these procedures cursor cur has no current key/item pair.
\ 17 |  Call rm_rdn or rm_rdp to read the next or previous key/item pair, resp., \ 18 | which then becomes the current key/value pair.
\ 19 |  If rm_sll is called and the next key/item pair is removed from the map the \ 20 | cursor is positioned just after the previous pair. If rm_sgt is called and \ 21 | the previous key/item pair is removed from the map the cursor is positioned \ 22 | just before the next pair.
\ 23 |  If rm_sll is called and there is no key equal to or greater, or if rm_sgt \ 24 | is called and there is no key equal to or less, the cursor is positioned at the end or beginning resp.
\ 25 |  These procedures dispose key automatically, unless key is a manually \ 26 | disposed map, or a value/map contained in a map.\ 27 |

\ 28 | \ 29 | '); 30 | -------------------------------------------------------------------------------- /docs/content/rm_slln.js: -------------------------------------------------------------------------------- 1 | document.write('\ 2 | \ 3 |
rm_slln
  
  Set lower limit, read next
\ 4 |
rm_setll_read_next
\ 5 |
\
 6 | <<ind
\ 7 | cur pointer value
\ 8 | pos ind options(*nopass:*omit)
\ 9 | key1 pointer value options(*nopass)
\ 10 | key2 pointer value options(*nopass)
\ 11 |
\ 12 |

\ 13 |  This procedure combines rm_sll and rm_rdn into one, so that \ 14 | one expression enables both positioning the cursor and repeatedly \ 15 | reading the next key/item pair. Positioning is only done when \ 16 | input/output parameter pos is *on, which is set to *off automatically \ 17 | when rm_slln is called. This parameter should be *on the first time \ 18 | rm_slln is called to trigger the positioning.
\ 19 |  Each time rm_slln is called: ① if pos is *on the cursor is \ 20 | positioned with rm_sll on key1, ② pos is set to *off, ③ \ 21 | rm_rdn is called with key1 and key2 to read the next key/item \ 22 | pair, ④ the result of calling rm_rdn is returned.
\ 23 |  When doing a read-equal (i.e. when specifying only key1 for rm_rdn \ 24 | or rm_rdp), key1 must be specified twice (rm_sll and rm_rdn). \ 25 | Using this method, key1 needs to be specified only once, but at the \ 26 | cost of the extra indicator which makes the code a little more complex.
\ 27 |  Parameter key1 is passed as argument key to rm_sll and key1 \ 28 | and key2 are passed to rm_rdn. See the docs for rm_sll and \ 29 | rm_rdn on how optional parameters key1 and key2 are specified.
\ 30 |  The following code loops through all keys equal to d\'2017-01-01\'.\ 31 |

\ 32 |
\
33 | pos = *on;
\ 34 | dow rm_slln(cur:pos:rm_d(d\'2017-01-01\')); // \'pos\' is set to *off
\ 35 | ... // set \'pos\' to *on to trigger \'rm_sll\' again while looping
\ 36 | enddo;
\ 37 |
\ 38 |

\ 39 |  If pos is not passed or is *OMITted then the procedure behaves as if \ 40 | pos would have been passed with value *on. This can be used to position \ 41 | the cursor and read the next key/item pair in one call without having \ 42 | to provide an indicator field.
\ 43 |  This procedure disposes key1 and key2 automatically, unless \ 44 | key1/key2 is a manually disposed map, or a value/map contained \ 45 | in a map.\ 46 |

\ 47 | \ 48 | '); 49 | -------------------------------------------------------------------------------- /docs/content/rm_t.js: -------------------------------------------------------------------------------- 1 | document.write('\ 2 | \ 3 |
rm_t
  
  Create a new time value
\ 4 |
\
 5 | <<pointer
\ 6 | value time(*iso.) value
\ 7 | opt int(10) value options(*nopass)
\ 8 |
\ 9 |

\ 10 |  Create a new time value.
\ 11 |  Pass opt to set special property or user data (see rm_).\ 12 |

\ 13 | \ 14 | '); 15 | -------------------------------------------------------------------------------- /docs/content/rm_t_.js: -------------------------------------------------------------------------------- 1 | document.write('\ 2 | \ 3 |
rm_t_
  
  Convert a time/timestamp to an RPG time value
\ 4 |
\
 5 | <<time(*iso.)
\ 6 | value pointer value
\ 7 | default time(*iso.) value options(*nopass)
\ 8 |
\ 9 |

\ 10 |  Return an RPG time from value, which must be a time or timestamp.
\ 11 |  If value is *null then return *loval, or default \ 12 | when passed. If value is not compatible escape message RM00011 (value not \ 13 | compatible) is sent.
\ 14 |  A timestamp is converted to a time using BIF %time.\ 15 |

\ 16 | \ 17 | '); 18 | -------------------------------------------------------------------------------- /docs/content/rm_t__.js: -------------------------------------------------------------------------------- 1 | document.write('\ 2 | \ 3 |
rm_t__
  
  Same as rm_t_, and dispose the time/timestamp
\ 4 |
\
 5 | <<time(*iso.)
\ 6 | value pointer value
\ 7 | default time(*iso.) value options(*nopass)
\ 8 |
\ 9 |

\ 10 |  Same as rm_t_. Additionally, value is immediately disposed.\ 11 |

\ 12 | \ 13 | '); 14 | -------------------------------------------------------------------------------- /docs/content/rm_usrd.js: -------------------------------------------------------------------------------- 1 | document.write('\ 2 | \ 3 |
rm_usrd
  
  Return user data
\ 4 |
rm_user_data
\ 5 |
\
 6 | <<int(10)
\ 7 | obj pointer value
\ 8 |
\ 9 |

\ 10 |  Return the user data of obj, which must be a map or a value.
\ 11 |  Return 0 if there is no user data.
\ 12 |  See rm_.\ 13 |

\ 14 | \ 15 | '); 16 | -------------------------------------------------------------------------------- /docs/content/rm_v.js: -------------------------------------------------------------------------------- 1 | document.write('\ 2 | \ 3 |
rm_v
  
  Create a new vector, automatically disposed
\ 4 |
\
 5 | <<pointer
\ 6 | i001 pointer value options(*nopass)
\ 7 | ...
\ 8 | i100 pointer value options(*nopass)
\ 9 |
\ 10 |

\ 11 |  Create a vector, i.e. same as rm_m except that the keys can be only \ 12 | integer values and two vectors are compared in a special way (see rm_cmp). \ 13 | E.g. rm_v(rm_d(d\'2017-01-01\'):rm_i(10)) and rm_v(rm_d(d\'2017-01-01\')) are \ 14 | considered equal.
\ 15 |  The parameters of this procedure to immediately populate the vector only \ 16 | accept items. The keys are automatically generated. The first item is inserted \ 17 | with key rm_i(1), the second with key rm_i(2), etc.
\ 18 |  A vector represents a simple sequence of items, and is specially useful as \ 19 | a (partial) composite key.\ 20 |

\ 21 | \ 22 | '); 23 | -------------------------------------------------------------------------------- /docs/content/rm_x.js: -------------------------------------------------------------------------------- 1 | document.write('\ 2 | \ 3 |
rm_x
  
  Create a new pointer value
\ 4 |
\
 5 | <<pointer
\ 6 | value pointer value
\ 7 | opt int(10) value options(*nopass)
\ 8 |
\ 9 |

\ 10 |  Create a new pointer value.
\ 11 |  Pass opt to set special property or user data (see rm_).\ 12 |

\ 13 | \ 14 | '); 15 | -------------------------------------------------------------------------------- /docs/content/rm_x_.js: -------------------------------------------------------------------------------- 1 | document.write('\ 2 | \ 3 |
rm_x_
  
  Convert a pointer to an RPG pointer value
\ 4 |
\
 5 | <<pointer
\ 6 | value pointer value
\ 7 | default pointer value options(*nopass)
\ 8 |
\ 9 |

\ 10 |  Return an RPG pointer from value, which must be a pointer.
\ 11 |  If value is *null then return *null, or default \ 12 | when passed. If value is not compatible escape message RM00011 (value not \ 13 | compatible) is sent.
\ 14 |

\ 15 | \ 16 | '); 17 | -------------------------------------------------------------------------------- /docs/content/rm_x__.js: -------------------------------------------------------------------------------- 1 | document.write('\ 2 | \ 3 |
rm_x__
  
  Same as rm_x_, and dispose the pointer
\ 4 |
\
 5 | <<pointer
\ 6 | value pointer value
\ 7 | default pointer value options(*nopass)
\ 8 |
\ 9 |

\ 10 |  Same as rm_x_. Additionally, value is immediately disposed.\ 11 |

\ 12 | \ 13 | '); 14 | -------------------------------------------------------------------------------- /docs/content/rm_xp.js: -------------------------------------------------------------------------------- 1 | document.write('\ 2 | \ 3 |
rm_xp
  
  Create a new procedure pointer value
\ 4 |
\
 5 | <<pointer
\ 6 | value pointer(*proc) value
\ 7 | opt int(10) value options(*nopass)
\ 8 |
\ 9 |

\ 10 |  Create a new procedure pointer value.
\ 11 |  Pass opt to set special property or user data (see rm_).\ 12 |

\ 13 | \ 14 | '); 15 | -------------------------------------------------------------------------------- /docs/content/rm_xp_.js: -------------------------------------------------------------------------------- 1 | document.write('\ 2 | \ 3 |
rm_xp_
  
  Convert a procedure pointer to an RPG procedure pointer value
\ 4 |
\
 5 | <<pointer(*proc)
\ 6 | value pointer value
\ 7 | default pointer(*proc) value options(*nopass)
\ 8 |
\ 9 |

\ 10 |  Return an RPG pointer(*proc) from value, which must be a procedure pointer.
\ 11 |  If value is *null then return *null, or default \ 12 | when passed. If value is not compatible escape message RM00011 (value not \ 13 | compatible) is sent.\ 14 |

\ 15 | \ 16 | '); 17 | -------------------------------------------------------------------------------- /docs/content/rm_xp__.js: -------------------------------------------------------------------------------- 1 | document.write('\ 2 | \ 3 |
rm_xp__
  
  Same as rm_xp_, and dispose the proc. pointer
\ 4 |
\
 5 | <<pointer(*proc)
\ 6 | value pointer value
\ 7 | default pointer(*proc) value options(*nopass)
\ 8 |
\ 9 |

\ 10 |  Same as rm_xp_. Additionally, value is immediately disposed.\ 11 |

\ 12 | \ 13 | '); 14 | -------------------------------------------------------------------------------- /docs/content/rm_z.js: -------------------------------------------------------------------------------- 1 | document.write('\ 2 | \ 3 |
rm_z
  
  Create a new timestamp value
\ 4 |
\
 5 | <<pointer
\ 6 | value timestamp value
\ 7 | opt int(10) value options(*nopass)
\ 8 |
\ 9 |

\ 10 |  Create a new timestamp value.
\ 11 |  Pass opt to set special property or user data (see rm_).\ 12 |

\ 13 | \ 14 | '); 15 | -------------------------------------------------------------------------------- /docs/content/rm_z_.js: -------------------------------------------------------------------------------- 1 | document.write('\ 2 | \ 3 |
rm_z_
  
  Convert a date/timestamp to an RPG timestamp value
\ 4 |
\
 5 | <<timestamp
\ 6 | value pointer value
\ 7 | default timestamp value options(*nopass)
\ 8 |
\ 9 |

\ 10 |  Return an RPG timestamp from value, which must be a date or timestamp.
\ 11 |  If value is *null then return *loval, or default \ 12 | when passed. If value is not compatible escape message RM00011 (value not \ 13 | compatible) is sent.
\ 14 |  A date is converted to a timestamp using BIF %timestamp.\ 15 |

\ 16 | \ 17 | '); 18 | -------------------------------------------------------------------------------- /docs/content/rm_z__.js: -------------------------------------------------------------------------------- 1 | document.write('\ 2 | \ 3 |
rm_z__
  
  Same as rm_z_, and dispose the date/timestamp
\ 4 |
\
 5 | <<timestamp
\ 6 | value pointer value
\ 7 | default timestamp value options(*nopass)
\ 8 |
\ 9 |

\ 10 |  Same as rm_z_. Additionally, value is immediately disposed.\ 11 |

\ 12 | \ 13 | '); 14 | -------------------------------------------------------------------------------- /docs/content/sortord.js: -------------------------------------------------------------------------------- 1 | document.write('\ 2 | \ 3 |

Sort Order

\ 4 |
\ 5 |

\ 6 | The order of a key in a map is determined by the compare function of the map. By default this \ 7 | is rm_cmp. This compare function can be replaced by another \ 8 | (but only when the map is empty). See rm_scf.\ 9 |

\ 10 |

\ 11 | The sort order, when values and maps are compared with each other, is influenced by whether the compared \ 12 | maps and/or values have the "reversed order" and/or "case insensitive order" property (see rm_) \ 13 | and/or whether character data or strings are sorted using an alternate sort sequence (rm_aa, rm_sa).\ 14 |

\ 15 |

\ 16 | Procedure rm_cmp compares values and maps and uses the alternate \ 17 | sort sequence, and/or the "case insensitive order" property to determine the order, if applicable. \ 18 | However, when rm_cmp is replaced, "alternate sort sequence" and the \ 19 | "case insensitive order" property are not guaranteed to function as expected anymore, depending on the \ 20 | logic of the new compare function. The "reversed order property" will always function as expected; it can \ 21 | can not be ignored or altered by a new compare function.\ 22 |

\ 23 | \ 24 | '); 25 | -------------------------------------------------------------------------------- /docs/content/threads.js: -------------------------------------------------------------------------------- 1 | document.write('\ 2 | \ 3 |

Threads

\ 4 |
\ 5 |

\ 6 | RpgMap is not threadsafe. That means that when multiple threads are active in a job that uses RpgMap, care should \ 7 | be taken that no two threads execute any RpgMap procedure within the same activation group at the same time. \ 8 | This can be done using synchronization constructs such as locks, sempahores or mutexes. One could also simply specify \ 9 | control-options keyword thread(*serialize) for an RPG module, and make sure that all access to RpgMap is \ 10 | done through that module. This ensures that only one thread accesses RpgMap at any moment in time. This solution has \ 11 | a coarse granularity. It hinders performance when many threads are waiting and there is a greater risk for deadlocks. \ 12 | However, for most practical purposes using thread(*serialize) would be good enough.\ 13 |

\ 14 | \ 15 | '); 16 | -------------------------------------------------------------------------------- /docs/content/usage.js: -------------------------------------------------------------------------------- 1 | document.write('\ 2 | \ 3 |

Usage

\ 4 |
\ 5 |

\ 6 | Install library RPGMAP.
\ 7 | And add the following to your RPG source:
\ 8 |

\ 9 |
\
10 | bnddir(\'RPGMAP/RPGMAP\')
\ 11 | /include RPGMAP/INCLUDERPG,RPGMAP\ 12 |
\ 13 |

\ 14 | The IBM i version used must be at least 7.2.\ 15 |

\ 16 | \ 17 | '); 18 | -------------------------------------------------------------------------------- /docs/content/vectors.js: -------------------------------------------------------------------------------- 1 | document.write('\ 2 | \ 3 |

Vectors

\ 4 |
\ 5 |

\ 6 | A vector is a special automatically disposed map, created with rm_v. \ 7 | It\'s mainly used for representing a list or a sequence, particularly a (partial) composite key. \ 8 | A composite key is a key that is not one value, but a sequence of 1 or more values. See example 2.\ 9 |

\ 10 |

\ 11 | The keys of a vector must always be integers.\ 12 |

\ 13 |

\ 14 | The expression rm_v(rm_a(\'a\'):rm_a(\'b\')) creates a vector, i.e. a map, with keys 1 \ 15 | and 2 and items \'a\' and \'b\'. Only the items are specified. \ 16 | The keys are automatically generated; the first item gets key rm_i(1), the second item gets key rm_i(2), etc.\ 17 |

\ 18 |

\ 19 | When two vectors are compared the comparison is done differently than when two normal maps or a map and a vector \ 20 | are compared. The keys are not compared, only the items (in key order). But unlike with maps, when the two vectors \ 21 | have a different number of key/item pairs then only the first n key/item pairs from both vectors are relevant. \ 22 | The extra key/item pairs from one of the two vectors are ignored. For example, vectors rm_v(rm_i(1):rm_i(2)) \ 23 | and rm_v(rm_i(1)) are considered equal because only the first item of each vector are relevant. See \ 24 | rm_cmp for details.\ 25 |

\ 26 |

\ 27 | Up to 100 key/item pairs can be immediately inserted with procedure rm_v. \ 28 | Only the items need to be specified: the keys are implied (rm_i(1), rm_i(2), ...). \ 29 | So rm_v is often used to represent a simple "list" or "sequence".\ 30 |

\ 31 | \ 32 | '); 33 | -------------------------------------------------------------------------------- /docs/css/normalize.min.css: -------------------------------------------------------------------------------- 1 | /*! normalize.css v3.0.2 | MIT License | git.io/normalize */html{font-family:sans-serif;-ms-text-size-adjust:100%;-webkit-text-size-adjust:100%}body{margin:0}article,aside,details,figcaption,figure,footer,header,hgroup,main,menu,nav,section,summary{display:block}audio,canvas,progress,video{display:inline-block;vertical-align:baseline}audio:not([controls]){display:none;height:0}[hidden],template{display:none}a{background-color:transparent}a:active,a:hover{outline:0}abbr[title]{border-bottom:1px dotted}b,strong{font-weight:700}dfn{font-style:italic}h1{font-size:2em;margin:.67em 0}mark{background:#ff0;color:#000}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sup{top:-.5em}sub{bottom:-.25em}img{border:0}svg:not(:root){overflow:hidden}figure{margin:1em 40px}hr{-moz-box-sizing:content-box;box-sizing:content-box;height:0}pre{overflow:auto}code,kbd,pre,samp{font-family:monospace,monospace;font-size:1em}button,input,optgroup,select,textarea{color:inherit;font:inherit;margin:0}button{overflow:visible}button,select{text-transform:none}button,html input[type=button],input[type=reset],input[type=submit]{-webkit-appearance:button;cursor:pointer}button[disabled],html input[disabled]{cursor:default}button::-moz-focus-inner,input::-moz-focus-inner{border:0;padding:0}input{line-height:normal}input[type=checkbox],input[type=radio]{box-sizing:border-box;padding:0}input[type=number]::-webkit-inner-spin-button,input[type=number]::-webkit-outer-spin-button{height:auto}input[type=search]{-webkit-appearance:textfield;-moz-box-sizing:content-box;-webkit-box-sizing:content-box;box-sizing:content-box}input[type=search]::-webkit-search-cancel-button,input[type=search]::-webkit-search-decoration{-webkit-appearance:none}fieldset{border:1px solid silver;margin:0 2px;padding:.35em .625em .75em}legend{border:0;padding:0}textarea{overflow:auto}optgroup{font-weight:700}table{border-collapse:collapse;border-spacing:0}td,th{padding:0} -------------------------------------------------------------------------------- /src/LICENSE: -------------------------------------------------------------------------------- 1 | --- 2 | ----- 3 | 4 | RpgMap v1.2.1 5 | 6 | (c) 2017-2019 John Erps 7 | 8 | ----- 9 | 10 | Permission is hereby granted, free of charge, to any person obtaining a copy of 11 | this software and associated documentation files (the "Software"), to deal in 12 | the Software without restriction, including without limitation the rights to 13 | use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies 14 | of the Software, and to permit persons to whom the Software is furnished to do 15 | so, subject to the following conditions: 16 | 17 | The above copyright notice and this permission notice shall be included in all 18 | copies or substantial portions of the Software. 19 | 20 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 21 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS 22 | FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR 23 | COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER 24 | IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 25 | CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 26 | 27 | ----- 28 | 29 | ----- 30 | 31 | File RPGMAPRBTC.C bears the following license 32 | 33 | (c) 2001 Emin Martinian 34 | 35 | ----- 36 | 37 | Redistribution and use in source and binary forms, with or without 38 | modification, are permitted provided that neither the name of Emin 39 | Martinian nor the names of any contributors are be used to endorse or 40 | promote products derived from this software without specific prior 41 | written permission. 42 | 43 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 44 | "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 45 | LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 46 | A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 47 | OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 48 | SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 49 | LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 50 | DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 51 | THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 52 | (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 53 | OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 54 | 55 | ----- 56 | -------------------------------------------------------------------------------- /src/RPGMAPCVA.t.RPGLE: -------------------------------------------------------------------------------- 1 | **FREE 2 | 3 | // RPGMAPCVA.RPGLE - RpgMap Compare Values Alt seq 4 | // (c) 2017 John Erps 5 | 6 | 7 | ctl-opt copyright('(c) 2017 John Erps'); 8 | ctl-opt nomain datfmt(*iso-) timfmt(*iso.) ccsid(*exact) altseq(*ext) srtseq(_SRTSEQ_); 9 | 10 | 11 | /include RPGMAPGDEF.RPGLE 12 | /include RPGMAPCVAH.RPGLE 13 | /include RPGMAPSYSH.RPGLE 14 | 15 | 16 | dcl-proc RMCvaCompareStr export; 17 | 18 | dcl-pi *n int(10); 19 | s1 pointer value; 20 | s2 pointer value; 21 | end-pi; 22 | 23 | dcl-s u varchar(30000) based(up); 24 | dcl-s v1 varchar(120000) static; 25 | dcl-s v2 varchar(120000) static; 26 | dcl-s inbuf pointer; 27 | dcl-s inbufl uns(10); 28 | dcl-s outbuf pointer; 29 | dcl-s outbufl uns(10); 30 | 31 | up = s1; 32 | inbuf = %addr(u:*data); 33 | inbufl = %len(u); 34 | outbuf = %addr(v1:*data); 35 | outbufl = %size(v1) - 4; 36 | %len(v1) = outbufl; 37 | RMSysCvtCCSID(1208:0:inbuf:inbufl:outbuf:outbufl); 38 | %len(v1) = %size(v1) - 4 - outbufl; 39 | 40 | up = s2; 41 | inbuf = %addr(u:*data); 42 | inbufl = %len(u); 43 | outbuf = %addr(v2:*data); 44 | outbufl = %size(v2) - 4; 45 | %len(v2) = outbufl; 46 | RMSysCvtCCSID(1208:0:inbuf:inbufl:outbuf:outbufl); 47 | %len(v2) = %size(v2) - 4 - outbufl; 48 | 49 | if v1 < v2; 50 | return -1; 51 | elseif v1 > v2; 52 | return 1; 53 | endif; 54 | return 0; 55 | 56 | end-proc; 57 | 58 | 59 | dcl-proc RMCvaCompareChar export; 60 | 61 | dcl-pi *n int(10); 62 | c1 pointer value; 63 | c2 pointer value; 64 | end-pi; 65 | 66 | dcl-s v1 varchar(30000) based(v1p); 67 | dcl-s v2 varchar(30000) based(v2p); 68 | 69 | v1p = c1; 70 | v2p = c2; 71 | 72 | if v1 < v2; 73 | return -1; 74 | elseif v1 > v2; 75 | return 1; 76 | endif; 77 | return 0; 78 | 79 | end-proc; 80 | -------------------------------------------------------------------------------- /src/RPGMAPCVAH.RPGLE: -------------------------------------------------------------------------------- 1 | **FREE 2 | 3 | // RPGMAPCVAH.RPGLE - RPGMAPCVA header file 4 | // (c) 2017 John Erps 5 | 6 | 7 | /if defined(RPGMAPCVA_H) 8 | /eof 9 | /else 10 | /define RPGMAPCVA_H 11 | /endif 12 | 13 | 14 | dcl-pr RMCvaCompareStr int(10); 15 | s1 pointer value; 16 | s2 pointer value; 17 | end-pr; 18 | 19 | dcl-pr RMCvaCompareChar int(10); 20 | c1 pointer value; 21 | c2 pointer value; 22 | end-pr; 23 | -------------------------------------------------------------------------------- /src/RPGMAPGDEF.t.RPGLE: -------------------------------------------------------------------------------- 1 | **FREE 2 | 3 | // Global defs 4 | 5 | dcl-c RMLIB '_TLIB_'; 6 | -------------------------------------------------------------------------------- /src/RPGMAPGMFH.RPGLE: -------------------------------------------------------------------------------- 1 | **FREE 2 | 3 | // RPGMAPGMFH.RPGLE - RPGMAPGMF header file 4 | // (c) 2017 John Erps 5 | 6 | 7 | /if defined(RPGMAPGMF_H) 8 | /eof 9 | /else 10 | /define RPGMAPGMF_H 11 | /endif 12 | 13 | 14 | dcl-pr RMMInsert ind; 15 | map pointer value; 16 | mode int(10) value; 17 | k pointer value; 18 | i pointer value; 19 | end-pr; 20 | 21 | dcl-pr RMMInsertFromMap; 22 | map pointer value; 23 | mode int(10) value; 24 | map2 pointer value; 25 | key1 pointer value options(*nopass); 26 | key2 pointer value options(*nopass); 27 | end-pr; 28 | 29 | dcl-pr RMMForEachDo pointer; 30 | map pointer value; 31 | proc pointer(*proc) value; 32 | rev ind value; 33 | usrd pointer value options(*nopass); 34 | key1 pointer value options(*nopass); 35 | key2 pointer value options(*nopass); 36 | end-pr; 37 | 38 | dcl-pr RMMDisposeArg; 39 | obj pointer value; 40 | end-pr; 41 | -------------------------------------------------------------------------------- /src/RPGMAPI002.RPGLE: -------------------------------------------------------------------------------- 1 | **FREE 2 | 3 | i001 pointer value options(*nopass); 4 | i002 pointer value options(*nopass); 5 | i003 pointer value options(*nopass); 6 | i004 pointer value options(*nopass); 7 | i005 pointer value options(*nopass); 8 | i006 pointer value options(*nopass); 9 | i007 pointer value options(*nopass); 10 | i008 pointer value options(*nopass); 11 | i009 pointer value options(*nopass); 12 | i010 pointer value options(*nopass); 13 | i011 pointer value options(*nopass); 14 | i012 pointer value options(*nopass); 15 | i013 pointer value options(*nopass); 16 | i014 pointer value options(*nopass); 17 | i015 pointer value options(*nopass); 18 | i016 pointer value options(*nopass); 19 | i017 pointer value options(*nopass); 20 | i018 pointer value options(*nopass); 21 | i019 pointer value options(*nopass); 22 | i020 pointer value options(*nopass); 23 | i021 pointer value options(*nopass); 24 | i022 pointer value options(*nopass); 25 | i023 pointer value options(*nopass); 26 | i024 pointer value options(*nopass); 27 | i025 pointer value options(*nopass); 28 | i026 pointer value options(*nopass); 29 | i027 pointer value options(*nopass); 30 | i028 pointer value options(*nopass); 31 | i029 pointer value options(*nopass); 32 | i030 pointer value options(*nopass); 33 | i031 pointer value options(*nopass); 34 | i032 pointer value options(*nopass); 35 | i033 pointer value options(*nopass); 36 | i034 pointer value options(*nopass); 37 | i035 pointer value options(*nopass); 38 | i036 pointer value options(*nopass); 39 | i037 pointer value options(*nopass); 40 | i038 pointer value options(*nopass); 41 | i039 pointer value options(*nopass); 42 | i040 pointer value options(*nopass); 43 | i041 pointer value options(*nopass); 44 | i042 pointer value options(*nopass); 45 | i043 pointer value options(*nopass); 46 | i044 pointer value options(*nopass); 47 | i045 pointer value options(*nopass); 48 | i046 pointer value options(*nopass); 49 | i047 pointer value options(*nopass); 50 | i048 pointer value options(*nopass); 51 | i049 pointer value options(*nopass); 52 | i050 pointer value options(*nopass); 53 | i051 pointer value options(*nopass); 54 | i052 pointer value options(*nopass); 55 | i053 pointer value options(*nopass); 56 | i054 pointer value options(*nopass); 57 | i055 pointer value options(*nopass); 58 | i056 pointer value options(*nopass); 59 | i057 pointer value options(*nopass); 60 | i058 pointer value options(*nopass); 61 | i059 pointer value options(*nopass); 62 | i060 pointer value options(*nopass); 63 | i061 pointer value options(*nopass); 64 | i062 pointer value options(*nopass); 65 | i063 pointer value options(*nopass); 66 | i064 pointer value options(*nopass); 67 | i065 pointer value options(*nopass); 68 | i066 pointer value options(*nopass); 69 | i067 pointer value options(*nopass); 70 | i068 pointer value options(*nopass); 71 | i069 pointer value options(*nopass); 72 | i070 pointer value options(*nopass); 73 | i071 pointer value options(*nopass); 74 | i072 pointer value options(*nopass); 75 | i073 pointer value options(*nopass); 76 | i074 pointer value options(*nopass); 77 | i075 pointer value options(*nopass); 78 | i076 pointer value options(*nopass); 79 | i077 pointer value options(*nopass); 80 | i078 pointer value options(*nopass); 81 | i079 pointer value options(*nopass); 82 | i080 pointer value options(*nopass); 83 | i081 pointer value options(*nopass); 84 | i082 pointer value options(*nopass); 85 | i083 pointer value options(*nopass); 86 | i084 pointer value options(*nopass); 87 | i085 pointer value options(*nopass); 88 | i086 pointer value options(*nopass); 89 | i087 pointer value options(*nopass); 90 | i088 pointer value options(*nopass); 91 | i089 pointer value options(*nopass); 92 | i090 pointer value options(*nopass); 93 | i091 pointer value options(*nopass); 94 | i092 pointer value options(*nopass); 95 | i093 pointer value options(*nopass); 96 | i094 pointer value options(*nopass); 97 | i095 pointer value options(*nopass); 98 | i096 pointer value options(*nopass); 99 | i097 pointer value options(*nopass); 100 | i098 pointer value options(*nopass); 101 | i099 pointer value options(*nopass); 102 | i100 pointer value options(*nopass); 103 | -------------------------------------------------------------------------------- /src/RPGMAPI051.RPGLE: -------------------------------------------------------------------------------- 1 | **FREE 2 | 3 | k01 pointer value options(*nopass); 4 | k02 pointer value options(*nopass); 5 | k03 pointer value options(*nopass); 6 | k04 pointer value options(*nopass); 7 | k05 pointer value options(*nopass); 8 | k06 pointer value options(*nopass); 9 | k07 pointer value options(*nopass); 10 | k08 pointer value options(*nopass); 11 | k09 pointer value options(*nopass); 12 | k10 pointer value options(*nopass); 13 | -------------------------------------------------------------------------------- /src/RPGMAPI052.RPGLE: -------------------------------------------------------------------------------- 1 | **FREE 2 | 3 | k01 int(20) value options(*nopass); 4 | k02 int(20) value options(*nopass); 5 | k03 int(20) value options(*nopass); 6 | k04 int(20) value options(*nopass); 7 | k05 int(20) value options(*nopass); 8 | k06 int(20) value options(*nopass); 9 | k07 int(20) value options(*nopass); 10 | k08 int(20) value options(*nopass); 11 | k09 int(20) value options(*nopass); 12 | k10 int(20) value options(*nopass); 13 | -------------------------------------------------------------------------------- /src/RPGMAPI053.RPGLE: -------------------------------------------------------------------------------- 1 | **FREE 2 | 3 | k01 packed(46:16) value options(*nopass); 4 | k02 packed(46:16) value options(*nopass); 5 | k03 packed(46:16) value options(*nopass); 6 | k04 packed(46:16) value options(*nopass); 7 | k05 packed(46:16) value options(*nopass); 8 | k06 packed(46:16) value options(*nopass); 9 | k07 packed(46:16) value options(*nopass); 10 | k08 packed(46:16) value options(*nopass); 11 | k09 packed(46:16) value options(*nopass); 12 | k10 packed(46:16) value options(*nopass); 13 | -------------------------------------------------------------------------------- /src/RPGMAPI054.RPGLE: -------------------------------------------------------------------------------- 1 | **FREE 2 | 3 | k01 date(*iso-) value options(*nopass); 4 | k02 date(*iso-) value options(*nopass); 5 | k03 date(*iso-) value options(*nopass); 6 | k04 date(*iso-) value options(*nopass); 7 | k05 date(*iso-) value options(*nopass); 8 | k06 date(*iso-) value options(*nopass); 9 | k07 date(*iso-) value options(*nopass); 10 | k08 date(*iso-) value options(*nopass); 11 | k09 date(*iso-) value options(*nopass); 12 | k10 date(*iso-) value options(*nopass); 13 | -------------------------------------------------------------------------------- /src/RPGMAPI055.RPGLE: -------------------------------------------------------------------------------- 1 | **FREE 2 | 3 | k01 time(*iso.) value options(*nopass); 4 | k02 time(*iso.) value options(*nopass); 5 | k03 time(*iso.) value options(*nopass); 6 | k04 time(*iso.) value options(*nopass); 7 | k05 time(*iso.) value options(*nopass); 8 | k06 time(*iso.) value options(*nopass); 9 | k07 time(*iso.) value options(*nopass); 10 | k08 time(*iso.) value options(*nopass); 11 | k09 time(*iso.) value options(*nopass); 12 | k10 time(*iso.) value options(*nopass); 13 | -------------------------------------------------------------------------------- /src/RPGMAPI056.RPGLE: -------------------------------------------------------------------------------- 1 | **FREE 2 | 3 | k01 timestamp value options(*nopass); 4 | k02 timestamp value options(*nopass); 5 | k03 timestamp value options(*nopass); 6 | k04 timestamp value options(*nopass); 7 | k05 timestamp value options(*nopass); 8 | k06 timestamp value options(*nopass); 9 | k07 timestamp value options(*nopass); 10 | k08 timestamp value options(*nopass); 11 | k09 timestamp value options(*nopass); 12 | k10 timestamp value options(*nopass); 13 | -------------------------------------------------------------------------------- /src/RPGMAPI057.RPGLE: -------------------------------------------------------------------------------- 1 | **FREE 2 | 3 | k01 ind value options(*nopass); 4 | k02 ind value options(*nopass); 5 | k03 ind value options(*nopass); 6 | k04 ind value options(*nopass); 7 | k05 ind value options(*nopass); 8 | k06 ind value options(*nopass); 9 | k07 ind value options(*nopass); 10 | k08 ind value options(*nopass); 11 | k09 ind value options(*nopass); 12 | k10 ind value options(*nopass); 13 | -------------------------------------------------------------------------------- /src/RPGMAPI058.RPGLE: -------------------------------------------------------------------------------- 1 | **FREE 2 | 3 | k01 varchar(200) value options(*nopass); 4 | k02 varchar(200) value options(*nopass); 5 | k03 varchar(200) value options(*nopass); 6 | k04 varchar(200) value options(*nopass); 7 | k05 varchar(200) value options(*nopass); 8 | k06 varchar(200) value options(*nopass); 9 | k07 varchar(200) value options(*nopass); 10 | k08 varchar(200) value options(*nopass); 11 | k09 varchar(200) value options(*nopass); 12 | k10 varchar(200) value options(*nopass); 13 | -------------------------------------------------------------------------------- /src/RPGMAPI059.RPGLE: -------------------------------------------------------------------------------- 1 | **FREE 2 | 3 | k01 varchar(200) ccsid(*utf8) value options(*nopass); 4 | k02 varchar(200) ccsid(*utf8) value options(*nopass); 5 | k03 varchar(200) ccsid(*utf8) value options(*nopass); 6 | k04 varchar(200) ccsid(*utf8) value options(*nopass); 7 | k05 varchar(200) ccsid(*utf8) value options(*nopass); 8 | k06 varchar(200) ccsid(*utf8) value options(*nopass); 9 | k07 varchar(200) ccsid(*utf8) value options(*nopass); 10 | k08 varchar(200) ccsid(*utf8) value options(*nopass); 11 | k09 varchar(200) ccsid(*utf8) value options(*nopass); 12 | k10 varchar(200) ccsid(*utf8) value options(*nopass); 13 | -------------------------------------------------------------------------------- /src/RPGMAPI060.RPGLE: -------------------------------------------------------------------------------- 1 | **FREE 2 | 3 | k01 varchar(200) value options(*nopass); 4 | k02 varchar(200) value options(*nopass); 5 | k03 varchar(200) value options(*nopass); 6 | k04 varchar(200) value options(*nopass); 7 | k05 varchar(200) value options(*nopass); 8 | k06 varchar(200) value options(*nopass); 9 | k07 varchar(200) value options(*nopass); 10 | k08 varchar(200) value options(*nopass); 11 | k09 varchar(200) value options(*nopass); 12 | k10 varchar(200) value options(*nopass); 13 | -------------------------------------------------------------------------------- /src/RPGMAPI061.RPGLE: -------------------------------------------------------------------------------- 1 | **FREE 2 | 3 | k01 varchar(200) ccsid(*utf8) value options(*nopass); 4 | k02 varchar(200) ccsid(*utf8) value options(*nopass); 5 | k03 varchar(200) ccsid(*utf8) value options(*nopass); 6 | k04 varchar(200) ccsid(*utf8) value options(*nopass); 7 | k05 varchar(200) ccsid(*utf8) value options(*nopass); 8 | k06 varchar(200) ccsid(*utf8) value options(*nopass); 9 | k07 varchar(200) ccsid(*utf8) value options(*nopass); 10 | k08 varchar(200) ccsid(*utf8) value options(*nopass); 11 | k09 varchar(200) ccsid(*utf8) value options(*nopass); 12 | k10 varchar(200) ccsid(*utf8) value options(*nopass); 13 | -------------------------------------------------------------------------------- /src/RPGMAPI062.RPGLE: -------------------------------------------------------------------------------- 1 | **FREE 2 | 3 | k01 pointer value options(*nopass); 4 | k02 pointer value options(*nopass); 5 | k03 pointer value options(*nopass); 6 | k04 pointer value options(*nopass); 7 | k05 pointer value options(*nopass); 8 | k06 pointer value options(*nopass); 9 | k07 pointer value options(*nopass); 10 | k08 pointer value options(*nopass); 11 | k09 pointer value options(*nopass); 12 | k10 pointer value options(*nopass); 13 | -------------------------------------------------------------------------------- /src/RPGMAPI063.RPGLE: -------------------------------------------------------------------------------- 1 | **FREE 2 | 3 | k01 pointer(*proc) value options(*nopass); 4 | k02 pointer(*proc) value options(*nopass); 5 | k03 pointer(*proc) value options(*nopass); 6 | k04 pointer(*proc) value options(*nopass); 7 | k05 pointer(*proc) value options(*nopass); 8 | k06 pointer(*proc) value options(*nopass); 9 | k07 pointer(*proc) value options(*nopass); 10 | k08 pointer(*proc) value options(*nopass); 11 | k09 pointer(*proc) value options(*nopass); 12 | k10 pointer(*proc) value options(*nopass); 13 | -------------------------------------------------------------------------------- /src/RPGMAPI151.RPGLE: -------------------------------------------------------------------------------- 1 | **FREE 2 | 3 | if %parms > 1; 4 | k( 1) = k01; 5 | endif; 6 | if %parms > 2; 7 | k( 2) = k02; 8 | endif; 9 | if %parms > 3; 10 | k( 3) = k03; 11 | endif; 12 | if %parms > 4; 13 | k( 4) = k04; 14 | endif; 15 | if %parms > 5; 16 | k( 5) = k05; 17 | endif; 18 | if %parms > 6; 19 | k( 6) = k06; 20 | endif; 21 | if %parms > 7; 22 | k( 7) = k07; 23 | endif; 24 | if %parms > 8; 25 | k( 8) = k08; 26 | endif; 27 | if %parms > 9; 28 | k( 9) = k09; 29 | endif; 30 | if %parms > 10; 31 | k(10) = k10; 32 | endif; 33 | -------------------------------------------------------------------------------- /src/RPGMAPI152.RPGLE: -------------------------------------------------------------------------------- 1 | **FREE 2 | 3 | if %parms > 1; 4 | k( 1) = rm_i2(k01); 5 | endif; 6 | if %parms > 2; 7 | k( 2) = rm_i2(k02); 8 | endif; 9 | if %parms > 3; 10 | k( 3) = rm_i2(k03); 11 | endif; 12 | if %parms > 4; 13 | k( 4) = rm_i2(k04); 14 | endif; 15 | if %parms > 5; 16 | k( 5) = rm_i2(k05); 17 | endif; 18 | if %parms > 6; 19 | k( 6) = rm_i2(k06); 20 | endif; 21 | if %parms > 7; 22 | k( 7) = rm_i2(k07); 23 | endif; 24 | if %parms > 8; 25 | k( 8) = rm_i2(k08); 26 | endif; 27 | if %parms > 9; 28 | k( 9) = rm_i2(k09); 29 | endif; 30 | if %parms > 10; 31 | k(10) = rm_i2(k10); 32 | endif; 33 | -------------------------------------------------------------------------------- /src/RPGMAPI153.RPGLE: -------------------------------------------------------------------------------- 1 | **FREE 2 | 3 | if %parms > 1; 4 | k( 1) = rm_p3(k01); 5 | endif; 6 | if %parms > 2; 7 | k( 2) = rm_p3(k02); 8 | endif; 9 | if %parms > 3; 10 | k( 3) = rm_p3(k03); 11 | endif; 12 | if %parms > 4; 13 | k( 4) = rm_p3(k04); 14 | endif; 15 | if %parms > 5; 16 | k( 5) = rm_p3(k05); 17 | endif; 18 | if %parms > 6; 19 | k( 6) = rm_p3(k06); 20 | endif; 21 | if %parms > 7; 22 | k( 7) = rm_p3(k07); 23 | endif; 24 | if %parms > 8; 25 | k( 8) = rm_p3(k08); 26 | endif; 27 | if %parms > 9; 28 | k( 9) = rm_p3(k09); 29 | endif; 30 | if %parms > 10; 31 | k(10) = rm_p3(k10); 32 | endif; 33 | -------------------------------------------------------------------------------- /src/RPGMAPI154.RPGLE: -------------------------------------------------------------------------------- 1 | **FREE 2 | 3 | if %parms > 1; 4 | k( 1) = rm_d(k01); 5 | endif; 6 | if %parms > 2; 7 | k( 2) = rm_d(k02); 8 | endif; 9 | if %parms > 3; 10 | k( 3) = rm_d(k03); 11 | endif; 12 | if %parms > 4; 13 | k( 4) = rm_d(k04); 14 | endif; 15 | if %parms > 5; 16 | k( 5) = rm_d(k05); 17 | endif; 18 | if %parms > 6; 19 | k( 6) = rm_d(k06); 20 | endif; 21 | if %parms > 7; 22 | k( 7) = rm_d(k07); 23 | endif; 24 | if %parms > 8; 25 | k( 8) = rm_d(k08); 26 | endif; 27 | if %parms > 9; 28 | k( 9) = rm_d(k09); 29 | endif; 30 | if %parms > 10; 31 | k(10) = rm_d(k10); 32 | endif; 33 | -------------------------------------------------------------------------------- /src/RPGMAPI155.RPGLE: -------------------------------------------------------------------------------- 1 | **FREE 2 | 3 | if %parms > 1; 4 | k( 1) = rm_t(k01); 5 | endif; 6 | if %parms > 2; 7 | k( 2) = rm_t(k02); 8 | endif; 9 | if %parms > 3; 10 | k( 3) = rm_t(k03); 11 | endif; 12 | if %parms > 4; 13 | k( 4) = rm_t(k04); 14 | endif; 15 | if %parms > 5; 16 | k( 5) = rm_t(k05); 17 | endif; 18 | if %parms > 6; 19 | k( 6) = rm_t(k06); 20 | endif; 21 | if %parms > 7; 22 | k( 7) = rm_t(k07); 23 | endif; 24 | if %parms > 8; 25 | k( 8) = rm_t(k08); 26 | endif; 27 | if %parms > 9; 28 | k( 9) = rm_t(k09); 29 | endif; 30 | if %parms > 10; 31 | k(10) = rm_t(k10); 32 | endif; 33 | -------------------------------------------------------------------------------- /src/RPGMAPI156.RPGLE: -------------------------------------------------------------------------------- 1 | **FREE 2 | 3 | if %parms > 1; 4 | k( 1) = rm_z(k01); 5 | endif; 6 | if %parms > 2; 7 | k( 2) = rm_z(k02); 8 | endif; 9 | if %parms > 3; 10 | k( 3) = rm_z(k03); 11 | endif; 12 | if %parms > 4; 13 | k( 4) = rm_z(k04); 14 | endif; 15 | if %parms > 5; 16 | k( 5) = rm_z(k05); 17 | endif; 18 | if %parms > 6; 19 | k( 6) = rm_z(k06); 20 | endif; 21 | if %parms > 7; 22 | k( 7) = rm_z(k07); 23 | endif; 24 | if %parms > 8; 25 | k( 8) = rm_z(k08); 26 | endif; 27 | if %parms > 9; 28 | k( 9) = rm_z(k09); 29 | endif; 30 | if %parms > 10; 31 | k(10) = rm_z(k10); 32 | endif; 33 | -------------------------------------------------------------------------------- /src/RPGMAPI157.RPGLE: -------------------------------------------------------------------------------- 1 | **FREE 2 | 3 | if %parms > 1; 4 | k( 1) = rm_n(k01); 5 | endif; 6 | if %parms > 2; 7 | k( 2) = rm_n(k02); 8 | endif; 9 | if %parms > 3; 10 | k( 3) = rm_n(k03); 11 | endif; 12 | if %parms > 4; 13 | k( 4) = rm_n(k04); 14 | endif; 15 | if %parms > 5; 16 | k( 5) = rm_n(k05); 17 | endif; 18 | if %parms > 6; 19 | k( 6) = rm_n(k06); 20 | endif; 21 | if %parms > 7; 22 | k( 7) = rm_n(k07); 23 | endif; 24 | if %parms > 8; 25 | k( 8) = rm_n(k08); 26 | endif; 27 | if %parms > 9; 28 | k( 9) = rm_n(k09); 29 | endif; 30 | if %parms > 10; 31 | k(10) = rm_n(k10); 32 | endif; 33 | -------------------------------------------------------------------------------- /src/RPGMAPI158.RPGLE: -------------------------------------------------------------------------------- 1 | **FREE 2 | 3 | if %parms > 1; 4 | k( 1) = rm_a(k01); 5 | endif; 6 | if %parms > 2; 7 | k( 2) = rm_a(k02); 8 | endif; 9 | if %parms > 3; 10 | k( 3) = rm_a(k03); 11 | endif; 12 | if %parms > 4; 13 | k( 4) = rm_a(k04); 14 | endif; 15 | if %parms > 5; 16 | k( 5) = rm_a(k05); 17 | endif; 18 | if %parms > 6; 19 | k( 6) = rm_a(k06); 20 | endif; 21 | if %parms > 7; 22 | k( 7) = rm_a(k07); 23 | endif; 24 | if %parms > 8; 25 | k( 8) = rm_a(k08); 26 | endif; 27 | if %parms > 9; 28 | k( 9) = rm_a(k09); 29 | endif; 30 | if %parms > 10; 31 | k(10) = rm_a(k10); 32 | endif; 33 | -------------------------------------------------------------------------------- /src/RPGMAPI159.RPGLE: -------------------------------------------------------------------------------- 1 | **FREE 2 | 3 | if %parms > 1; 4 | k( 1) = rm_s(k01); 5 | endif; 6 | if %parms > 2; 7 | k( 2) = rm_s(k02); 8 | endif; 9 | if %parms > 3; 10 | k( 3) = rm_s(k03); 11 | endif; 12 | if %parms > 4; 13 | k( 4) = rm_s(k04); 14 | endif; 15 | if %parms > 5; 16 | k( 5) = rm_s(k05); 17 | endif; 18 | if %parms > 6; 19 | k( 6) = rm_s(k06); 20 | endif; 21 | if %parms > 7; 22 | k( 7) = rm_s(k07); 23 | endif; 24 | if %parms > 8; 25 | k( 8) = rm_s(k08); 26 | endif; 27 | if %parms > 9; 28 | k( 9) = rm_s(k09); 29 | endif; 30 | if %parms > 10; 31 | k(10) = rm_s(k10); 32 | endif; 33 | -------------------------------------------------------------------------------- /src/RPGMAPI160.RPGLE: -------------------------------------------------------------------------------- 1 | **FREE 2 | 3 | if %parms > 1; 4 | k( 1) = rm_aa(k01); 5 | endif; 6 | if %parms > 2; 7 | k( 2) = rm_aa(k02); 8 | endif; 9 | if %parms > 3; 10 | k( 3) = rm_aa(k03); 11 | endif; 12 | if %parms > 4; 13 | k( 4) = rm_aa(k04); 14 | endif; 15 | if %parms > 5; 16 | k( 5) = rm_aa(k05); 17 | endif; 18 | if %parms > 6; 19 | k( 6) = rm_aa(k06); 20 | endif; 21 | if %parms > 7; 22 | k( 7) = rm_aa(k07); 23 | endif; 24 | if %parms > 8; 25 | k( 8) = rm_aa(k08); 26 | endif; 27 | if %parms > 9; 28 | k( 9) = rm_aa(k09); 29 | endif; 30 | if %parms > 10; 31 | k(10) = rm_aa(k10); 32 | endif; 33 | -------------------------------------------------------------------------------- /src/RPGMAPI161.RPGLE: -------------------------------------------------------------------------------- 1 | **FREE 2 | 3 | if %parms > 1; 4 | k( 1) = rm_sa(k01); 5 | endif; 6 | if %parms > 2; 7 | k( 2) = rm_sa(k02); 8 | endif; 9 | if %parms > 3; 10 | k( 3) = rm_sa(k03); 11 | endif; 12 | if %parms > 4; 13 | k( 4) = rm_sa(k04); 14 | endif; 15 | if %parms > 5; 16 | k( 5) = rm_sa(k05); 17 | endif; 18 | if %parms > 6; 19 | k( 6) = rm_sa(k06); 20 | endif; 21 | if %parms > 7; 22 | k( 7) = rm_sa(k07); 23 | endif; 24 | if %parms > 8; 25 | k( 8) = rm_sa(k08); 26 | endif; 27 | if %parms > 9; 28 | k( 9) = rm_sa(k09); 29 | endif; 30 | if %parms > 10; 31 | k(10) = rm_sa(k10); 32 | endif; 33 | -------------------------------------------------------------------------------- /src/RPGMAPI162.RPGLE: -------------------------------------------------------------------------------- 1 | **FREE 2 | 3 | if %parms > 1; 4 | k( 1) = rm_x(k01); 5 | endif; 6 | if %parms > 2; 7 | k( 2) = rm_x(k02); 8 | endif; 9 | if %parms > 3; 10 | k( 3) = rm_x(k03); 11 | endif; 12 | if %parms > 4; 13 | k( 4) = rm_x(k04); 14 | endif; 15 | if %parms > 5; 16 | k( 5) = rm_x(k05); 17 | endif; 18 | if %parms > 6; 19 | k( 6) = rm_x(k06); 20 | endif; 21 | if %parms > 7; 22 | k( 7) = rm_x(k07); 23 | endif; 24 | if %parms > 8; 25 | k( 8) = rm_x(k08); 26 | endif; 27 | if %parms > 9; 28 | k( 9) = rm_x(k09); 29 | endif; 30 | if %parms > 10; 31 | k(10) = rm_x(k10); 32 | endif; 33 | -------------------------------------------------------------------------------- /src/RPGMAPI163.RPGLE: -------------------------------------------------------------------------------- 1 | **FREE 2 | 3 | if %parms > 1; 4 | k( 1) = rm_xp(k01); 5 | endif; 6 | if %parms > 2; 7 | k( 2) = rm_xp(k02); 8 | endif; 9 | if %parms > 3; 10 | k( 3) = rm_xp(k03); 11 | endif; 12 | if %parms > 4; 13 | k( 4) = rm_xp(k04); 14 | endif; 15 | if %parms > 5; 16 | k( 5) = rm_xp(k05); 17 | endif; 18 | if %parms > 6; 19 | k( 6) = rm_xp(k06); 20 | endif; 21 | if %parms > 7; 22 | k( 7) = rm_xp(k07); 23 | endif; 24 | if %parms > 8; 25 | k( 8) = rm_xp(k08); 26 | endif; 27 | if %parms > 9; 28 | k( 9) = rm_xp(k09); 29 | endif; 30 | if %parms > 10; 31 | k(10) = rm_xp(k10); 32 | endif; 33 | -------------------------------------------------------------------------------- /src/RPGMAPRBTC.H: -------------------------------------------------------------------------------- 1 | /* RPGMAPRBTC.H - RedBlackTree and Cursors header file */ 2 | /* (c) 2017 John Erps */ 3 | 4 | 5 | #ifndef RPGMAPRBTC_H 6 | #define RPGMAPRBTC_H 7 | 8 | 9 | typedef unsigned long long numkeys_t; 10 | typedef struct rmb_red_blk_node rmb_red_blk_node; 11 | typedef struct rmb_cursor rmb_cursor; 12 | typedef struct rmb_eventh rmb_eventh; 13 | typedef struct rmb_red_blk_tree rmb_red_blk_tree; 14 | typedef int (*rmb_event_handler)(int event, void* map, void* key, void* item, void* usrd); 15 | 16 | rmb_red_blk_tree* RMBTreeCreate(int (*CompFunc)(const void*, const void*, const void*), 17 | void (*DestFunc)(void*), void* valstruct); 18 | void RMBTreeSetValstruct(rmb_red_blk_tree* tree, void* valstruct); 19 | void* RMBTreeNodeKey(rmb_red_blk_node* n); 20 | void* RMBTreeNodeItem(rmb_red_blk_node* n); 21 | void RMBTreeDispose(rmb_red_blk_tree*); 22 | rmb_red_blk_node * RMBTreeInsert(rmb_red_blk_tree*, void* key, void* item); 23 | void RMBTreeRmv(rmb_red_blk_tree*, rmb_red_blk_node* z); 24 | numkeys_t RMBTreeNum(rmb_red_blk_tree* tree); 25 | rmb_red_blk_node* RMBTreeGet(rmb_red_blk_tree*, void* key, int firstlast); 26 | int RMBTreeHasKey(rmb_red_blk_tree* tree, void* key); 27 | int RMBTreeHasKeys(rmb_red_blk_tree* tree, void* key, int llgt); 28 | rmb_cursor* RMBCursorCrt(rmb_red_blk_tree* tree, int pos, void* valstruct); 29 | void RMBCursorDispose(rmb_cursor* cursor); 30 | rmb_red_blk_node* RMBCursorNode(rmb_cursor* cursor); 31 | void* RMBCursorKey(rmb_cursor* cursor); 32 | void* RMBCursorItem(rmb_cursor* cursor); 33 | void RMBCursorSetLlGt(rmb_cursor* cursor, void* key, int llgt); 34 | int RMBCursorHasNxtPrv(rmb_cursor* cursor, int nxtprv); 35 | int RMBCursorHasNxtPrv2(rmb_cursor* cursor, int nxtprv, void* key1, void* key2, int opt); 36 | int RMBCursorReadNxtPrv(rmb_cursor* cursor, int nxtprv); 37 | int RMBCursorReadNxtPrv2(rmb_cursor* cursor, int nxtprv, void* key1, void* key2, int opt); 38 | void RMBAddEventh(rmb_red_blk_tree* tree, rmb_event_handler proc, void* usrd); 39 | void RMBRmvEventh(rmb_red_blk_tree* tree, rmb_event_handler proc); 40 | void RMBFireEvent(rmb_red_blk_tree* tree, int event, void* key, void* item); 41 | 42 | #endif 43 | -------------------------------------------------------------------------------- /src/RPGMAPRBTC.RPGLE: -------------------------------------------------------------------------------- 1 | **FREE 2 | 3 | // RPGMAPRBTC.RPGLE - RedBlackTree and Cursors header file, RPG version */ 4 | // (c) 2017 John Erps 5 | 6 | 7 | /if defined(RPGMAPRBTC_H) 8 | /eof 9 | /else 10 | /define RPGMAPRBTC_H 11 | /endif 12 | 13 | 14 | dcl-pr RMBTreeCreate pointer extproc(*dclcase); 15 | compFunc pointer(*proc) value; 16 | destFunc pointer(*proc) value; 17 | valstruct pointer value; 18 | end-pr; 19 | 20 | dcl-pr RMBTreeSetValstruct extproc(*dclcase); 21 | tree pointer value; 22 | valstruct pointer value; 23 | end-pr; 24 | 25 | dcl-pr RMBTreeNodeKey pointer extproc(*dclcase); 26 | node pointer value; 27 | end-pr; 28 | dcl-pr RMBTreeNodeItem pointer extproc(*dclcase); 29 | node pointer value; 30 | end-pr; 31 | 32 | dcl-pr RMBTreeDispose extproc(*dclcase); 33 | tree pointer value; 34 | end-pr; 35 | 36 | dcl-pr RMBTreeInsert pointer extproc(*dclcase); 37 | tree pointer value; 38 | key pointer value; 39 | item pointer value; 40 | end-pr; 41 | 42 | dcl-pr RMBTreeRmv extproc(*dclcase); 43 | tree pointer value; 44 | node pointer value; 45 | end-pr; 46 | 47 | dcl-pr RMBTreeNum uns(20) extproc(*dclcase); 48 | tree pointer value; 49 | end-pr; 50 | 51 | dcl-pr RMBTreeGet pointer extproc(*dclcase); 52 | tree pointer value; 53 | key pointer value; 54 | firstlast int(10) value; 55 | end-pr; 56 | 57 | dcl-pr RMBTreeHasKey int(10) extproc(*dclcase); 58 | tree pointer value; 59 | key pointer value; 60 | end-pr; 61 | 62 | dcl-pr RMBTreeHasKeys int(10) extproc(*dclcase); 63 | tree pointer value; 64 | key pointer value; 65 | llgt int(10) value; 66 | end-pr; 67 | 68 | dcl-pr RMBCursorCrt pointer extproc(*dclcase); 69 | tree pointer value; 70 | pos int(10) value; 71 | valstruct pointer value; 72 | end-pr; 73 | 74 | dcl-pr RMBCursorDispose extproc(*dclcase); 75 | cursor pointer value; 76 | end-pr; 77 | 78 | dcl-pr RMBCursorNode pointer extproc(*dclcase); 79 | cursor pointer value; 80 | end-pr; 81 | 82 | dcl-pr RMBCursorKey pointer extproc(*dclcase); 83 | cursor pointer value; 84 | end-pr; 85 | 86 | dcl-pr RMBCursorItem pointer extproc(*dclcase); 87 | cursor pointer value; 88 | end-pr; 89 | 90 | dcl-pr RMBCursorSetLlGt extproc(*dclcase); 91 | cursor pointer value; 92 | key pointer value; 93 | llgt int(10) value; 94 | end-pr; 95 | 96 | dcl-pr RMBCursorHasNxtPrv int(10) extproc(*dclcase); 97 | cursor pointer value; 98 | nxtprv int(10) value; 99 | end-pr; 100 | 101 | dcl-pr RMBCursorHasNxtPrv2 int(10) extproc(*dclcase); 102 | cursor pointer value; 103 | nxtprv int(10) value; 104 | key1 pointer value; 105 | key2 pointer value; 106 | opt int(10) value; 107 | end-pr; 108 | 109 | dcl-pr RMBCursorReadNxtPrv int(10) extproc(*dclcase); 110 | cursor pointer value; 111 | nxtprv int(10) value; 112 | end-pr; 113 | 114 | dcl-pr RMBCursorReadNxtPrv2 int(10) extproc(*dclcase); 115 | cursor pointer value; 116 | nxtprv int(10) value; 117 | key1 pointer value; 118 | key2 pointer value; 119 | opt int(10) value; 120 | end-pr; 121 | 122 | dcl-pr RMBAddEventh extproc(*dclcase); 123 | tree pointer value; 124 | proc pointer(*proc) value; 125 | usrd pointer value; 126 | end-pr; 127 | 128 | dcl-pr RMBRmvEventh extproc(*dclcase); 129 | tree pointer value; 130 | proc pointer(*proc) value; 131 | end-pr; 132 | 133 | dcl-pr RMBFireEvent extproc(*dclcase); 134 | tree pointer value; 135 | event int(10) value; 136 | key pointer value; 137 | item pointer value; 138 | end-pr; 139 | -------------------------------------------------------------------------------- /src/RPGMAPSYSH.RPGLE: -------------------------------------------------------------------------------- 1 | **FREE 2 | 3 | // RPGMAPSYSH.RPGLE - RPGMAPSYS header file 4 | // (c) 2017 John Erps 5 | 6 | 7 | /if defined(RPGMAPSYS_H) 8 | /eof 9 | /else 10 | /define RPGMAPSYS_H 11 | /endif 12 | 13 | 14 | // Return errno 15 | dcl-pr RMSysErrno int(10); 16 | end-pr; 17 | 18 | // Send Escape Message 19 | dcl-pr RMSysSndEscapeMsg; 20 | msgid char(7) value; 21 | msgdata varchar(500) value options(*nopass); 22 | end-pr; 23 | 24 | // Convert CCSID, wrapper proc for Iconv. 25 | // Return *on if ok, else return *off. 26 | // Par. noinitshst: *on = don't go into the initial shift state. 27 | dcl-pr RMSysCvtCCSID ind; 28 | fromccsid int(10) value; 29 | toccsid int(10) value; 30 | frombuf pointer; 31 | frombufl uns(10); 32 | tobuf pointer; 33 | tobufl uns(10); 34 | noinitshst ind value options(*nopass); 35 | end-pr; 36 | -------------------------------------------------------------------------------- /src/RPGMAPT000.t.RPGLE: -------------------------------------------------------------------------------- 1 | **FREE 2 | 3 | ctl-opt main(Main) ccsid(*exact) bnddir('_TLIB_/RPGMAP'); 4 | 5 | 6 | /include _TLIB_/INCLUDERPG,RPGMAP 7 | 8 | 9 | dcl-proc Main; 10 | 11 | dcl-s m pointer; 12 | dcl-s c pointer; 13 | dcl-s sum packed(30:4); 14 | 15 | m = rm_m( 16 | rm_v( rm_i(1) : rm_d(d'2017-02-01' ) ) : rm_p(100.50) : 17 | rm_v( rm_i(1) : rm_d(d'2017-01-05' ) ) : rm_p(10) : 18 | rm_v( rm_i(1) : rm_d(d'2017-02-22' ) ) : rm_p(50) : 19 | rm_v( rm_i(5) : rm_d(d'2017-01-01':0) ) : rm_p(15.9) : 20 | rm_v( rm_i(5) : rm_d(d'2017-02-02':0) ) : rm_p(7.5) : 21 | rm_v( rm_i(5) : rm_d(d'2017-03-03':0) ) : rm_p(80) : 22 | rm_v( rm_i(7) : rm_d(d'2017-05-01' ) ) : rm_p(100) : 23 | rm_v( rm_i(7) : rm_d(d'2017-06-02' ) ) : rm_p(1) : 24 | rm_v( rm_i(7) : rm_d(d'2017-06-01' ) ) : rm_p(5) ); 25 | sum = 0; 26 | c = rm_sll(rm_cur(m):rm_v(rm_i(5))); 27 | dow rm_rdn(c:rm_v(rm_i(5))); 28 | sum += rm_p_(rm_itm(c)); 29 | display(%char(rm_d_(rm__i(rm_key(c):2)))); 30 | enddo; 31 | display(%char(sum)); 32 | rm_dis(m); 33 | end-proc; 34 | 35 | 36 | 37 | dcl-proc display; 38 | dcl-pi *n; 39 | text varchar(500) value; 40 | end-pi; 41 | dcl-s t char(52); 42 | t = text; 43 | dsply t; 44 | end-proc; 45 | -------------------------------------------------------------------------------- /src/RPGMAPT001.t.RPGLE: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jerps/RpgMap/613118daaf22177d288420e8d88d0cdaab58ad16/src/RPGMAPT001.t.RPGLE -------------------------------------------------------------------------------- /src/RPGMAPT003.t.RPGLE: -------------------------------------------------------------------------------- 1 | **FREE 2 | 3 | ctl-opt main(Main) ccsid(*exact) bnddir('_TLIB_/RPGMAP'); 4 | 5 | 6 | /include _TLIB_/INCLUDERPG,RPGMAP 7 | 8 | 9 | 10 | dcl-proc Main; 11 | 12 | dcl-s m pointer; 13 | dcl-s m2 pointer; 14 | dcl-s c pointer; 15 | dcl-s x int(10); 16 | 17 | display('18:'); 18 | m = rm_m(); 19 | m2 = rm_m(); 20 | rm_add_event_handler(m:%paddr(event_handler_1)); 21 | rm_add_event_handler(m:%paddr(event_handler_2):m2); 22 | for x = 1 by 2 to 19; 23 | rm_ins(m:rm_i(x):rm_i(x+1)); 24 | endfor; 25 | rm_rmva(m); 26 | c = rm_sll(rm_cur(m2)); 27 | dow rm_rdn(c); 28 | display('R: '+%editc(%dec(rm_i_(rm_key(c)):3:0):'X')+' '+%editc(%dec(rm_i_(rm_itm(c)):3:0):'X')); 29 | enddo; 30 | rm_dis(m:m2); 31 | 32 | end-proc; 33 | 34 | 35 | 36 | dcl-proc event_handler_1; 37 | dcl-pi *n int(10); 38 | event int(10) value; 39 | map pointer value; 40 | key pointer value; 41 | item pointer value; 42 | usrd pointer value; 43 | end-pi; 44 | 45 | if event = 1; 46 | display('I: '+%editc(%dec(rm_i_(key):3:0):'X')+' '+%editc(%dec(rm_i_(item):3:0):'X')); 47 | endif; 48 | return 0; 49 | 50 | end-proc; 51 | 52 | 53 | dcl-proc event_handler_2; 54 | dcl-pi *n int(10); 55 | event int(10) value; 56 | map pointer value; 57 | key pointer value; 58 | item pointer value; 59 | usrd pointer value; 60 | end-pi; 61 | 62 | if event = 2; 63 | rm_ins(usrd:rm_(rm_cpy(key)):rm_cpy(item)); 64 | endif; 65 | return 0; 66 | 67 | end-proc; 68 | 69 | 70 | 71 | 72 | dcl-proc display; 73 | dcl-pi *n; 74 | text varchar(500) value; 75 | end-pi; 76 | dcl-s t char(52); 77 | t = text; 78 | dsply t; 79 | end-proc; 80 | 81 | --------------------------------------------------------------------------------