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



Jonathan gave you a good example - maybe a couple thoughts to keep in mind:

1. FTP is very basic stuff - it knows nothing about file field layouts in PFs, e.g. There are some special extensions on iSeries to work with SAVFs, but that does not look like what you are doing.

2. If the target PF does not exist, it will be created as a single-field PF with the same record length.

3. Packed fields are an adventure - if you use binary transfer, you might be ok to another iSeries, but if you are coming from a non-iSeries, it does not work - remember, FTP knows nothing about data types and all that.

4. To play with it you can FTP to yourself - execute

ftp loopback

and it'll prompt you for your iSeries user, then password - assuming you have run STRTCPSVR *FTP first.

Enter a ? or the word help to get a list of the available subcommands. The ? gives you a higher level starting point - I just tried entering h - you only need to enter enough to be a unique subcommand - and it shows you all the client subcommands. Look at the put subcommand - if you roll down you will come to a "Using FTP" link - this is a great place to get info you want. Inside there is a link to running FTP in batch, as Jonathan said.

Some of interest include

dir - directory, just like DOS
pwd - present working directory, current directory
put & get - sending and receiving, resp.

Finding out what happened is not one of FTP's strengths - the responses you get in an interactive session go into vapor unless you override as Jonathan pointed out. And then you need to read the log file to find error codes. Also, FTP scripts will try to run everything, even if there is a fatal failure early on. This makes Scott's API very nice - the FTP session is kept live between calls to the API and you have error response at every step along the way.

I've put some responses inline below.

HTH
Vern

At 12:23 AM 8/18/2006, you wrote:

Suggesting some other way to transmit data is not an option.  I use several
other ways, my favorite being 400 report via VPN/400 to Ops Nav to text
file to e-mail.  I have a mandate I need to rapidly comply with.

My business needs to regularly (at least weekly) send a work file to an
AS/400 at another enterprise.  To make this work, what all info will I need
from the other site?  I thinking
* Their AS/400 system "name" or TCIP "name" or other "name"?
* Their Internet ###.###.###.### whatever
* Some port # that works for both them and us
* Will we need sign-on / password equivalent info?
* layout of data they need from us
* library name of target AS/400 which is to get our file

-Their IP address or DNS name known to your client (the "us") iSeries.
-Port is pre-defined
-Needs iSeries user/password unless special handling for anonymous login - not likely
-No layout - FTP is ignorant of such things
-but will want to make the transfer be binary or ebcdic mode - those are the commands, BTW -library needed - either in a cd (change directory) subcommand or to qualify the files

I not want to be asking for something, get it & try some FTP stumbling,
find out need something else, ask for more, loop repeats ... what all will
I need to get this to work?  We are AS/400 model 170 V5R1.

-FTP server must be running on the target machine

After I create a physical file with the layout of data desired by the other
place, what other object does it need to be converted to, such as a *TBL or
*SAVF, and how do I do that?  I not asking what THEY need, but what FTP needs.

-Nothing else needed - transfers go direct between PFs
-PF will be created if it does not exist but with single field
-Non-PFs can be transferred using SAVFs - see the docs or look up FTP and SAVF in the archives

Can someone point me at IBM manual url with sample CL whatever command
lines to get this to work?  I want to put whatever into a CL program onto a
menu, so a person can just take a menu option and not have to be prompted
for anything.
What needs to go in various parameters of various command strings?

We have the complete CL manual collection, detailing all the CL commands
(as of some V3).  Is this FTP stuff in there, or some other set of
manuals?  I could not find it in the Programmer's Reference
Handbook.  Possibly I was not looking in the right place.

Most of what you need turns out to be in the help text when you are in a client session, as I mentioned above. Otherwise, in your manuals look for the TCP/IP Reference - there is a chapter in the earlier ones on FTP specifically. Or go to InfoCenter under Networking, then under TCP/IP applications, where there is a specific short manual available for FTP.

Does FTP have to be running in coordination at both ends to work, or can
any AS/400 connected to Internet do FTP to any other AS/400 if they know
system name & Internet ###.etc. address?

Remote system needs to have an FTP server running - this includes DOS or Windows or Unix or mainframe - then you only need IP address - FTP is a TCP/IP app, not an iSeries app, so it knows nothing about system names

Does some DSPLOG entry show up on a system that has been FTP contacted "Hey
guys, we had an FTP visitor, and what they did was ..."
I got nervous when I saw that someone can connect via FTP then use that
connection to delete files.

No logging unless you set up some special stuff - on the server on iSeries you can have registry exits to process things and handle FTP security, but this is not part of this mandate. As a client, you need to redirect (override) the output to a file, then, as outlined above, read it somehow. You will get no escape message for failed transfer - FTP did what it is supposed to do.

Buying some manual is probably not an option.  Eating a ream of paper,
printing out some of this stuff to study over the weekend is a distinct
possibility.

Help text when you type ftp loopback and login is a great start. Infocenter is next, as outlined above.

My boss wants this implemented up & running like next week.

This is really a piece of cake - much simpler than you might want, even.

-
Al Macintyre


As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:
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.