Page 1 of 1

row to columns and fixed width file problem

Posted: Mon Nov 27, 2006 7:44 am
by vij
1.is it possible to convert rows to columns?if so which stage shuld I use?

2.I have a file which has only 1 column of length 200.I have about 20 rows in the file, all the 20 records have record length till 65, I got the fatal errors -

---------------
- Sequential_File_9,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).
- Sequential_File_9,0: Expected 200 bytes, got 45.
- Sequential_File_9,0: Import error at record 4.
-----------------

The properties of the file are as mentioned below :

file type : sequential file.
Record level -
record length = fixed
Fixed defaults -
delimiter = none

can anyone help me to solve the problem.

Posted: Mon Nov 27, 2006 8:54 am
by balajisr
Check whether your file is in proper format and then import table definitions for the file.

1. Import -> Sequential File Definitions
2.Select the file
3. Select fixed width columns check box
4. Fill "column width text box". Give your column width as a comma delimited string e.g 20,10,30.
5. Define your column names and adjust length such that it is same as display.

This should work.

Re: row to columns and fixed width file problem

Posted: Mon Nov 27, 2006 10:54 am
by narasimha
vij wrote:1.is it possible to convert rows to columns?if so which stage shuld I use?
Yes.

There is no specific stage you can use to convert rows to columns. You will have to use the techinque of vertical pivot.(This has beed discussed here many times, a search on vertical pivot will give you many results)

Also did you resolve your fixed width problem?