Reading Fixed width file

Post questions here relative to DataStage Server Edition for such areas as Server job design, DS Basic, Routines, Job Sequences, etc.

Moderators: chulett, rschirm, roy

Post Reply
deva
Participant
Posts: 104
Joined: Fri Dec 29, 2006 1:54 pm

Reading Fixed width file

Post by deva »

Hi I have one data file. it contain only one column with 27000.

I copied this file from desktop into unix. This file dosen't have delimiters and quote chars.

I am reading this file as Fixed width file. But I am getting error like ' columb unexpectedly terminated with error'.

Can any one sugget me how to read this file.

-Thanks in Advans
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

Binary or ASCII transfer? Only read it as fixed width if each record is always a consistent, fixed size. For that you need to ensure the Display Size is the actual size of each field. Otherwise just read it as one long varchar.
-craig

"You can never have too many knives" -- Logan Nine Fingers
tkbharani
Premium Member
Premium Member
Posts: 71
Joined: Wed Dec 27, 2006 8:12 am
Location: Sydney

Post by tkbharani »

Its because you need to FTP files from DOS to UNIX only in ASCII format , so that host transfers data consistently. If you have already transfered then use "dos2unix" command for converting DOS files to UNIX files.

Also while reading Fixed width make sure you are assigning exact column size and also take care of Display value. handling fixed width in server jobs and parallel jobs are some what different.
Thanks, BK
Post Reply