fixed widht file problem

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
vij
Participant
Posts: 131
Joined: Fri Nov 17, 2006 12:43 am

fixed widht file problem

Post by vij »

Hi all,

I am using a fixed width file, which has only one column of length 200.
I have some records which have length as 30,some as 45 some as 90 and some as 40.

When i run this job, i get the following fatal error :
Sequential_File_11,0: Short read encountered on import; this most likely indicates one of the following possibilities:
1) the import schema you specified is incorrect
2) invalid data (the schema is correct, but there is an error in the data).

the schema details are as below :

Record Level-
record length =fixed

Field defualts
Delimiter = none

pls help me in solving this.
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

You don't have a fixed width file. If you did, all records would have the exact same fixed width - hence the name.
-craig

"You can never have too many knives" -- Logan Nine Fingers
ajith
Participant
Posts: 86
Joined: Thu Nov 10, 2005 11:10 pm

Re: fixed widht file problem

Post by ajith »

vij wrote:Hi all,

I am using a fixed width file, which has only one column of length 200.
I have some records which have length as 30,some as 45 some as 90 and some as 40.

When i run this job, i get the following fatal error :
Sequential_File_11,0: Short read encountered on import; this most likely indicates one of the following possibilities:
1) the import schema you specified is incorrect
2) invalid data (the schema is correct, but there is an error in the data).

the schema details are as below :

Record Level-
record length =fixed

Field defualts
Delimiter = none

pls help me in solving this.

From your post I get an impression like your file is not fixed width, hence you cannot use the same.

If you really have a fixed width file, it will most probably be a data problem, check out the data file and find if the lengths are correct.
vij
Participant
Posts: 131
Joined: Fri Nov 17, 2006 12:43 am

Post by vij »

Ok, I agree that the file i use is not a fixed widht file.

wen i have a file which has variable length for records, wat needs to be done, so that DataStage can read the file without any problem.
ArndW
Participant
Posts: 16318
Joined: Tue Nov 16, 2004 9:08 am
Location: Germany
Contact:

Post by ArndW »

You need to know your column and line separators and the data types (and max lengths) for all your columns. Put those into the stage and you will be all set.
Raghavendra
Participant
Posts: 147
Joined: Sat Apr 30, 2005 1:23 am
Location: Bangalore,India

Post by Raghavendra »

If you want to read entire record in one column.
Find the possible max length of the record and specify the lenth of the column with that value and datatype as varchar...
Post Reply