row to columns and fixed width file problem

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

row to columns and fixed width file problem

Post 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.
balajisr
Charter Member
Charter Member
Posts: 785
Joined: Thu Jul 28, 2005 8:58 am

Post 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.
narasimha
Charter Member
Charter Member
Posts: 1236
Joined: Fri Oct 22, 2004 8:59 am
Location: Staten Island, NY

Re: row to columns and fixed width file problem

Post 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?
Narasimha Kade

Finding answers is simple, all you need to do is come up with the correct questions.
Post Reply