Complex flat file, Delimited flat file, Fixed width flat fil

Post questions here relative to DataStage Enterprise/PX Edition for such areas as Parallel job design, Parallel datasets, BuildOps, Wrappers, etc.

Moderators: chulett, rschirm, roy

Post Reply
adityaram
Participant
Posts: 14
Joined: Mon Oct 11, 2004 10:01 am

Complex flat file, Delimited flat file, Fixed width flat fil

Post by adityaram »

I'd appreciate if anyone can explain the difference b/w a complex flat file, delimited flat file and a fixed width flat file.
Possibly with an example. It would be very helpful.
Thanks in advance,
AR
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

A fixed-width flat file is a text file in which the data columns are specified explicitly by their width.

Code: Select all

100010SOCKET       HEXAGONAL     12.3475012
100011DRIVER       HEXAGONAL     29.5032017
A delimited flat file is a text file in which the data columns are specified as lying between a known delimiter character. Common delimiter characters are comma (hence "comma-separated values", or CSV, files) and tab (hence "tab-delimited file").

Code: Select all

100010,SOCKET,HEXAGONAL,12.34,75,0,12
100011,DRIVER,HEXAONAL,29.50,32,0,17
Both of the above have the same structure in every line in the file.

A complex flat file does not have the same structure in every line in the file. Some lines contains repeating subsets of other lines. For example

Code: Select all

BEATLES          09 FEB 1962BRIAN EPSTEIN
JOHN LENNON      09 OCT 194008 DEC 1980JOHN WINSTON LENNON
PAUL McCARTNEY   18 JUN 1942           JAMES PAUL McCARTNEY
GEORGE HARRISON  25 FEB 194329 NOV 2001GEORGE HARRISON
RINGO STARR      07 JUL 1940           RICHARD STARKEY
ROLLING STONES   15 JUL 1962ANDREW LOOG OLDHAM
MICK JAGGER      26 JUL 1943           MICHAEL PHILIP JAGGER
KEITH RICHARDS   18 DEC 1943           KEITH RICHARDS
BRIAN JONES      28 FEB 194203 JUL 1969LEWIS BRIAN HOPKIN JONES
BILL WYMAN       24 OCT 1936           WILLAM GEORGE WYMAN
CHARLIE WATTS    02 JUL 1941           CHARLES ROBERT WATTS
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Post Reply