dumpvar [ parameter=value ] [ inputfile ... ]
Parameters are: include_vars, num_row_dims, stack_vars, dim_starts, dim_counts, list_dims, hex_output, printout
dumpvar dumps variable data in ASCII. Unlike printvar, which outputs scaled data, dumpvar outputs unscaled data, e.g., data exactly as it is stored.
dumpvar's output report is arranged in rows. The report rows correspond to to different values (d1, d2, ..., dk) of leading dimensions D1, D2, ..., Dk. k is specified by the num_row_dims parameter. Each variable dumped must have the same leading dimensions.
The user specifies which rows to report using the dim_starts and dim_counts parameters. If num_row_dims=k, and
dim_starts=i1,...,ik and dim_counts=n1,...,nk,
then there will be n1*...*nk rows reported, starting with row (i1,...,ik) and ending with row (i1+n1-1,...,ik+nk-1).
If stack_vars=no, each report row will consist of exactly one text line. All row values for each variable will be reported on the same text line. If stack_vars=yes, each report row will consist of multiple text lines, one line per variable.
The following examples are based on the trivial test dataset XX, which contains the following three variables:
xx[i,j] = i + j - 1, 1 <= i <= 4, 1 <= j <= 5 yy[i,j] = i + j + 9, 1 <= i <= 4, 1 <= j <= 5 zz[i] = i + 20, 1 <= i <= 4
Example 1, dump all three variables, all variable data for each row on the same text line.
% dumpvar XX
include_vars : char(255) ? [] xx yy zz
num_row_dims : int ? [1]
stack_vars : char( 3) ? [no]
dim_starts : int ( 5) ? [1]
dim_counts : int ? [1] 4
list_dims : char( 3) ? [yes]
hex_output : char( 3) ? [no]
printout : char( 3) ? [no]
Dumpvar xx Page 1
xx yy zz
1 1 2 3 4 5 11 12 13 14 15 21
2 2 3 4 5 6 12 13 14 15 16 22
3 3 4 5 6 7 13 14 15 16 17 23
4 4 5 6 7 8 14 15 16 17 18 24
Example 2, dump all three variables, data for each variable row on separate text lines.
% dumpvar XX
include_vars : char(255) ? [] xx yy zz
num_row_dims : int ? [1]
stack_vars : char( 3) ? [no] y
dim_starts : int ( 5) ? [1]
dim_counts : int ? [1] 4
list_dims : char( 3) ? [yes]
hex_output : char( 3) ? [no]
printout : char( 3) ? [no]
Dumpvar xx Page 1
1 1 2 3 4 5 xx
1 11 12 13 14 15 yy
1 21 zz
2 2 3 4 5 6 xx
2 12 13 14 15 16 yy
2 22 zz
3 3 4 5 6 7 xx
3 13 14 15 16 17 yy
3 23 zz
4 4 5 6 7 8 xx
4 14 15 16 17 18 yy
4 24 zz
Example 3, dump the middle three columns of variables xx and yy by making the number row dimensions equal to 2. zz cannot be included because it does not have two dimensions.
% dumpvar XX
include_vars : char(255) ? [] xx yy
num_row_dims : int ? [1] 2
stack_vars : char( 3) ? [no]
dim_starts : int ( 5) ? [1 1] 1 2
dim_counts : int ( 2) ? [1 1] 4 3
list_dims : char( 3) ? [yes]
hex_output : char( 3) ? [no]
printout : char( 3) ? [no]
Dumpvar xx Page 1
xx yy
1 2 2 12
1 3 3 13
1 4 4 14
2 1 2 12
2 2 3 13
2 3 4 14
2 4 5 15
3 1 3 13
3 2 4 14
3 3 5 15
3 4 6 16
4 1 4 14
Example 4, dump the middle three columns of variable xx and yy, but keeping the number of row dimensions equal to 1. See NOTES.
% dumpvar XX
include_vars : char(255) ? [] xx yy
num_row_dims : int ? [1]
stack_vars : char( 3) ? [no] yes
dim_starts : int ( 5) ? [1] 1 2
dim_counts : int ( 2) ? [1] 4 3
list_dims : char( 3) ? [yes]
hex_output : char( 3) ? [no]
printout : char( 3) ? [no]
Dumpvar xx Page 1
1 2 3 4 xx
1 12 13 14 yy
2 3 4 5 xx
2 13 14 15 yy
3 4 5 6 xx
3 14 15 16 yy
4 5 6 7 xx
4 15 16 17 yy
Ordinarily, dim_starts and dim_counts have exactly num_row_dims values. However, in the last example, dim_starts and dim_counts were assigned more than num_row_dims values. This trick allowed variables xx and yy to be subset along a dimension that was not a row dimension. If variable xx was include in the list of variables to dump, it would not have been affected, since it only had one dimension.
Output text lines are limited to 256 characters. No report will be generated if any text line will exceed 256 characters.
Last Update: $Date: 1998/05/28 18:07:44 $