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

Post questions here relative to DataStage Enterprise/PX Edition for such areas as Parallel job design, Parallel datasets, BuildOps, Wrappers, etc.

Moderators: chulett, rschirm, roy

Post Reply
deesh
Participant
Posts: 193
Joined: Mon Oct 08, 2007 2:57 am

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

Post 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
jwiles
Premium Member
Premium Member
Posts: 1274
Joined: Sun Nov 14, 2004 8:50 pm
Contact:

Post 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,
- james wiles


All generalizations are false, including this one - Mark Twain.
deesh
Participant
Posts: 193
Joined: Mon Oct 08, 2007 2:57 am

Post 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.
jwiles
Premium Member
Premium Member
Posts: 1274
Joined: Sun Nov 14, 2004 8:50 pm
Contact:

Post 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,
- james wiles


All generalizations are false, including this one - Mark Twain.
Post Reply