T Code

The example below illustrates the use of the T code. The BOOK-CATALOG file contains the full title of each available book in the attribute TITLE. Titles can be up to 20 characters long. Since an abbreviated form of each book title needs to be included in certain INFO/ACCESS reports, the T code is used to extract the first eight characters from attribute TITLE.

Format

T [start ,] #chars

Parameter(s)

start

Starting position where the extraction is to begin.

#chars

Number of characters to extract.

Description

Justification determines whether the count is from left to right (L justification) or from right to left (R justification).

Thus, the Attribute Definition item for SHORT-TITLE in the BOOK-CATALOG file contains the data:

  SHORT-TITLE

001 S

002 2

003

004

005

006

007

008 T8

009 L

010 8

SHORT-TITLE is defined as a synonym for Attribute 2, TITLE, from which the T correlative extracts the first eight characters. For example, if the full titles were:

DATABASE MANAGEMENT SYSTEMS

OPERATING SYSTEM CONCEPTS

WORD PROCESSING

WRITING COMMERCIAL APPLICATIONS

the short titles would be:

DATABASE

OPERATIN

WORD PRO

WRITING

See Also

Extracting Data

G Code