The problem comes from the way the input and output files are set. Instead of doing this
# Initialize variables
$fileIN = "";
$fileOUT = "";
# For use with Watch
#$fileIN = $Watch->GetJobFileName();
# For use with Watch
#$fileOUT = $Watch->GetJobFileName();
#### Copy Watch temp file to Temp directory for processing
copy $fileIN, "C:\\tempFolder\\StatementTemp.txt";
#### Read temp input file
open(IN, "C:\\tempFolder\\StatementTemp.txt" || die "Something is wrong opening Data File");
#### Open FH, watch temp file, for writing
open(OUT, ">$fileOUT" || die "Something is wrong opening Data File");
you should do this :
# Initialize variables
$fileIN = "C:\\tempFolder\\StatementTemp.txt";
$fileOUT = "";
#### Copy Watch temp file to Temp directory for processing
# For use with Watch
copy $Watch->GetJobFileName(), $fileIN;
#### Read temp input file
open(IN, $fileIN || die "Something is wrong opening Data File");
# For use with Watch
$fileOUT = $Watch->GetJobFileName();
#### Open FH, watch temp file, for writing
open(OUT, ">$fileOUT" || die "Something is wrong opening Data File");
Thanks.
Pierre P