INTEXT Process

To access this process:

See this process in the Command Table.

Process Overview

Import a text file with a known data definition to create a Datamine binary file (either .dm or .dmx, depending on your current default file format.

A data definition can either be determined from the header of the imported file, or from an existing Datamine binary file. If a separate file (INDD) is used, INTEXT attempts to calculate the type and (in the case of alphanumerics) size of the columns of the output file.

Several parameters are available to control the conversion process.

Note: Data records may not start with the character "!". This is because the ! symbol acts as the end-of-data character. However, macro files, where the command starts with !, may be read if a blank is inserted prior to the ! symbol.

Input Files

Name

Description

I/O Status

Required

Type

INDD

File containing Data Definition.

Input

Yes

Table

Output Files

Name

I/O Status

Required

Type

Description

OUT

Output

Yes

Table

File to be created.

Parameters

Name

Description

Required

Default

Range

Values

COLUMN

Define the column separator in the input text file.

  1. Comma (default).

  2. Space.

  3. Tab.

  4. Semi colon.

  5. Colon.

No

1

1,5

1,2,3,4,5

DELIMIT

Treat consecutive delimiters as one.

  • 0: Off.

  • 1: On.

No 0 0,1 0,1
DECIMAL

Specify whether numbers use decimal points or commas.

  • 0: Dot

  • 1: Comma.

No 0 0,1 0,1
ABSENT Character string or number that defines absent data. No "-" Undefined Undefined
CEILING Character string or number that defines ceiling data. No "+" Undefined Undefined
INCRMNT Only read every 1 of INCRMNT records / rows, starting from STARTROW. No 1 Undefined Undefined
HEADER

Row number in input text file that contains the field names. If no header is set, then the input data defintion (INDD) is required (see also ALLCOL).

0 or negative is treated as no header.

No 1 Undefined Undefined
ALLCOL

Only used if INDD is specified.

Import all columns even if these do not exist in Data Definition.

  • 0: Only import columns if they occur in Data Definition provided by INDD (see also HEADER).

  • 1: Import all columns in input text file.

No 0 0,1 0,1
NSCAN

Number of records to read to auto detect field types and lengths. Not used if IN is defined and HEADER is 0 or negative.

If 0, let the process determine the appropriate number of rows to scan according to the file size.

No 0 Undefined Undefined
STARTROW Row number in input text file of the first record to import. No 1 Undefined Undefined
ENDROW

Row number in input text file of the last record to import. Default=+, i.e. read all rows.

0 or negative will also be treated as read all rows.

No "+" Undefined Undefined
UPCASE

Force all field names to be upper case.

Note that if the data definition or input file contains multiple variations of a field name case, and UPCASE = 1, the import will stop.

  • 0: Use case from text (default).

  • 1: Convert to upper case.
No 0 Undefined Undefined

Example

In the following example, the CSV file for conversion does not contain a header file and the first row is blank, hence a separate data definition is required (INDD) and the data rows start at line 2 (STARTROW):

!INTEXT &IN(filetoconvert.csv),

&INDD(my_dd),

&OUT(convertedDMfile),

@STARTROW=2