I'm trying to take new ADB and CAS records from the adb and cas tables and write them to a file so that these files get FTPed to the appropriate location,

But it gives me this error message / FTP error.CAS file ". &cas_GetFilename. "not FTPed: Please any suggestion as to fixing this error will be greatly appreciated. See script below!

#Revisions: # # use strict; use NET::SMTP; use Net::FTP; use DBI; use Date::Manip; $ENV{'TZ'} = "EDT"; require "../reformat"; #initialization my $datewritten = UnixDate('today','%m/%d/%Y %H:%M'); my $g_datasource; my (%coninf); &readInfo; my $g_testing=0; if( (scalar @ARGV > 0 and $ARGV[0] eq "test") or not defined $coninf{n +ihits}{dsn} or $coninf{nihits}{dsn} =~ /TEST/i ){ $g_testing=1; } my $today = UnixDate("today","%y%m%d"); open(HI,">>fintrans$today.txt") or &handle_it("Could not open fintrans +$today.txt"); if( $g_testing == 1 ){ print "Testing mode is ON\n"; print HI "Testing mode is ON\n"; } $g_datasource = 'DBI:ODBC:'. $coninf{nihits}{dsn}; my $g_login = $coninf{nihits}{uid}; my $g_pwd = $coninf{nihits}{pwd}; my ($dbh,$sth,$casfile,$adbfile,$records,%ic_conv,$ret); my $g_existingfile = 'casnihit'; #DB connect $dbh = DBI->connect($g_datasource, $g_login, $g_pwd) or &handle_it("Co +uld not connect to the DB"); $dbh->{AutoCommit} = 0; print "Connecting to DSN ", $coninf{nihits}{dsn}, "\n"; print HI "Connecting to DSN ", $coninf{nihits}{dsn}, "\n"; my $fulldate = UnixDate("today", "%m/%d/%Y %H:%M"); print "\nProcess started at $fulldate\n"; print HI "\nProcess started at $fulldate\n"; #if today is a holiday, exit the process my $hol = &is_today_a_holiday; if( $hol ){ print HI "Today is a holiday: $hol\n"; print "Today is a holiday: $hol\n"; exit; } #create the IC convert hash &create_ic_conv; ### process ADB records ### $records = 0; $ret = "\n". &adb_Create; my $error; $error = 0; &do_ftp( 'adb', \$error ) if( not $g_testing and $records > 0 ); print $ret; print HI $ret; if( $error == 1 ){ my $txt = "FTP error. ADB file ". &adb_GetFilename. " not FTPed. T +he ADB records will not be processed.\n"; print $txt; print HI $txt; &send_mail("ADB/CAS FTP Error", $txt); close HI; $dbh->disconnect; exit; } ### process CAS records ### $records = 0; $ret = "\n". &cas_Create; &do_ftp( 'cas', \$error ) if( not $g_testing and $records > 0 ); print $ret; print HI $ret; if( $error == 1 ){ my $txt = "FTP error. CAS file ". &cas_GetFilename. " not FTPed.\n +"; print $txt; print HI $txt; &send_mail("ADB/CAS FTP Error", $txt); close HI; $dbh->disconnect; exit; } ...

In reply to ADB/CAS FTP Error by MASHIKOO

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.