Running the Compare Program¶
Once the “.STB” file is ready, one can run Compare by typing:
compare
at the DOS prompt.
As soon as Compare starts, it asks you how many alternatives you want to see in the table (see the sample session in the box below). Of course, respond with ‘1’ if you are just going to make a table from one bank. You may have up to 10 alternatives. Next, for each alternative, you are asked to specify from what type of bank this alternative should be read and then the rootname of the data bank file. Answer this first question with one character, and then hit {ENTER}. Type ‘w’ if this is a normal G bank or workspace-type bank (.BNK); ‘c’ if this is a compressed G bank (.CBK); ‘h’ if this is a hashed G bank (.HBK); ‘d’ if this is a dirfor file (.DFR); and ‘v’ if this is a vam file (.VAM). Note that if you want to use a dirfor file, you must have the DIRFOR.DAT corresponding to that file in the current directory in which you are running Compare. Make sure that the MACRONAM.BIN specified in that file points to a valid location. (See the Display chapter of the LIFT manual for more details on DIRFOR.DAT.) If you are assigning a vam file, note that Compare automatically assumes that each Vam file has a “sister” G bank, with the same root name and in the same directory. It will try to open this file to find series such as macrovariables that might not be in the Vam file. See the G7 or InterDyme manual for more details on Vam files. Remember with all databank file names to give only the root name of the file (with no file extension).
Next, if you are printing from more than one bank, you are asked whether you would like to see the alternatives in actual values (‘a’), as differences (‘d’) from the base run, or as percentage differences (‘p’) from the base. Type the desired letter and press [Enter] to show your choice. (If you are listing only one data bank or a single run of a model, it does not matter how you answer this question.)
You then will be asked for the name of the stub file, and you should reply with the name of the stub file that you have prepared. (Use the full name, including the “.STB”). Finally, Compare will ask for the name for the output file. We commonly use the “.OUT” extension for these files, but any name is OK. When Compare has finished and has given the DOS prompt again, you can use the DOS Print command to obtain a printed copy.
As an alternative to answering the individual questions asked by Compare, you can put the answers into a file such as “COMPARE.IN” and start the program with
compare compare.in
Compare assumes that a filename given on the command line is a file containing input responses. The box below shows the response file that would correspond to the example on the previous page.
1
v
dyme
mast.stb
tabpf.out
A configuration file format also is available, which can be used by specifying the “-f” option on the command line. For example, if your configuration file is named COMPARE.CFG, you can specify using this with: “compare -f compare.cfg”. Note the space between the “-f” and the file name. An example config file is in the box below.
Number of Simulations; 1
1st bank type; h
1st bank name; c:\ami\quip
Stub file; c:\ami\quip.stb
Output File; quip.out
Note that for the IdLift model, a stub file called DYME.STB already has been prepared which contains most of the macrovariables and many of the sectoral variables in the model. The QUEST model has stub files called LONGTERM.STB and SHORTTRM.STB that produce tables similar to those in the QUEST section of the meeting book. If you would like to make tables containing only portions of these file, you can cut and paste to create new stub files. These files also can be used to print or graph data in G7 using the look command (see the G7 documentation).