Writing ASCII Data From G7¶
Here are some G7 commands commonly used for writing data to ASCII output files. These complement specialized routines for printing data in other formats, such as Excel spreadsheets.
- tdates <date1> <date2>
Sets the dates for subsequent typing commands without actually printing out any data.
- (sty)pe <series_name> [date1] [date2]
“Silent” type writes the series to the currently open “save file” without displaying data on the screen. This can speed processing a long add file.
For example, with the Quip data base assigned, the commands
tdates 1990.1 1991.4 matty gdp c v fe fi gshows the results:
Date gdp c v fe fi g 1990.100 5660.6 3759.2 822.7 541.6 615.9 1153.0 1990.200 5750.8 3811.8 835.0 554.8 615.1 1164.3 1990.300 5782.2 3879.2 804.7 555.5 634.1 1176.9 1990.400 5781.7 3907.0 736.3 577.3 649.2 1210.4 1991.100 5821.9 3910.7 723.5 577.4 610.3 1220.6 1991.200 5892.5 3961.0 716.4 602.7 615.0 1227.4 1991.300 5950.2 4001.6 744.1 602.6 624.5 1226.5 1991.400 6002.1 4027.1 760.7 624.4 639.3 1229.2If the first word after the command is “file”, then the next word is the name of a file to which the results will also be written. Example:
matty file nipa.dat gdp 1 c 2 cd v 1 vfnre 2 vfnrsThe results are shown on the blue Results screen. If saving is on (as a result of a “save <filename>” command explained below), the results also go into the save file. If the optional “dump” keyword is provided, then the output is more compact; this is useful for creating spreadsheet-like text files.
The optional <type> argument is the command that will be printed when using ty or sty commands. The default is “update”, but it may also be “data”, “vdata”, “ovr”, “ind”, “cta”, “gro”, “vupdate”, or “dump”.
- ic [<text>]
The “InterDyme Comment” routine prints text to the G7 output window. If “save” is on, then the text is stored in the text file. In the file, a “#” is inserted before the string is printed. These lines are recognized by G7, Build, and IdBuild as comments.
- text [<text>]
The text command nearly is identical to the ic command. It prints text to the G7 output window. If save is on, then the text is stored in the text file. In contrast to the ic command, no “#” is inserted before the string is printed.
- ts
The “time stamp” command prints the time and date to the G7 output window. If save is on, then the time and date is stored in the text file as a comment.