Has anyone come across this problem?
I have created a simple buildop which looks for one character in another a string as a learning exercise. "1" is output when it finds the character and "0" when it doesn't, eg. 1 in 1234 gives "1"; 1 in 2345 gives "0".
The buildop compiles fine.
The source for the job is a simple text file, in to the buildop stage and out to another text file. Only the "1" or "0" is output, or should be.
The job compiles and runs fine, 4 records input but nothing output.
I dropped the two input columns from the output because the produced the warning message about columns with the same name.
The meta data in the repository is correct.
I have tried various setting with the auto read and write on Input/Output/Transfer tabs but nething makes any difference.
Any help would be appreaciated, here's the code in case it helps:
Definitions:
#define INPUT 0
#define OUTPUT 0
#include <string>
using namespace std;
size_t LenFld2 = 0;
APT_Int32 FoundPM = 0;
APT_Int32 int Loop = 1;
int Answer = 0;
Per Record:
LenFld2 = InRec.Field002.length();
FoundPM = 0;
Loop = 1;
while (Loop <= LenFld2)
{
if (InRec.Field002.substring(Loop,1) == InRec.Field001)
{
FoundPM = 1;
break;
}
else
Loop++;
}
OutRec.Answer = FoundPM;
writeRecord(OUTPUT)
Buildop not outputting any rows
Moderators: chulett, rschirm, roy
Buildop not outputting any rows
Bob Oxtoby
Re: Buildop not outputting any rows
Can you please try :
instead of WriteRecord. The auto write and transfer settings should be false.
Also, mention the transfer settings you have chosen for this one.
Code: Select all
transferAndWriteRecord(0)
Also, mention the transfer settings you have chosen for this one.
It took me fifteen years to discover I had no talent for ETL, but I couldn't give it up because by that time I was too famous.