restore all but ! variables [message #60634] |
Thu, 29 May 2008 09:11 |
Jeremy Bailin
Messages: 618 Registered: April 2008
|
Senior Member |
|
|
Does anyone know of a convenient way of restoring the contents of a
SAVEd file created using /ALL that will restore everything except for
system variables (ie. anything starting with !)? I have some old .sav
files from a different system with a different file structure, and
doing a simple RESTORE over-writes things like !PATH that really need
to be from the new system.
On a related note, is there a way to rename a common block? I.e. I
have a .sav file that contains a previous version of a common block,
but in my current code I have extended the common block to include
some new variables. So I would like to do something like this so that
I can resurrect the saved data into the new data structure where my
new code can operate on it:
restore, 'oldsavedfile'
***RENAME cb (WITH ASSOCIATED vars) TO oldcb (WITH ASSOCIATED
oldvars)***
common_block, cb, LIST OF VARIABLES IN NEW COMMON BLOCK
ASSIGN oldvars TO EQUIVALENT vars
save, 'newsavedfile', ....
-Jeremy.
|
|
|