27th International Rexx
Language Symposium
28-31 August 2016
Tampa, Florida USA
Sponsored by
Rexx Language Association

ooDUMPVARS

A wrapper for ooSysDumpVariables

Les Koehler
30 Aug 2016


Table of Contents

Abstract

Objectives

Syntax

Output Fileid

Examples - Keep

Examples - Delete

Source code

Help

Demonstration


Abstract

The ooDUMPVARS function extends the syntax of ooSysDumpVariables to increase its usability by automatically naming dump files to tie them to the program being executed, allowing multiple generations of dump files and providing a cleanup capability.

The presentation will explain the syntax of ooDUMPVARS and the results of the various types of invocation.

The presentation includes the code itself, which we will explore as needed.


Objectives


Syntax

>>-INTERPRET ooDUMPVARS(-->
Arg#:    1           2                    3             4       5
 >-- ['Keep'] [,edit command varname][,'identifier'] [,'stem.'] [,filename] -->

 or:

 >-- ['Delete' , '*' | first         [,'*' |  last]] [,'stem.',['searchid']]-->
 >--                       ) --><--

Fileid

The fileid consists of:

All nicely concatenated and dotted to yield something like:

     C_sayit.rex.0.SDV

The dump file will be put in the same folder as the invoker.



Examples - Keep

  Interpret dumpvars()
  -- Dumps the variables to a file
  -- replacing the previous ".0.SDV"
  -- file.

  Interpret dumpvars(,'edit')
  Interpret edit
  -- Dumps the vars and edits the file
  -- replacing the previous file.

  Interpret dumpvars('K')
  -- Dumps the vars to a new file,
  -- keeping the previous file.
  -- The first non-existing ".0.SDV"
  -- fileid is used.

  Interpret dumpvars('K','edit')
  Interpret edit
  -- Dumps the vars to a new file,
  -- keeping the previous file and
  -- edits the new file.

  Interpret dumpvars(,,,'mystem.')
  -- Sets the elements of MYSTEM.
  -- to the commands to Interpret,
  -- perhaps like this:

  do m=1 to mystem.0
    interpret mystem.m
  end


  Interpret dumpvars('K','edit',,'mystem.')
  -- Similar to above, except
  -- a new file is created
  -- and we can edit it
  -- later, when it suits us.

  do m=1 to mystem.0
    interpret mystem.m
  end

  Interpret edit


Examples - Delete

  Interpret dumpvars('D','*')
  -- Deletes all the program's
  -- SDV files

  Interpret dumpvars('D',3,6)
  -- Deletes generation 3 to 6

  Interpret dumpvars('D',3,'*')
  -- Deletes generation 3 to last

  Interpret dumpvars('D','*',,'mystem.')
  -- Sets the elements of MYSTEM.
  -- to the commands to Interpret,
  -- perhaps like this:

  do m=1 to mystem.0
    interpret mystem.m
  end

  Interpret dumpvars('D','*',,'mystem.',,
   'N:\MyTHEstuff\F_testt.the.')
  -- Similar to above, but searches
  -- in a specific folder for SDV files
  -- that belong to a specific program.
  -- SysFileTree is used to do the search,
  -- with '*' appended to the searchid,
  -- which must end with a period.
  -- The elements of MYSTEM. are set to
  -- the commands to Interpret, just like
  -- the previous example.



Source code

Here is the code: oodumpvars.rex.html


Help

When run from the command line, this is the result: oodumpvars.rex_help.txt.html


Demonstration

testoo.rex demonstrates an example of using ooDumpVars.rex

Summary

You've seen:

Would anyone like to further explore any of the above, or have a question?

Thank you for your attention.