Page 1 of 1

Example of ODBC using DataDirect VMtxt24.so (text file)

Posted: Mon Mar 12, 2012 7:09 pm
by dougcl
Hi folks, we are standardizing on the Connector Import Wizard for the purpose of importing table defs into DataStage, and I want to apply this also to sequential file sources. To that end, I am looking at the DataDirect text driver for ODBC (VMtxt24.so). Has anyone got a sample config in .odbc.ini?

Thanks,
Doug

Posted: Mon Mar 12, 2012 7:15 pm
by qt_ky
I wouldn't recommend going to that extreme as you will lose a lot of flexibility (delimiters, quote characters, fixed-width files, etc.). The ODBC text file driver points to a directory and within a DSN you must specify your delimiter and quote character. So you would pretty much lock yourself into a box there.

The .odbc.ini file has a [Text] DSN sample entry in it already. To test it, copy and paste the sample DSN into a new entry with a new name in square brackets. For the Database= setting, enter a directory name (not a file). Customize the Delimiter= setting (I think it defaults to comma), and the FirstLineNames= setting (0 or 1 if the first line is column names). See how inflexible it becomes? Every other setting is pretty much good as is. Also edit the top-most header section of .odbc.ini to add your DSN name and type up there too.

When you run a job or import metadata, enter a file name when it asks for table name.

Posted: Tue Mar 13, 2012 10:32 am
by dougcl
Fantastic answer. Thank you.