User Guide : Map Connectors : Source and Target Map Connectors : Adabas (NatQuery)
 
Share this page                  
Adabas (NatQuery)
The Adabas (NatQuery) connector uses the ASCII Fixed format as its underlying structure. 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. 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 as binary. See Binary.
If the fixed ASCII file contains null characters or any form of packed data, you must use the Binary connector. For details, see the Connector-Specific Notes and Binary.
Multiple Record Structured Schemas Possible
Adabas (NatQuery) files can contain multiple record structured schemas. For information on defining multiple record structured schemas, search for "multiple record types" in the help topics.
Connector-Specific Notes
If there are null characters (hex 00) in a fixed ASCII data file, the integration platform stops reading the data at the first occurrence of a null character as it assumes that this is the end of the file. If you experience this, 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 step 3.
3. Enter a backslash, an "x", and the hex 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.
Property Options
Single record type data: Fixed ASCII has only one certainty – every record in the file has exactly the same number of bytes. If all single record type data is not the same length, the file is a variable length file and it cannot be read as Fixed ASCII. For other possibilities, see Actian Extract.
Multirecord Type Files: To work with variable-length multirecord files, with or without a record separator, search for "multiple record" in the documentation.
You can set the following source (S) and target (T) properties.
Property
S/T
Description
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.
InsertEOFRecSep
S
This option 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.
If the property options define a specific separator (such as 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. 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.
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 use a script to filter out blank lines and avoid errors in exported data.
Sample Size
S
Allows you to set the number of records (starting with record 1) that are analyzed to set a default width for each source field. The default value is 1000. You can change the value to any number between 1 and the total number of records in your source file. As the number gets larger, more time is required to analyze the file, but it may be necessary to analyze every record to insure no data is truncated.
To change the value, click StyleSampleSize, highlight the default value, and type a new value.
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.
This property is set in number of bytes, not characters.
StripLeadingBlanks
S
By default, leading blanks are left in fixed ASCII source data. To delete leading blanks, set StripLeadingBlanks to true.
StripTrailingBlanks
S
By default trailing blanks are left in fixed ASCII source data. To delete trailing blanks, set StripTrailingBlanks to true.
FieldSeparator
T
Allows you to choose a field separator character for your target file. The default is None. The other choices are comma (,), tab, space, carriage return-line feed (CR-LF), line feed (LF), carriage return (CR), line feed-carriage return (LF-CR), control-R, and pipe (|).
If the record separator is not one of the choices from the list and is a printable character, highlight None and then type the correct character. For example, if the separator is an asterisk (*), type an asterisk from the keyboard.
If the field 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 where every field is variable length. If this property is set to false, all trailing spaces are removed from each field when the data is written. The default is true. The true setting pads all fields with spaces to the end of the field length to maintain the fixed length of the records.
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.
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.
DatatypeSet
S/T
Allows you to choose between standard and COBOL data types in your fixed ASCII data file. Standard is the default and means 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.
RecordSeparator
S/T
A fixed ASCII file is presumed to have a carriage return-line feed (CR-LF) between records. To use other characters as the record separator or no record separator, click RecordSeparator for a list of choices, including system default, carriage return-line feed (default), line feed, carriage return, line feed-carriage return, form feed, empty line, ctrl-E, and no record separator. To use a separator other than one from the list, 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.
If the record separator is not one of the choices from the list and is a printable character, highlight the CR-LF and then type the correct character. For example, if the separator is a pipe (|), type 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.
Tab Size
S/T
If your fixed ASCII source file has embedded tab characters representing white space, you can expand those tabs to set a number of spaces. The default value is zero. To change it, highlight the zero and then type a new value.
CodePage
S/T
This translation table determines which encoding to use for reading and writing data. The default is ANSI, the standard in the US.
Data Types
All data in ASCII files is Text, but you may wish to select other data types. The following data types are supported:
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)
Tip:  Specify the Name data type if you want to parse a name into its component pieces. Some examples are honorifics (such as 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
Size of field in the target.
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.