From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of
Mariusz Stakowski
Sent: 11 December 2007 10:37
To: [email protected]
Subject: Net::FTP problem ?

>                                 Hello, 
> 
>         I've just reinstalled Active Perl ony my Windows machine. But
I have a problem wth sending jobs from 
> Windows to IBM Mainframe. 
> Here is a simple program sending JCL to mainframe: 
> 
> #!/usr/bin/perl -w 

You are missing 'use strict;'. You should pretty much always include it.

> use Net::FTP; 
> my $zbior = $ARGV[0]; 
> use constant HOST => '172.28.0.65'; 
> my $ftp = Net::FTP->new(HOST) or die "No connection: [EMAIL PROTECTED]"; 
> $ftp->login('TSOID','PSSWD')or die $ftp->message; 
> $ftp->site('FILE=JES') or die $ftp->message; 
> $ftp->put($zbior)or die $ftp->message; 
> $ftp->quit; 
> 
> Here is what it should send to mainframe: 
> 
> //PROK3202  JOB PROKOMAA,PROK00,NOTIFY=&SYSUID, 
> //   CLASS=I,MSGCLASS=X,MSGLEVEL=(1,1)         
> //HOLD OUTPUT JESDS=ALL,DEFAULT=Y,OUTDISP=(HOLD,HOLD) 
> //STEP1   EXEC PGM=IEBGENER 
> //SYSPRINT DD SYSOUT=* 
> //SYSUT2 DD SYSOUT=* 
> //SYSUT1 DD DISP=SHR,DSN=PROK32.PRIVATE.CLIST(ADDPDS) 
> //SYSIN DD DUMMY 
> 
> And here is what maiframe receives: 
> 
> //PROK3202  JOB PROKOMAA,PROK00,NOTIFY=&SYSUID           
> //   CLASS=I,MSGCLASS=X,MSGLEVEL=(1,1)                   
> //HOLD OUTPUT JESDS=ALL,DEFAULT=Y,OUTDISP=(HOLD,HOLD     
> //STEP1   EXEC PGM=IEBGENE                               
> //SYSPRINT DD SYSOUT=                                     
> //SYSUT2 DD SYSOUT=                                       
> //SYSUT1 DD DISP=SHR,DSN=PROK32.PRIVATE.CLIST(ADDPDS     
> //SYSIN DD DUMM                                           
> 
> 
> As you can see, the last character of every line is cut off. 

Sounds like a line ending issue. I would suggest using binary mode, but,
IIRC, IBM mainframes may still be using EBCDIC (its been a very long
time) so that wouldn't help.

What happens when you transfer the file from the command line?

Check the line endings of the file you are sending. They should match
the convention for the platform from which you are sending, i.e carriage
return (0x0D) followed by line feed (0x0A) on win32. If the line endings
are different, e.g. only line feed as used by unix/linux, then that
could cause some confusion.

HTH

-- 
Brian Raven 

=========================================
Atos Euronext Market Solutions Disclaimer
=========================================

The information contained in this e-mail is confidential and solely for the 
intended addressee(s). Unauthorised reproduction, disclosure, modification, 
and/or distribution of this email may be unlawful.
If you have received this email in error, please notify the sender immediately 
and delete it from your system. The views expressed in this message do not 
necessarily reflect those of Atos Euronext Market Solutions.

Atos Euronext Market Solutions Limited - Registered in England & Wales with 
registration no. 3962327.  Registered office address at 25 Bank Street London 
E14 5NQ United Kingdom. 
Atos Euronext Market Solutions SAS - Registered in France with registration no. 
425 100 294.  Registered office address at 6/8 Boulevard Haussmann 75009 Paris 
France.

L'information contenue dans cet e-mail est confidentielle et uniquement 
destinee a la (aux) personnes a laquelle (auxquelle(s)) elle est adressee. 
Toute copie, publication ou diffusion de cet email est interdite. Si cet e-mail 
vous parvient par erreur, nous vous prions de bien vouloir prevenir 
l'expediteur immediatement et d'effacer le e-mail et annexes jointes de votre 
systeme. Le contenu de ce message electronique ne represente pas necessairement 
la position ou le point de vue d'Atos Euronext Market Solutions.
Atos Euronext Market Solutions Limited Société de droit anglais, enregistrée au 
Royaume Uni sous le numéro 3962327, dont le siège social se situe 25 Bank 
Street E14 5NQ Londres Royaume Uni.

Atos Euronext Market Solutions SAS, société par actions simplifiée, enregistré 
au registre dui commerce et des sociétés sous le numéro 425 100 294 RCS Paris 
et dont le siège social se situe 6/8 Boulevard Haussmann 75009 Paris France.
=========================================

_______________________________________________
ActivePerl mailing list
[email protected]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs

Reply via email to