Sequential File Deffinition

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
JDionne
Participant
Posts: 342
Joined: Wed Aug 27, 2003 1:06 pm

Sequential File Deffinition

Post by JDionne »

I am tring to define a sequential file to import into a SQL server database. I cant seem to get the file definition correct. I use the layout that I was given by the data provider inserting the length of each coloumn. When I try to use it I get the error to many coloumns in record. I have defined this file twice and it has 85 coloumns. Id rather not do that again. Does anyone have any idea what I am doing wrong?
Jim
Amos.Rosmarin
Premium Member
Premium Member
Posts: 385
Joined: Tue Oct 07, 2003 4:55 am

Post by Amos.Rosmarin »

Is it a fixed width file or a delimited one ?
If it is a delimited file, what is the delimiter ?

The best is to open the file in notepad or vi and verify the metadata definitions.
Try to get the metadata import from a single line of the file and look for the following reasons for the import failure :
Is it fixed width file or a delimited file ? Is the delimiter as you've been told ? It the number of columns correct ? did they give you correct definition and there is a single corrupted line or is it that the definitions do not match the file .... etc.


HTH
Amos
kcbland
Participant
Posts: 5208
Joined: Wed Jan 15, 2003 8:56 am
Location: Lutz, FL
Contact:

Post by kcbland »

An easy way to do sequential file definition imports is to use the wizard and exploit the PREVIEW button. You can see the lines appear as you key in the list of column widths. Make sure that you create filler columns where you have gaps in the column definitions. But DON'T name the columns, do that after saving the metadata. You can always come back and change the names in DS Manager on metadata.

In addition, don't forget that your DISPLAY metadata column is really the width of the fields. See your documentation for clarity.
Kenneth Bland

Rank: Sempai
Belt: First degree black
Fight name: Captain Hook
Signature knockout: right upper cut followed by left hook
Signature submission: Crucifix combined with leg triangle
JDionne
Participant
Posts: 342
Joined: Wed Aug 27, 2003 1:06 pm

Post by JDionne »

I think that I have found my problem. The row length of my records is 1373 where an average txt file can only handle around 1125 characters. My records have been forced to wrap causing my error. Thanx for the help
Jim
Post Reply