Page 1 of 1

fixed widht file problem

Posted: Wed Nov 29, 2006 12:52 am
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.

Posted: Wed Nov 29, 2006 1:09 am
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.

Re: fixed widht file problem

Posted: Wed Nov 29, 2006 1:22 am
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.

Posted: Wed Nov 29, 2006 1:25 am
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.

Posted: Wed Nov 29, 2006 1:47 am
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.

Posted: Wed Nov 29, 2006 5:46 am
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...