| tlcol | tables | tlcol |
tlcol -- Display column information.
tlcol table
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.
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.
1. Display the names, data types, print formats, and units of all the columns in the table "example.tab":
tt> tlcol example.tab
2. Print (using the tprint task) specific columns:
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 ...
This task was written by Phil Hodge.