problem with Concatenating files

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
RAJEEV KATTA
Participant
Posts: 103
Joined: Wed Jul 06, 2005 12:29 am

problem with Concatenating files

Post by RAJEEV KATTA »

When I try to Concatenate two files using cat command.
cat a b > c where a is an ascii file and b is an unicode file with spanish characters.If the b file has less data output file "c" is getting created but if the b file has huge data then output file "c" is not getting created properly by not writing the spanish characters properly into the output file.I am using the cat command in after subroutine in the job.What would be the workaround or solution for it as the DataStage installation I have is non-nls installation.
bcarlson
Premium Member
Premium Member
Posts: 772
Joined: Fri Oct 01, 2004 3:06 pm
Location: Minnesota

Post by bcarlson »

Why are you concatenating files of different types? That would be like concatenating an ASCII file and an EBCDIC file. What is the purpose? Shouldn't they be treated separately?
It is not that I am addicted to coffee, it's just that I need it to survive.
RAJEEV KATTA
Participant
Posts: 103
Joined: Wed Jul 06, 2005 12:29 am

Post by RAJEEV KATTA »

There is a business requirement where in I need to do that.I tried one more option like using iconv in execute command to first convert ascii files to unicode and the concatenate them but it throws an error that it can't open the iconv converter.
bcarlson
Premium Member
Premium Member
Posts: 772
Joined: Fri Oct 01, 2004 3:06 pm
Location: Minnesota

Post by bcarlson »

I haven't done this before, but I am guessing it is the mix of ASCII and Unicode that is throwing it off.

Does anyone know if the Unix 'dd' command can convert to Unicode?

You may want to post your errors with iconv. Maybe someone else has seen that error before and can help. Getting the file types to match seems like the right path to follow, whether in DS or Unix.

Brad.
It is not that I am addicted to coffee, it's just that I need it to survive.
Post Reply