Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Ftp to GDG dataset

592 views
Skip to first unread message

Reginald Johnson

unread,
Oct 11, 2007, 3:36:25 PM10/11/07
to begi...@perl.org
I am trying to ftp files to GDG dataset on a mainframe. Whenever I try
this my put fails with
"failed Requested action not taken: GDG name conversion failed"


#!/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.
--------------------------------------------------------

Jenda Krynicky

unread,
Oct 11, 2007, 5:05:26 PM10/11/07
to begi...@perl.org
From: "Johnson, Reginald \(GTI\)" <reggie_...@ml.com>

> I am trying to ftp files to GDG dataset on a mainframe. Whenever I try
> this my put fails with
> "failed Requested action not taken: GDG name conversion failed"
>
>
> #!/usr/bin/perl
> use File::Copy cp;
> use Net::FTP;
> <snipped>

> $ftp->put($logfile ,"SM.SCS.ADSM.LINUX.ACCTLOG(+1)" )
> or die "put of $logfile failed ", $ftp->message;

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

Matthew Whipple

unread,
Oct 11, 2007, 2:48:59 PM10/11/07
to Johnson, Reginald (GTI), begi...@perl.org
Can you upload the file manually? If you can't then that's obviously
the problem. If you can then make sure that all of the settings are the
same in the Perl script (the pwd, port/passive, the exact base name &
suffix).

Chas. Owens

unread,
Oct 11, 2007, 5:45:57 PM10/11/07
to begi...@perl.org
On 10/11/07, Jenda Krynicky <Je...@krynicky.cz> wrote:
snip

> > $ftp->put($logfile ,"SM.SCS.ADSM.LINUX.ACCTLOG(+1)" )
> > or die "put of $logfile failed ", $ftp->message;
>
> 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?
snip

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).

Ken Foskey

unread,
Oct 11, 2007, 10:28:08 PM10/11/07
to begi...@perl.org

On Thu, 2007-10-11 at 23:05 +0200, Jenda Krynicky wrote:
> From: "Johnson, Reginald \(GTI\)" <reggie_...@ml.com>
> > I am trying to ftp files to GDG dataset on a mainframe. Whenever I try
> > this my put fails with
> > "failed Requested action not taken: GDG name conversion failed"
> >
> >
> > #!/usr/bin/perl
> > use File::Copy cp;
> > use Net::FTP;
> > <snipped>
> > $ftp->put($logfile ,"SM.SCS.ADSM.LINUX.ACCTLOG(+1)" )
> > or die "put of $logfile failed ", $ftp->message;
>
> 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.)

Is your gdg base properly defined?

Have you set the site command to specify the correct line lengths?

--
Ken Foskey
FOSS developer

0 new messages