Help for DTIMPORT

Though the information shown here refers to DirectTalk for Windows, it is applicable to the OS/2 version as well.

DTIMPORT is a DirectTalk/NT user client that will read information from an ASCII flat file and load the information into a DirectTalk/NT database. This program can be run from any OS/2 command line or from a REXX program. The function provided is similar to the existing database load and merge features provided by the DirectTalk/NT Development Work Area with several enhancements.

DTIMPORT will support the loading of a database located on a remote DirectTalk/2 system. The ASCII input file must be on the same system as the one where DTIMPORT is being executed. See the /T option for more information.

DTIMPORT is executed with the following command:

DTIMPORT <options> input output <server>

where items in brackets are optional and:
- options are one or more options switches and parameters. These options must begin with a slash '/'. Some of the switches require a parameter value, such as /k 32 or /k32. The following are all acceptable formats:
/a /k 32 /r
/ak32r
/a /k32 /r

- input is the full path name of the ASCII flat file to be read and data loaded in the DirectTalk/NT database. The name must follow FAT 8.3 naming convention. Long filenames are not allowed.
- output is the name of the DirectTalk/NT database. It must also follow FAT 8.3 naming convention. Do not specify the full path name as DirectTalk/NT will automatically place the database in the correct directory for data, usually \DTALK\DATASERV.
- server is the name of the DirectTalk/NT Server. If not specified, the program will use GSSSN01. This system can be running on a different system as the one where DTIMPORT is being run. See the /T option below.

An example of the simplest invocation would be:

DTIMPORT INPUT.FIL OUTPUT.DAT

DTIMPORT will read INPUT.FIL and load OUTPUT.DAT. OUTPUT.DAT must already exist as a DirectTalk/NT database. Existing records in the database will be left alone or updated with new data, based on the contents of the input file, INPUT.FIL. DTIMPORT will determine the key length of the database and read the data from the first position up to the character position equal to the key length in each line from the input record as the key. Data starting in the next position after the key will be treated as data for the database record. The remainder of the line (up to a
maximum of 4096 characters) will be read and loaded into the database. Newline chacacters at the end of records are stripped before loading into the database.

Input data records can be up to 16000 characters long. Use the appropriate options (see below) to parse the input line for the desired key and record.

Options
=======

/H or /h - print this help text. DTIMPORT.HLP must be in same directory where DTIMPORT is being run.

/R or /r - replace an existing database. The database is cleared of all data before loading begins. Default of DTIMPORT is merge the contents of the input file into the database. New records are added. Existing records are updated. Unchanged records are left as is.

/K nn or /k nn - specify the key length where nn is an integer between 1 and 49. This option can only be used when the database does not exist. DTIMPORT will create the database with the key length specified. The record length will be equal to the length of the longest line in the input file (up to 4096 characters) unless the /L record length parameter is also specified. This option cannot be used if the database already exists.

/A or /a - specify autokey. DTIMPORT will automatically generate database keys starting with 1. The number will be padded with leading zero's (0) so the length of the key is the same as the database key length. For example, if the database key length is 3, the keys will be 001, 002, 003...999. This option cannot be used with /B, key offset. The entire line in the input file is assumed to be record data unless you use the /L and/or /C options.

/L nnnn or /lnnnn - specify the record length where nnnn is between 1 and 4096. If the database does not exist and the /K option was also specified, the database is
created using the key length and record length specified. If the database does exist, this limits the number of characters loaded into the database from each input line to the number specified.

/B nnnn or /bnnnn - specify the key offset. This parameter defines the starting character position in each input line when creating the key. This should be used when the key data does not start in the first position. For
example, if your input data looks like: 

somestuff 0001This is the first record
somestuff 0002This is the second record
 

you must specify /B 11 to pick up the keys of 0001 and 0002. (You would also need to specify /C. See below.)

/C nnnn or /cnnnn - specify the record offset. Operation is the same as the key offset except it applies to the database record data. The record offset and record length parameters may be used together if you only wish to load a smaller part of contiguous data from each input line. For example, an input line like:
SOMEJUNK 0001 SOMEMOREJUNKThis is the dataMOREJUNK
may be properly parsed by specifying:
/B 10 /C 27 /L 16
to obtain a key of 0001 and a record of "
This is the data".

/D or /d - causes the input file to be deleted once loading of the database is completed.

/Q or /q - suppresses all messages, including errors, to the screen.

/W or /w - turn display of error messages back on if all messages were shut off with the /Q option. This option is useful if you want to only display errors messages or redirect these error messages to a file for use later. This option is ignored unless /Q is also specified.

/E or /e - end loading of the database if DTIMPORT is unable to write a record because another DirectTalk/NT process or application has a lock on it. DTIMPORT will try 3 times to write the record. If the lock remains after 3 attempts, a message that the record was not written is displayed (if /Q was not specified). If /E is used, the program will abort and no further records will be loaded. Otherwise,
the program will continue to the next record and continue loading.

/P hhmmss or - pauses actual loading of the database until the time /p hhmmss specified. Specify the time in 24 hour format. Noon is 120000 and midnight is 000000. 6:30PM is 183000.

/t x or /T x - allows the user to specify whether DTIMPORT is to connect to DirectTalk/NT locally or remotely via LAN. Normally, DTIMPORT will read the global configuration file, VSGBL.CFG, and use the value for tr_adapter to determine
whether to use a local or remote connection. If you specify a value here, that check is not done. Specify 255 for a local connection. Specify 0, 1, 2, or 3 for a remote
connection where the number is the token ring adapter that should be used. 

NOTE: In VSGBL.CFG, if tr_adapter is set to 15x, which indicates the local system is configured as a node in a network, the program will check the local node name. If it is the same name as specified when the program was started, DTIMPORT 
will use a local connection (255). Otherwise, it will assume a remote connection is needed. The adapter used will be the one specified in VSGBL.CFG (tr_adapter - 150).

Typically, this option is needed if you want to load a database on another DirectTalk/NT system from the one where you are running DTIMPORT. The local system may be configured as a standalone system. The remote system must have at least one path for LAN-attached clients defined and available.

Notes:

1) DTIMPORT must be kept and run in the same directory as where the DirectTalk/NT code is installed. If you intend to use the /H (display help) option, DTIMPORT.TXT must be kept there also. A copy of DirectTalk/NT must be installed on the same system as where DTIMPORT is located.

2) If you intend to use DTIMPORT to load a database on a remote DirectTalk/NT
system, the system where DTIMPORT is located must have a LAN adatpter card installed. Windows NT Networking must be installed with NetBIOS support installed and configured. The node where DTIMPORT is located must have DirectTalk/NT installed to provide DTIMPORT with certain prerequisite DLL's and files (VSGBL.CFG) required for operation.

Return to top of this page

Return to the main page.