Page 1 of 1

Import fixed width file schema

Posted: Wed Nov 30, 2011 11:31 am
by vskr72
I have a schema file like this for a fixed width file. This is just a sample.

Code: Select all

ODW_TYP			1	2
BANK_NBR		 3	5
ACCT_NBR		  6	17
AAS_ACCT_TYP     18	23
AAS_IND			24	24
The schema file has more than 300 columns. Is there any way that I can import this metadata directly into datastage without manually entering all the 300 cols. Any inputs or alternatives. Pls advice?

Kumar

Posted: Wed Nov 30, 2011 12:07 pm
by roy
Hi,
This fixed file was created by some other program there for the creator must have the file definitions file.
assuming this is a file built by a cobol program it should have a copy book or copy member that defines it.
If you get the definition file you should be able to import it and get the table definition you need.
IHTH (I hope This Helps),

Re: Import fixed width file schema

Posted: Wed Nov 30, 2011 1:19 pm
by ray.wurlod
vskr72 wrote: Is there any way that I can import this metadata directly into datastage without manually entering all the 300 cols.
Possibly, possibly not. If what you're seeking is something that will read a file of column names and start and end positions, and convert that into a DataStage table definition, then you're out of luck. Though it would be a reasonably easy routine to write for someone experienced with the repository structure of a table definition.

Posted: Thu Dec 01, 2011 1:37 am
by vskr72
Thank you everyone.