fixed width files

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
datastagedw
Participant
Posts: 53
Joined: Fri Mar 07, 2008 1:17 am

fixed width files

Post by datastagedw »

hello,

Well i have a doubt since long. There is something I am not very sure about the fixed width files. i have searched dsxchange regarding the same but could not find the exact answer. the problem/confusion is regarding reading fixed width files. If i have a fixed width file with total record length as suppose 270, what is the best method to describe the metadata. shall i consider a single column of length 270 and split the columns down the line using transformer with some field function? or else shall i define the metadata with the column lengths as we do for a delimited file. in this case do we have to compulsorily mention 'char' as the data type for all the columns? What if i get any bad records, will they get rejected if i have enabled the reject link of the sequential file stage.

may be this question is posted before also, i am not sure. but can anyone help me out with a complete description of reading fixed width files?? I beleive this could be an faq as i have many people struggling when it comes to fixed width files.


Any help would be appreciated. thanks.
ETL DEVELOPER
keshav0307
Premium Member
Premium Member
Posts: 783
Joined: Mon Jan 16, 2006 10:17 pm
Location: Sydney, Australia

Post by keshav0307 »

i am using exact metadata at file Stage only.
in this case do we have to compulsorily mention 'char' as the data type for all the columns
No,
varchar, date, numeric etc will also work.
Post Reply