#!/usr/bin/perl
use File::Copy cp;
use Net::FTP;
@serverlist =qw{tsmpa1 tsmte1 tsmdb1 tsmob1 tsmob2 tsmbk1};
$today=(`/bin/date +"%m%d%Y"`);
chomp($today);
$logfile="/home/johnsre/actlog_$today";
print "today is $today\n";
if ( -e $logfile) {
unlink $logfile;
} #end if
open(OUTFILE, "+>>", "$logfile" ) or
die "open of $logfile failed:$!";
foreach $sname (@serverlist) {
print "sname=$sname\n";
cp("/opt/tivoli/tsm/server/$sname/dsmaccnt.log",
\*OUTFILE);
} #end foreach
close(OUTFILE);
$ftp = Net::FTP->new("mainframe.xx.com", Debug =>1)
or die "Cannot connet to teleplex.ml.com: $@";
$ftp->login("id", password)
or die "Cannot login", $ftp->message;
$ftp->ascii;
$ftp->put($logfile ,"SM.SCS.ADSM.LINUX.ACCTLOG(+1)" )
or die "put of $logfile failed ", $ftp->message;
$ftp->quit;
--------------------------------------------------------
This message w/attachments (message) may be privileged, confidential or proprietary, and if you are not an intended recipient, please notify the sender, do not use or share it and delete it. Unless specifically indicated, this message is not an offer to sell or a solicitation of any investment products or other financial product or service, an official confirmation of any transaction, or an official statement of Merrill Lynch. Subject to applicable law, Merrill Lynch may monitor, review and retain e-communications (EC) traveling through its networks/systems. The laws of the country of each sender/recipient may impact the handling of EC, and EC may be archived, supervised and produced in countries other than the country in which you are located. This message cannot be guaranteed to be secure or error-free. This message is subject to terms available at the following link: http://www.ml.com/e-communications_terms/. By messaging with Merrill Lynch you consent to the foregoing.
--------------------------------------------------------
All I can think of is that the file name is not legal on the
mainframe. Though the message looks a bit strange for that. Could you
try to uploadthe file with some simpler shorter name?
If that doesn't help, ask the mainframe admins and/or come back and
tell us what kind of mainframe it is. (No, it will not be of any use
to me, but maybe there's someone around here who does have some
experience with those mainframes.)
Jenda
===== Je...@Krynicky.cz === http://Jenda.Krynicky.cz =====
When it comes to wine, women and song, wizards are allowed
to get drunk and croon as much as they like.
-- Terry Pratchett in Sourcery
At least with the IBM mainframes I have worked with in the past the
GDG automatically incremented when you wrote to them from an ftp. Try
it without the (+1).
Is your gdg base properly defined?
Have you set the site command to specify the correct line lengths?
--
Ken Foskey
FOSS developer