Probably very simple answer

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
bangorlad@hotmail.com
Participant
Posts: 12
Joined: Wed Oct 05, 2005 1:44 am

Probably very simple answer

Post by bangorlad@hotmail.com »

hi,
I'm sure there is a very simple answer to this but I am going to ask anyway.

I have a comma delimited file which has five fields per line. However, on some lines several fields can be missing (even the commas) and the job won't run.

This is what the job log tells me,

'A2000_PopulatePCMTable..PCM_csv.L01: read_delimited() - row 1, column vchrPCM3, required column missing'

How can you get round this? I thought the 'Missing columns action' would circumvent this problem but it doesn't.
ArndW
Participant
Posts: 16318
Joined: Tue Nov 16, 2004 9:08 am
Location: Germany
Contact:

Post by ArndW »

The missing columns setting will solve this, but you need to start at the last column and work your way back until you get to a column which cannot be missing. Also, are you telling it to ignore errors or drop rows?
WoMaWil
Participant
Posts: 482
Joined: Thu Mar 13, 2003 7:17 am
Location: Amsterdam

Post by WoMaWil »

I personal think, that there are (without knowing the file) no simple answers.

you can read the whole row (or the whole part) in one field and use the field-function to get fields out.

you can tell the sender to use fix-length.

Is perhaps excel the source?

Wolfgang
bangorlad@hotmail.com
Participant
Posts: 12
Joined: Wed Oct 05, 2005 1:44 am

Post by bangorlad@hotmail.com »

Thanks, I will try some of those and get back to you.
roy
Participant
Posts: 2598
Joined: Wed Jul 30, 2003 2:05 am
Location: Israel

Post by roy »

Hi,
Having empty or missing fields is one thing (that you can handle)
But having missing delimiters even makes this impossible to handle automatically (since ther is no way to say I'm missing column number n, you can only say I'm missing a column or columns) and may force you to reject those rows for manual handling.

IHTH,
Roy R.
Time is money but when you don't have money time is all you can afford.

Search before posting:)

Join the DataStagers team effort at:
http://www.worldcommunitygrid.org
Image
ameyvaidya
Charter Member
Charter Member
Posts: 166
Joined: Wed Mar 16, 2005 6:52 am
Location: Mumbai, India

Post by ameyvaidya »

In the Sequential file Stage's Columns tab, look for a column named "Incomplete Column"(Near the end just before Description). The default value for this column for all rows is "Error".

If this value is changed to "Replace" for all column defn. entries, the stage will replace all missing or incomplete rows in the sequential file with NULL's. and this has been tested to work for missing delimiters too.

No error or warning message will be posted.

IHTH
Amey Vaidya<i>
I am rarely happier than when spending an entire day programming my computer to perform automatically a task that it would otherwise take me a good ten seconds to do by hand.</i>
<i>- Douglas Adams</i>
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

:idea:
You will probably need to scroll the Columns grid to the right to find the Missing Columns rule.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Post Reply