DEDIT Instruction |
DEDIT( options ) filename
DEDIT allows you to create or alter a RATS format data file. Once you have opened a file with DEDIT, you can use the CATALOG, STORE, EDIT, INCLUDE, DELETE, RENAME, PRTDATA, and UPDATE instructions to work with the file. Use SAVE to save any changes to the file, or QUIT to close the file without saving your changes.
Wizards
File>Open and File>New offer alternative ways to open or create a RATS format file. There are then other operations which allow you to view, edit, and create data series, copy data from one file to another, export data, and more. See RATSData and Data Wizards for details.
Parameters
|
filename |
name of the file to edit. If you leave it blank, you will be prompted for a name. |
Options
NEW/[NONEW]
Use the option NEW when you are creating a new file. If you forget to put NEW when creating a file, DEDIT will prompt you if it cannot find the file requested.
Notes
You can only edit one RATS format file at a time using DEDIT, which is one reason to prefer to use the menu operations with open files if possible. If you have a RATS file open for editing, and then issue another DEDIT, RATS will ask you if you want to save the changes to the old file before opening the new file. You can, however, open other RATS format files for input only (using OPEN DATA) while you are editing a RATS file. You can use the instruction ENVIRONMENT RATSDATA=file name in place of DEDIT for existing files.
DEDIT does not allow you to read data from the opened file. Use OPEN DATA (or ENVIRONMENT RATSDATA=) and DATA instructions (or the Data Wizard (RATS Format) operation) to read data from RATS format files.
You can also use the command COPY(FORMAT=RATS) to write data to a RATS format file. With COPY, all the data must be written to the file with a single instruction; if a file with the same name already exists, it will be overwritten. With DEDIT, you can use several STORE instructions to write series to a file. If you do create a RATS file using COPY, you can always go back and use DEDIT and related instructions to add, remove, display, or edit series on the file.
Example
dedit(new) newdata.rat
store resids fitted stderrs
save
This creates a new RATS format file, adds three series to it and saves it.
RATS File Portability Issues
RATS has used the same file format since Version 4, so files created by versions since then are interchangeable. RATS format files are identical across platforms. For example, files created under Windows can be used without translation on Macintosh, UNIX, and Linux systems.
When transferring files from one platform to another (by ftp or e-mail, for example), to avoid corrupting the file be sure to use a “binary” transfer, rather than a “text” transfer.
Copyright © 2026 Thomas A. Doan