To run NMSRFIT automatically you have to create a command file that contains all the commands which are necessary to run NMSRFIT. It can look like the following one (here this file is named FIP.COM):
$NMSR !Command to start the programm @ini_filename.i !Call for the inifile ind_var !Command after GUESS> to define name, value. -err, +err !the independent variable !empty line !!! simp !MINUIT commands simp simp simp exit !leaving MINUIT pl !plot command in RESULTS> as s 1 !notice the empty lines !!!! ! " " " " b !DOPLOT commands y h 5 !empty line !!! ha !hardcopy commands hpl p michi_hp4_1 ! ! ! !empty lines !!! ! ! ! [EOB]You can add all the commands you want NMSRFIT to do. But be careful with the number of empty lines between different commands! They have to be correct, otherwise the commandfile will fail.
Comment: Remember that the independent variable can already be defined in the fitroutine. You can add the IND_VAR command (see IND_VAR) in the command file which is running the program then you don't have to edit the db-file.
$ DEFINE/USER SYS$INPUT SYS$COMMAND $ EDIT FILENAME.I $! $ @FIP.COM $ COPY DB_FILENAME.DB+INI_FILENAME.A DB_FILENAME.DB $ DEFINE/USER SYS$INPUT SYS$COMMAND $ EDIT DB_FILENAME.DB $ EXIT