getdim [ parameter=value ... ] [ inputfile ... ]
Parameters are: include_vars, annotate, printout.
getdim prints the names and lengths of a variable's dimensions. With annotate turned off, getdim can be useful inside shell processing scripts.
List of variables to print dimension information for. If the list is preceded by a minus sign, all variables except those listed will be printed. Wildcards * and ? are allowed.
The default is to print information for all variables.
If annotate=yes, then the dimension lengths are annotated with the corresponding dimension, variable and file names, otherwise this information is suppressed.
Valid responses are [yes or no]. The default is [yes].
Specifies that output be directed to the printer, as opposed to the screen. Valid responses are [yes or no]. The default is [no].
This example shows the outputs from getdim for the cases when annotate is turned on and off. The dataset, test.tdf, has two variables x and y, each of which are dimensioned 12x27x45. The second example shows how getdim might be used in a script.
% getdim test.tdf
include_vars : char(255) ? [] x y
annotate : char( 3) ? [yes] y
printout : char( 3) ? [no]
Getdim test.tdf
month line sample x
12 27 45
month line sample y
12 27 45
%
% set xdims = (`getdim include_vars=x annotate=n printout=n test.tdf`)
% echo $xdims
12 27 45
%
getinfo, getval, printvar, master, passinfo, varinfo.
Last Update: $Date: 1999/05/10 20:14:02 $