PRTDATA Instruction |
PRTDATA( options ) list of data file series (optional)
Prints series from a RATS format data file. To print data already in memory, use COPY or PRINT.
Wizard
If you open a RATS format file using File–Open..., you can export series to another file using the File–Export... operation.
Parameters
list of series |
If you list a set of series names, PRTDATA will only print the data for those series. If you leave this parameter blank, it will print all the series on the file. |
Options
FORMAT=[PORTABLE]/BINARY/CSV/DBF/DIF/FREE/HTML/PRN/RATS/RTF/TEX/TSD/WKS/XLS/XLSX/"(FORTRAN format)"
This selects the desired format for the output. The “spreadsheet/table” formats (XLS, XLSX, WKS, RTF, DBF, PRN, CSV, DIF, HTML, TEX and TSD) will only work if the listed series have the same frequency. If you are making an archival copy, we would suggest you stick with PORTABLE, since it includes all the information present on the RATS format file itself.
ORGANIZATION=[ROWS]/COLS
For "spreadsheet/table" formats XLS, XLSX, WKS, RTF, DIF, PRN, CSV, TSD, HTML and TEX, this selects whether the series will run across the page (or file) in rows (ORG=ROWS) or down the page in columns (ORG=COLS).
UNIT=COPY/[OUTPUT]/other unit
RATS I/O unit for output. Default is UNIT=OUTPUT for PORTABLE format, UNIT=COPY for others.
PICTURE="picture code for data"
Allows formatting of numerical output through the use of picture codes such as "##.###" or "*.##". This applies only PRN, CSV, TSD, RTF, DIF, HTML, TEX and FREE formats. (Actual spreadsheets like XLS and XLSX always use the full precision).
ACROSS=entries per line [4]
When using FORTRAN format, you can use ACROSS to indicate the number of data values that will be output on each line. See the COPY command for details.
LIKE=template string for variables to copy
This allows you to print only for those series that match a template, defined using * or ? wildcard characters. For example, LIKE="X*" would print all series whose names begin with "X", while LIKE="X?" would only print series whose names are two characters long, with X being the first character.
Description
You can use PRTDATA to:
•check the data on the file.
•make archival copies of the data in a “human-readable” format, since RATS format files are machine-readable only.
•transfer data to another program.
Example
dedit trends.rat
prtdata sales income
open copy sales.xlsx
prtdata(format=xlsx,org=cols) sales income
The first PRTDATA will show the series information on the output window. The second will write it to a spreadsheet file (sales.xlsx) in XLSX format.
Copyright © 2025 Thomas A. Doan