Page 1 of 1

doesn't required column in file output, when no data in colu

Posted: Thu Jul 04, 2013 3:59 am
by deesh
Hi,

I am getting file and it contain 3 columns, but in my sequencial file output page having 4 columns.

now the 4th column doesn't have the data, so i don't required the column in the file output, i required only 3 fileds.

is there any option in datastage if the column not getting data, suppose to compress in sequential file output.

Please help me in this scenario

Posted: Thu Jul 04, 2013 7:45 am
by jwiles
You have to make a choice: You will either need to remove the 4th output column from your output definition or populate the column with default data if you need to keep the column defined in the output.

What drives the choice: What is required by the downstream process that receives your output file?

Regards,

Posted: Thu Jul 04, 2013 8:00 am
by deesh
Is there any possibility, even not getting data, keep the 4th output column in output definition and remove the 4th output column in output file.

Posted: Thu Jul 04, 2013 10:58 am
by jwiles
Yes, either through the filter option in the sequential file (calling awk or sed or cut commands) or by running an external command against your file after it's been written. Either way, if you leave the 4th column defined in your output you will need to supply some sort of data for it, even if it's an empty string.

You could do as is suggested in this thread and build your output as a single string with however many columns you need.

Regards,