The Workspace Bank: Making, Compressing, and Splicing Banks¶
At any one time, G7 has one workspace bank and 0 to 25 assigned banks. The workspace bank is the same physical bank throughout any one run of G7 unless it is changed using the wsbank command explained below. Whenever G7 needs a series, it looks first in the workspace and then, only if it does not find the variable there, it looks through the assigned banks. The original assigned bank, at position ‘a’, is specified in the G.CFG file that is read when the program starts. Additional banks may be loaded, replacing the bank in the ‘a’ slot or assigned to other positions. As G7 forms variables with f commands or introduces variables with data commands, the newly created or introduced series are put into the workspace bank. Even the update and mupdate commands do not change the series in the assigned bank but put the revised series into the workspace.
- (bti)tle <w | assigned> [bank title]
Displays the title and configuration of the workspace (w) or assigned bank (‘a’ through ‘z’ except ‘w’). In the case of the workspace, you can supply a new title or change the existing one. It is useful to record the time and date of creation of data banks. This can be achieved easily by using the keywords “%time” and “%date” in the title. G7 will replace these keywords with the actual time and date, respectively. This capability also can be used elsewhere in G7, including in the vtitle and ic commands.
- (wsb)ank <bank_name>
This makes the named bank the workspace. The bank name is expressed as in the bank command, above. Beware: the workspace now becomes the named bank and this bank will be changed by almost anything you do. In particular, a zap command (see below) will destroy the bank completely. Use this command with utmost caution. It is best to back up a bank before using it with this command.
- (wsi)nfo
This command prints information to the screen about the current workspace bank, including its bank title, the number of series in the bank, the maximum number of observations per series, and the default starting year (base year) and period.
- wsdump <filename> [<”tdates”>]
This routine will dump data from the cache to a text file. Data may be printed according to the current tdates if the <”tdates”> option is specified. Otherwise, the routine will strip from the series any leading and trailing zeros, missing values, and garbage, and it only will print data that appear to be valid. This text file may be employed with Banker to compile compressed banks.
- zap [<baseyr>[<starting period> [<nobservations>]]]
Sets the number of series in the workspace to zero. Arguments after zap override those in the G.CFG file. “baseyr” overrides the line “Default base year of workspace.” “starting period” overrides the line “First month covered.” “nobservations” overrides the line “Default maximum number of observations per series.”
- del <series_name>
Delete the named series from the workspace data bank. The WS.BNK file physically is not reduced in size by a deletion, but if another variable is added to it after the deletion, it will be put in the space formerly occupied by the deleted variable.
- (ren)ame <old_name> <new_name>
Changes the name of a series in the workspace bank.
- (bu)pdate <x> = <y>
bupdate stands for bank update. This command takes the series x from the workspace, updates it with non-zero entries from series y, and stores it as x in the workspace. If x is not already in the workspace, bup will put it there with values from the assigned bank. “y” may be an expression.