aboutsummaryrefslogtreecommitdiff
path: root/pkg/utilities/nttools/doc/tlcol.hlp
blob: c9bd9c947530c11a0791030abaa0897cf361f0a8 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
.help tlcol May2000 tables
.nj
.ih
NAME
tlcol -- Display column information.
.ih
USAGE
tlcol table
.ih
DESCRIPTION
This task is used to list column information for a table.  The output is
written to STDOUT, which may be redirected to a file.  There will be one line
of output for each column in the table, and each output line may contain the
column name, data type, print format, and units.
The first line of output for each table in the input list is the table
name preceded by a # sign.

The output from this task may be used as input to various tasks such
as 'tcreate', 'tprint', and 'tproject'.
.ih
PARAMETERS
.ls table [file name template]
A list of tables for which column info is to be printed.
.le
.ls (nlist = 4) [integer, min=1, max=4]
The number of items to list.
The output will consist of 'nlist' columns,
one line for each column that is defined in the table.
The items listed out are column name (displayed for all 'nlist' values),
data type (displayed if 'nlist' is 2 or higher),
display format (if 'nlist' is 3 or higher),
units (if 'nlist' is 4).
If 'nlist = 1', only the column name will be displayed;
the output list may be edited and used as input to
'tprint', 'tdump,' 'tedit', 'tread', 'tproject', or 'tquery'.
The default of 4 can be used to generate
a column-description file for the 'tcreate' task.

If a column contains an array of values at each row,
rather than just a single element,
the array size is shown in square brackets appended to the data type.
.le
.ih
EXAMPLES
1.  Display the names, data types, print formats, and units of all the
columns in the table "example.tab":

.nf
	tt> tlcol example.tab
.fi

2.  Print (using the 'tprint' task) specific columns:
.nf

	tt> tlcol example.tab nlist=1 >colnames.lis
	tt> edit colnames.lis
        (Rearrange the column names and perhaps delete some of them.)
	tt> tprint example.tab columns=@colnames.lis

3.  Create a new table based on the columns in "example.tab":

	tt> tlcol example.tab nlist=4 >colnames.lis
	tt> edit colnames.lis
        (Delete or modify some column descriptions and/or add new ones.)
	tt> tcreate ex2.tab cdfile=colnames.lis ...
.fi
.ih
BUGS
.ih
REFERENCES
This task was written by Phil Hodge.
.ih
SEE ALSO
tinfo, tcreate, tdump
.endhelp