creating CTL inside a GS script

Brian E. Doty doty at COLA.IGES.ORG
Thu Jan 27 12:20:11 EST 2005


The file name provided to the write function
is also a string (a string in the scripting
language) and either should be in quotes, or
assigned to a script variable.

eg,

  ofile = "prec_control.ctl"
   ...
  rc = write(ofile,'vars 1')

(you should assign the result of the write function
to a variable as well, as in the above example,
so that it is not viewed as a command to be passed
to grads, which will result in some strange
error messages).

You should also be able to give a full path
name for the file name, eg:

  ofile = "/usr/homes/user/prec_control.ctl"

...Brian



More information about the gradsusr mailing list