Was this helpful?
ASCII (Fixed)
Fixed ASCII data can be described as any ASCII file that has no characters separating fields, records may or may not be separated and where each record in the file occupies the same number of bytes. Because there are so many variations of fixed ASCII data files, you may have to modify the source or target properties for the ASCII (Fixed) connector. Details are discussed in the property options section.
With fixed ASCII source files, you must use a schema. Since the data has no field delimiters and possibly no record separators, it appears continuous until you specify a record separator or the record length, set up the field sizes and data types, and assign optional field names.
If the fixed ASCII file contains nonprintable characters, you may find it easier to import the data using the Binary format. See Binary.
If the fixed ASCII file contains Null characters or any form of packed data, you must use the Binary connector.
Multiple Structured Schemas Possible - Fixed ASCII files can contain multiple structured schemas. If your source or target fixed ASCII file has multiple structured schemas, you can find information by searching in the help for "multiple record types."
Connector-Specific Notes
If null characters (hex 00) are encountered in a fixed ASCII data file, the end of file is assumed and data reading stops. If your files contain null values, change the source connector to Binary.
If the alternate field or record separator is not listed
1. Highlight the default separator.
2. Enter the separator as an ASCII character.
Example: If the separator is a line feed, enter:
LF
To use a hex value instead, go to the next step.
3. Enter a backslash, an X, and the hexadecimal value for the separator.
Example: If the separator is a line feed, enter:
\x0a
For a list of the 256 standard and extended ASCII characters, search for "hex values" in the documentation.
Single record type data: Fixed ASCII has only one certainty: Every record in the file has exactly the same number of bytes. If all the single record type data is not exactly the same length, the file is a variable length file and it cannot be read as Fixed ASCII. See Actian Extract for other possibilities.
Multirecord type files: To work with variable-length multirecord files (with or without a record separator), search for "multiple record" in the documentation.
Connector Parts
Connector parts are the fields you configure to connect with a data source or target. The fields that are available depend on the connector you select.
For a list of all parts for source connectors, see Specifying Source Connector, Parts, and Properties.
For a list of all parts for target connectors, see Specifying Target Connector, Parts, and Properties.
Property Options
You can specify the following source (S) and target (T) properties:
Property
S/T
Description
CodePage
S/T
Translation table that specifies which encoding to use for reading and writing data. The default is ANSI, the standard in the US.
DatatypeSet
S/T
Allows you to choose between standard and COBOL data types in fixed ASCII data files. Standard (the default) specifies that all the data in the file is readable (lower) ASCII data. If your fixed ASCII file contains (or needs, for target file) COBOL display type fields and you are using a COBOL 01 copybook (fd) to define the fields, you MUST change this property option to "COBOL" before connecting to the COBOL copybook in the External Structured Schema window.
FieldSeparator
T
Allows you to choose a field separator character for your target file. The default is None. To select a record separator that is unlisted and is a printable character, highlight None and then type the correct character. For example, to select an asterisk ( * ), enter an asterisk from the keyboard.
If the record separator is not a printable character, replace None with a backslash, an X, and the hexadecimal value for the separator. For example, if the separator is a check mark, then enter \XFB. For a list of the 256 standard and extended ASCII characters, search for "hex values" in the documentation.
Fill Fields
T
Writes an ASCII data file in which every field is of variable length. When set to false, all trailing spaces are removed from each field when the data is written. When set to true (the default), the integration platform pads all fields with spaces to the end of the field length to maintain the fixed length of the records.
InsertEOFRecSep
S
Inserts a record separator on the last record of the file, if it is missing. The default is false. If set to true, this property captures the last record (with no record separator) instead of discarding it.
Note:  If property options define a specific separator (CR-LF, LF), the specified separator must exist at the end of all records, including the last record in the file. Any trailing data without that separator is ignored. Therefore, to avoid losing your last line of data (if it does not contain the appropriate record separator), we suggest either manually editing (for one or two affected files) or creating a program (for several affected files) that adds a record separator at the end of the last record.
Caution!  If a terminating record separator already exists, a blank line is read at the end of the file. Depending on your target or export type, you may need to filter out these blank lines to avoid errors in exported data.
NumericFormatNormalization
S
When set to true, handles thousands-separators according to usage for locale when numeric strings are converted to numeric type. This property overrides any individual field settings. Default is false.
Ragged Right
T
Writes an ASCII data file where the last field in each record is variable length when set to true. The default is false. The false setting pads the last field with spaces to the end of the record length to maintain the fixed length of the records.
Note:  You must set FillFields to false for the RaggedRight property to work properly. The Ragged Right property has no effect if you set FillFields to true. If you set FillFields to false, then the RaggedRight property determines whether blank fields and fields with only spaces as their data still appears at the end of the record.
RecordSeparator
S/T
Most fixed ASCII files have a carriage return-line feed (CR-LF) between records. To use other characters as the record separator or no record separator, click the RecordSeparator cell for a list of choices. To use another separator, enter it here. The SystemDefault setting enables the same transformation to run with CR-LF on Windows systems and LF on Linux systems without having to change this property.
To use a record separator that is not listed and is a printable character, highlight the CR-LF and then type the correct character. For example, if the separator is a pipe (|), enter a pipe from the keyboard.
If the record separator is not a printable character, replace CR-LF with a backslash, an X, and the hexadecimal value for the separator. For example, if the separator is a check mark, then enter \XFB. For a list of the 256 standard and extended ASCII characters, search for "hex values" in the documentation.
SampleSize
S
Sets the number of records (starting with record one) that are analyzed to a default width for each source field. The default value is 5000. You can change the value to any number between one and the total number of records in your source file. As the number gets larger, more time is required to analyze the file, and it may be necessary to analyze every record to ensure that no data is truncated. To change the value, click StyleSampleSize, highlight the default value, and type a new one.
StartOffset
S
If your source data file starts with characters that need to be excluded from the transformation, set the StartOffset option to specify at which byte of the file to begin. The default value is zero. The correct value may be determined by using the Hex Browser.
Note:  This property is set in number of bytes, not characters.
StripLeadingBlanks
S
Leading blanks occur in fixed ASCII files by default. To delete them, set StripLeadingBlanks to true.
StripTrailingBlanks
S
Trailing blanks occur in ASCII fixed files by default. To delete them, set StripTrailingBlanks to true.
Tab Size
S/T
If your fixed ASCII file has embedded tab characters representing blank space, you can expand those tabs to set a number of spaces. The default value is zero. To change it, highlight the zero and enter a new value.
Supported Data Types
All data in ASCII files is Text, but you may wish to select other data types. The following data types are available:
Boolean (parses and displays true or false values)
Name (parses and displays proper name into name parts, such as honorifics, titles, last name, middle initial, first name)
Number (parses and displays numeric and floating values)
Text (parses and displays alphanumeric values)
Decimal (parses and displays a proper fraction whose denominator is a power of 10)
Use the Name data type to parse a name into its component pieces. Some examples are honorifics (Mr., Dr.), names (first, middle, last) and titles (PhD., Jr.). You can also display the component pieces according to an edit mask. For example, you can set the mask to display a name in a field as "lastname, firstname" (Jones, Joan).
Length
These are field lengths in your data. If you need to change field lengths, reset them in the schema.
Caution!  A field length shorter than the default may truncate data.
Alignment
Data in each field of your target file or table has an alignment property of general, left, center, or right.
Pad Character
This option is valid ONLY for character fields. When data does not fill a field completely, the remainder of the field may be filled with some character.
Last modified date: 12/03/2024