Page 1 of 1

problem with Concatenating files

Posted: Wed Aug 06, 2008 1:03 pm
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.

Posted: Wed Aug 06, 2008 2:44 pm
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?

Posted: Wed Aug 06, 2008 3:23 pm
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.

Posted: Wed Aug 06, 2008 3:28 pm
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.