The remove method does not know about or care about the contents of stem.0. Using stem.0 as a counter for the number of items in a stem variable is a programming convention and has nothing to do with the way stems work. The remove method simply invalidates the tail reference and does NOT modify the stem.0 value.
David Ashley On Mon, 2013-08-19 at 00:30 -0500, J. Leslie Turriff wrote: > Hi, > > I want to load records from a file into a stem, array using execio, > make changes to the array (including adding and deleting items), then > rewrite the array using execio (as I would using classic Rexx on the > mainframe). > > Decrementing stem.0, which by convention indicates the number of items > in the stem, does not seem to work; execio still writes out the > original number of items. > > It looks like I should be able to use the remove method to remove a > stem item, but it doesn't seem to do anything; when I rewrite the stem > array with execio the item I attempted to remove is written to the > file. > > (If execio was capable of reading from|writing to a non-stem array, > this presumably would not be a problem?) > > Leslie > > * : > * address HOSTEMU 'execio * diskr "/mnt/3/.holder" (finis stem > record.' > * keyposition = recursiveBinarySearch(keyname,1,record.~items) > * if keyposition = 0 then > * do > * say 'Key' keyname 'does not exist.' > * exit 4 > * end > * else > * do > * say 'Key' keyname 'was found at postion' keyposition'.' > * r = keyposition > * record.[r]~remove > * address HOSTEMU 'execio * diskw "/mnt/3/.holder.new" (finis > stem record.' > * end > * : > > > ------------------------------------------------------------------------------ > Get 100% visibility into Java/.NET code with AppDynamics Lite! > It's a free troubleshooting tool designed for production. > Get down to code-level detail for bottlenecks, with <2% overhead. > Download for free and get started troubleshooting in minutes. > http://pubads.g.doubleclick.net/gampad/clk?id=48897031&iu=/4140/ostg.clktrk > _______________________________________________ > Oorexx-users mailing list > Oorexx-users@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/oorexx-users ------------------------------------------------------------------------------ Get 100% visibility into Java/.NET code with AppDynamics Lite! It's a free troubleshooting tool designed for production. Get down to code-level detail for bottlenecks, with <2% overhead. Download for free and get started troubleshooting in minutes. http://pubads.g.doubleclick.net/gampad/clk?id=48897031&iu=/4140/ostg.clktrk _______________________________________________ Oorexx-users mailing list Oorexx-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/oorexx-users