# T Conversion

Updated: 11/30/2021, 7:00:45 PM
Created: 11/30/2021, 7:00:45 PM
Last Updated By: Jake Tuttle
Read Time: 1 minute(s)

# Description

The T code extracts a character substring from a field value. It takes the form:

T{m,}n
1

where:

  • m specifies the starting column number.
  • n is the number of characters to be extracted.

If m is specified, the content of field 9 of the data definition record has no effect - characters are counted and extracted from left to right, for n characters.

If m is not specified, the content of field 9 of the data definition record will control whether n characters are extracted from the left or the right-hand end of the value. If field 9 does not contain an R, the first n characters will be extracted from the value. If field 9 does contain an R (right justify), the last n characters will be extracted from the value.

# Input Conversion

Input conversion does not invert. It simply applies the text extraction to the input data.

# Examples

Code Source Value Field 9 Result
T3,4 ABCDEFG L CDEF
T3,4 ABCDEFG R CDEF
T2 ABCDEFG L AB
T3 ABCDEFG R EFG
T3 ABCDEFG T ABC

Back to Conversion Processing