× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



Hi Jerry,

Can you run your script in debug mode so we can see the actual FTP protocol exchange? Can you also post a log that includes the error messages (while in debug mode)?

The tricky part is that you have to use the'DEBUG' subcommand to enter debug mode. And FTP scripts typically want you to log in before you can enter subcommands... so you have to do something funny.

What I did to make it work is to try to connect to a host that I know doesn't exist. For example:

FTP RMTSYS('127.0.0.1') PORT(1)

Since I know port 1 on my system is not in use, I know the initial FTP connection will fail. Then I wrote the following script.

debug 1
open ftp.example.com
user klemscot
pass bigboy
ASCII
PUT ***ESTF/***CUST CUSTMASTER.TXT
quit

the 'debug 1' line turns on debugging in the FTP client. The 'open' command initiates a connection to a server -- since my first connection (the one to 127.0.0.1) failed, I can use the 'open' command to connect to the RIGHT server, and since it comes after the 'debug 1' command, I'll be able to see the FTP exchange.

The 'user' and 'pass' commands send the userid and password, of course. then the ASCII & PUT are your commands, followed by the quit to exit.

Due to the problems you've reported, I don't expect this script to succeed... but what I do expect is that you'll get a log that has the FTP commands in it, which might (knock on wood) tell us more about what's going on.


Silverstein, Jerry (S&FS) wrote:
Thanks for the advice. Per below I have tried as many combinations as I
could think of. The first one is the generic version one I have not any
problems with until now.

GLOBAL\64BitWF Abcd123$
USER GLOBAL\64BitWF PASS Abcd123$
GLOBAL\64BitWF Abcd123$ USER GLOBAL\64BitWF Abcd123$
GLOBAL\64BitWF Abcd123$ USER GLOBAL\64BitWF Abcd123$
PASS Abcd123$
USER GLOBAL\64BitWF PASS Abcd123$
GLOBAL\64BitWF Abcd123$ PASS Abcd123$
-----Original Message-----
From: midrange-l-bounces@xxxxxxxxxxxx
[mailto:midrange-l-bounces@xxxxxxxxxxxx] On Behalf Of Billy Rowe
Sent: Monday, November 05, 2007 7:04 PM
To: Midrange Systems Technical Discussion
Subject: Re: Problem running an FTP batch script

Jerry,

In additon try sending the userid/password with just 1 blank space
between
them.
Example of 1st line in FTP script:

userid password

This has always worked for me ftping between iSeries, Unix, Win
boxes.

hth
---------------------------------------------------------------

Jerry,

You might have to play around a bit. Try some variations:

1 - Try using USER subcommand:

USER LOGINA\LOGINB A*****$
ASCII PUT ***ESTF/***CUST CUSTMASTER.TXT QUIT
2 - Try user and pass subcommands:

USER LOGINA\LOGINB
PASS A*****$ ASCII PUT ***ESTF/***CUST CUSTMASTER.TXT QUIT
3 - Try letting it bomb on the first try, then issue user subcommand:

LOGINA\LOGINB A*****$
USER LOGINA\LOGINB A*****$ ASCII PUT ***ESTF/***CUST CUSTMASTER.TXT QUIT
Just some ideas I would try.

-Marty
------------------------------
message: 3
date: Mon, 5 Nov 2007 14:26:16 -0500
from: "Silverstein, Jerry \(S&FS\)" <Jerry.Silverstein@xxxxxxxxxxxxx>
subject:
...
2. Script sample - we are failing on the initial Login/Password line. I
also tried a script with the Login & Password on separate lines to
mimic
the way the interactive process is run.

LOGINA\LOGINB A*****$ ASCII PUT ***ESTF/***CUST CUSTMASTER.TXT QUIT


As an Amazon Associate we earn from qualifying purchases.

This thread ...

Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.