CT

CT

Top  Previous  Next

 

The CT (Copy to Terminal) command displays the content of record(s) from a file.

 

 

Format

 

CT {DICT} filename {record ... | *} {options}

 

where

 

filenameis the name of the file to be processed. The DICT keyword indicates that the dictionary portion of filename is to be used.

 

recordis the name of the record to be displayed. Multiple record names may be given in a single command. If the default select list (list 0) is active, this list is used as the source of record names. . If the default select list (list 0) is active, this list is used as the source of record names. Specifying a record name of an asterisk (*) displays all records in the file. If no record name is given and the default select list is active, this list will be used to determine which records are reported.

 

optionsare chosen from the following:
BINARYDisplay the record as a binary data item.
HEXDisplay the data in each field in hexadecimal format.
ID.SUPSuppress display of file and record name.
LPTR nRedirects the output to printer n. If n is omitted, the default printer is used.
NO.QUERYWhen using a select list, the confirmation prompt is omitted. The NO.SEL.LIST.QUERY mode of the OPTION command can be used to imply this option.
NUM.SUPSuppress display of line numbers.

 

 

The CT command displays the specified records from file. Each record is preceded by the file and record names.

 

When using the default select list as the source of record ids to be processed, a confirmation prompt is issued prior to commencing the display. This can be suppressed using the NO.QUERY option.

 

By default, the report shows each line (field) of the record on a separate line, prefixed with the line number. Lines that are wider than the output device are wrapped to the next line. If filename is a data collection file, the record is shown in JSON format.

 

The HEX option, produces a report in which the data is displayed in hexadecimal form, two hexadecimal digits per character with no intervening spaces.

 

The BINARY option treats the record as binary data in which field marks are simply part of the data. The record is shown in both hexadecimal and character format, 16 bytes per line. Non-printing characters are displayed as dots (.) except for the field mark, value mark and subvalue mark which as shown as ^, ] and \. Each line is prefixed by the byte offset (from zero) of the first byte on the line.

 

On ECS mode systems, if the record contains characters outside the 8-bit set, the behaviour of the HEX and BINARY options is different. In this case, each character is shown as a four digit hexadecimal value, 8 characters per line for BINARY mode, The record id, if displayed, will be followed by "(ECS)".

 

 

Example

 

SELECT VOC WITH F1 LIKE X...

CT VOC

 

This command sequence would display each X type record from the VOC.

 

 

CT READERS 2

READERS 2

1: Cartwright, D

2: 7 Spring GroveyNottingham

3: 1-1y3-1

 

The above command displays the record with id 2 from the READERS file. The y in the final line is a terminal dependent representation of the value mark character.

 

 

See also: DUMP