($weg, $weg, $weg, $today_day, $today_month, $today_year) =localtime; $today_month++; if ($today_day < 10) {$today_day="0"."$today_day"}; if ($today_month < 10) {$today_month="0"."$today_month"}; if ($today_year >= 100) {$today_year=$today_year-100;$century=20}; if ($today_year < 10) {$today_year="0"."$today_year"}; $filename = $today_day.$today_month.'_'; $outfile =$input_directory."payment.txt"; opendir (DIR,$input_directory); @allfiles = readdir(DIR); closedir(DIR); $filecounter = 0; open(OUTFILE, ">".$outfile); foreach $file (@allfiles) { if($file =~ /$filename/) {print "$file\n"; $filecounter++; open(IN,"<".$input_directory.$file); while (@values = ) { print OUTFILE @values; } } } print "A Total of $filecounter bis payment files found in $input_directory\n"; exit 1 if ($filecounter eq 0); close(OUTFILE); make_bis(); }#end of init_proc sub make_xml_sepa { $open_filename = $input_directory."bisfile.txt"; while (!open(IN, $open_filename) && $open_filename ne "q" && $open_filename ne "Q") { print "File ",$open_filename," not found.\n"; print "Please enter alternative filename (q quits): "; $open_filename=; chop ($open_filename); print "\n"; }; exit if ($open_filename eq "q" || $open_filename eq "Q"); open(IN, $open_filename); #Make output filename $output_filename = $output_directory."BIS_".$today_year.$today_month.$today_day.sprintf("%2.2d",$nummer).".txt"; $record_number++; $totalaccountno = $own_account_no + $holder_acc_no; # total account number $amount_running =$amount; # total amount if ($record_number > 100) { print "Warning: not all payments could be processed, since\n"; print " there are not sufficient file names available.\n"; } $output_filename = ">".$output_directory."BIS_".$today_year.$today_month.$today_day; $output_filename = $output_filename.sprintf("%2.2d",$nummer+$record_number); $output_filename = $output_filename.".txt"; open (OUT,$output_filename); PAYMENT: while ($_ = ) { #main loop #capitalize everything! ( $cstcntr, $bankacct, $value_date, $dealcode, $amount, $linkcode, $flowtype) = split(/$list_seperator/, $_); last if ($bankacct eq "" || $amount eq "");