David is correct about the .0 tail of a stem: it's no different from any other tail, except that EXECIO uses it (for DISKR operations only) as a place to stash the number of the highest tail it created.
EXECIO does not pay any attention to it for DISKW, probably because it doesn't trust us to have scrupulously maintained its value, as you seem to have. That does not mean that you can't use stem.0 for that purpose when writing out your array, however. 'EXECIO' stem.0 'DISKW' outfile '(STEM MYSTEM. FINIS' for example. Of course, MYSTEM. must still be monotonic (i.e. not sparse, with gaps in the index) for this to work correctly. -Chip- On 8/19/2013 09:01 David Ashley said: > 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 > ------------------------------------------------------------------------------ Introducing Performance Central, a new site from SourceForge and AppDynamics. Performance Central is your source for news, insights, analysis and resources for efficient Application Performance Management. Visit us today! http://pubads.g.doubleclick.net/gampad/clk?id=48897511&iu=/4140/ostg.clktrk _______________________________________________ Oorexx-users mailing list Oorexx-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/oorexx-users