End Of File

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

End Of File

Post by JDionne »

I am trying to bring in a sequencial flat flile that is fixed width. The file format that I have brought into manager matches the file and I have made all the coloumns nullable. But when I run the job I get the following error:

NewJobTemplate..BPPastImp.Import: read_fixedwidth() - row 3, column Nvocc_Code, required column missing


I can open the file and see whats happening. The first two rows have data in the last coloumn, which is NVOCC_Code but the third row does not have any data there. That matches my business rules, but I cant get datastage to accept it. Has anyone seen anything similar and can tell me what little thing that I am missing. Im sure its simple, im just in it too deep to see it.
thanx
Jim
WoMaWil
Participant
Posts: 482
Joined: Thu Mar 13, 2003 7:17 am
Location: Amsterdam

Post by WoMaWil »

You can fit the row to the structure by using a intermedium sequential file. First you open your seq-File read a whole line as a field, you change, what is needed and then you save it in an other seq-File and then you read this file.

Wolfgang Huerter
=====================
Cologne, Germany
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

All you need to do is change some values in your Sequential stage. Scroll it over to the right and you'll see a (somewhat hidden) column labeled "Incomplete Column". It defaults to "Error" which is what is causing you grief. If it's not required to have data in that field, change it to "Replace" or "Retain". Check the online help for a description of all of the choices available there.

-craig
danjm
Participant
Posts: 34
Joined: Tue Sep 09, 2003 8:44 am
Location: Canada
Contact:

Post by danjm »

Jim
I'm pretty new to DataStage but I think I just successfully dealt with a similar problem. I have an input file of records with fixed-field lengths. Not all the records have data in some of the last records however so, in effect, the records are variable-length.

What I did was to edit the input sequential stage. In the Output/Format Tab, I checked the "suppress row truncations warning" checkbox and selected "map empty string" for the "missing columns action" listbox. THEN, I went to the "columns" tab and set the "nullable" column to "YES" for all of the trailing columns where there might not be data. This gave me the output file I was trying to obtain.
One catch that I have not taken care of yet... I get lots of warnings in the log file each time a field is missing in the input...
I hope that this helps... Have a good day everyone.

Dan Marshall
Alberta Learning
Edmonton, AB
danjm
Participant
Posts: 34
Joined: Tue Sep 09, 2003 8:44 am
Location: Canada
Contact:

Post by danjm »

quote:Originally posted by chulett
[br]All you need to do is change some values in your Sequential stage. Scroll it over to the right and you'll see a (somewhat hidden) column labeled "Incomplete Column". It defaults to "Error" which is what is causing you grief. If it's not required to have data in that field, change it to "Replace" or "Retain". Check the online help for a description of all of the choices available there.

-craig


Well Craig, that certainly sounds easier.. thanks, I'll try that too. Sorry if my earlier reply confused anyone.

Dan Marshall
Alberta Learning
Edmonton, AB
JDionne
Participant
Posts: 342
Joined: Wed Aug 27, 2003 1:06 pm

Post by JDionne »

I actualy did all that you suggested and it worked!!!
Thanx for the help
Jim


quote:Originally posted by danjm
[br]quote:Originally posted by chulett
[br]All you need to do is change some values in your Sequential stage. Scroll it over to the right and you'll see a (somewhat hidden) column labeled "Incomplete Column". It defaults to "Error" which is what is causing you grief. If it's not required to have data in that field, change it to "Replace" or "Retain". Check the online help for a description of all of the choices available there.

-craig


Well Craig, that certainly sounds easier.. thanks, I'll try that too. Sorry if my earlier reply confused anyone.

Dan Marshall
Alberta Learning
Edmonton, AB
Post Reply