I am building a job that requires the use of a C++ routine (client request).
The C++ code is very simple, but it aborts with:
1)"Transformer_5,0: /bin/echo: write error: Broken pipe"
2)"Transformer_5,0: Operator terminated abnormally: received signal SIGSEGV"
It runs fine when only passing it 100 rows, but when I pass it more than 100 rows it aborts every time.
The C++ routines code is as follows:
-----------------------------------------------------------------------------
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include <ctype.h>
char outString[255];
char * dateHyphen(char *inString)
{
strcpy(outString, "");
if ( strlen(inString) < 8 ) {
strcpy(outString, inString);
} else {
strncpy(outString, inString, 4);
strcat(outString, "-");
strncat(outString, inString+4, 2);
strcat(outString, "-");
strncat(outString, inString+6, 2);
}
strcat(outString, "");
return outString;
}
---------------------------------------------------------------------------
I've searched DSXchange and consulted with other developers; but no resolution could be found.
Any help would be appreciated.
Thanks
![Smile :-)](./images/smilies/icon_smile.gif)