[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: cannot run .sav file

lsyrkin@yahoo.com writes:
> Hi,
> I need to save a widget program as .sav file to make it run on the same UNIX
> machine from cmdtool and on another one under run-time IDL licence. This
> program works fine if I start it from IDLDE. To save the program I do the
> next:
> 1. Open IDLDE.
> 2. Open a program XeIm.pro that is used by main widget program DisplXe.pro.
> 3. Open DisplXe.pro.
> 4. Compile All.
> 5. Save, /Routines, Filename='Xe.sav'
> 6. Close IDLDE.
> 7. Change mode for Xe.sav for execute.
> 8. Start Xe.sav from UNIX prompt.
> It does not start and gives the next lines: $ ./Xe.sav ./Xe.sav: SR^D: not
> found ./Xe.sav: ^DH^XTue: not found ./Xe.sav:
> ^E^Esparc^Esunos^C5.2^L^_^H^GDISPLXE^M4!^B^R!: not found ./Xe.sav:
> ... garbage excised 

I think you are trying to run the IDL SAVE files like an executable
program.  It is not executable!  The garbage you are seeing is the
Unix shell trying to interpret the binary data as shell commands.  I
think you will still have to make a small script which loads the SAVE
file and runs the right start-up function.  You could do something
like this:

idl << EOF
path = '/home/leonid/'
restore, path+'Xe.sav'

You will have to make this executable, be sure the path is correct,
and define leonid_main to start whatever programs you want to start.

The comments by R. Bauer about resolving all of the routines are
probably appropriate too.


Craig B. Markwardt, Ph.D.         EMAIL:    craigmnet@cow.physics.wisc.edu
Astrophysics, IDL, Finance, Derivatives | Remove "net" for better response