ENVIRONMENT Instruction |
ENVIRONMENT environment strings (separated by blanks)
Changes RATS execution modes and offers alternative method of opening files.
Options
PROCEDURE=filename
If you have a suite of procedures that you use regularly, you can use ENV PROCEDURE=... as a convenient way of loading those procedures into RATS. This functions much like a SOURCE command, in that it executes the commands stored on an external file. The difference is that RATS will automatically execute the library file whenever you do anything that clears the memory (File>Clear Memory, or an END(RESET) command). The library file will normally contain either a set of procedures, or a set of SOURCE commands that source in various procedures.
You can accomplish the same thing by using the "Procedure Library" field in the Preferences dialog, or the command-line switch /procedure=libraryfile on the command line used to start RATS.
TRAPERRORS/NOTRAPERRORS
SUBSCRIPTERRORS/NOSUBSCRIPTERRORS
TRAPERRORS suppresses direct error messages. If you are writing a program or procedure and want to handle errors yourself, use TRAPERRORS and test the %ERRCODE variable where appropriate. Subscript errors occur when you reference an out-of-range array or series element in an expression. Suppressing subscript errors with NOSUBSCRIPTERRORS will speed up (somewhat) programs which make heavy use of subscripted expressions, such as COMPUTE instructions within loops or EWISE instructions. You should never do this until you are sure the program is running correctly.
GSAVE=filename template for saving graphs
GFORMAT=RGFZ/RGF/PORTRAIT/LANDSCAPE/PDF/LPDF/WMF/PNG/PICT/JPEG
Note that these have been superseded by the GSAVE instruction.
Use GSAVE=template to automate the process of saving graphs to files. The filename template should includes one asterisk (*) somewhere in the filename. For example, use ENV GSAVE="MYGRAF*.RGFZ" to save graphs as MYGRAF1.RGFZ, MYGRAF2.RGFZ, etc.
Use the GFORMAT parameter to select the format in which the graphs will be saved (PORTRAIT is PostScript format with a portrait orientation, and LANDSCAPE is PostScript format in landscape orientation).
[SHOWGRAPHS]/NOSHOWGRAPHS
PRINTGRAPHS/[NOPRINTGRAPHS]
PRINTGRAPHS causes RATS to automatically print all graphs as they are generated. This works in interactive mode or in batch mode. Use NOSHOWGRAPHS to suppress displaying of graphs on the screen.
RATSDATA=RATS data file name
This opens a RATS data file for input and editing (equivalent to DEDIT plus OPEN DATA)
DATA=Data file name
Equivalent to OPEN DATA filename
COPY=Copy file name
Equivalent to OPEN COPY filename
PLOT=Plot file name
Equivalent to OPEN PLOT filename
[ECHO]/NOECHO
Suppresses echoing of input lines in batch mode.
COLUMNS=width of the output file [80]
Variables
|
%ERRCODE |
When using ENV TRAPERRORS, RATS stores the error code in this LABEL variable when an instruction generates an error, and sets it to blank when an instruction executes correctly. |
Copyright © 2026 Thomas A. Doan