Vam2Vam – Selective Copying From One Vam File to Another¶
Vam2Vam is a utility program, run at the DOS prompt, that copies selected matrices and vectors from one Vam file to another. It often happens that one has left out of a Vam file some essential matrix or vector. It is easy enough to modify the VAM.CFG file and create a new, all-zero vam file with a place for the new matrix or vector, but how can data be copied from the old Vam file to the new? Vam2Vam is an answer. Or one discovers that a matrix or vector must be enlarged. How can the data in the old Vam file be copied into the new? Vam2Vam is an answer. Or a Vam file has been used in the preparation of data that has in it various matrices and vectors that were essential for preparing the data but that are not needed in the final model. How can we extract just the final product matrices and vectors into a new Vam file for the model? Use Vam2Vam. See also the G7 mcopy and vmake routines that may prove more convenient.
The program is invoked by the command:
- vam2vam <source> <target> <list> <startdate> <stopdate>
where
- source:
is the file name, without the .VAM extension, of the source Vam file;
- target:
is the filename, without the .VAM extension, of the target Vam file;
- list:
is the name of a file with a list of the names of vectors or matrices to be copied. For example, to copy “abc” in the source to “def” in the target and “xyz” in the source to “xyz” in the target, the contents of the list file would be
abc def xyz
Note that the default value of the name in the target is the name in the source, so we did not need to repeat xyz on the last line.
- startdate:
is the first year whose data is to be copied
- stopdate:
is the last year whose data is to be copied.
Note that G7 now has the ability to copy vectors and rectangular matrices from one Vam file to another. See details on the mcopy command in the G7 Help files or the Reference Manual.