FTP STUFF

A great article
from TNT400.com captioned Uploading a file to the AS/400 using FTP

I had a file on my C Drive. XYZ and I wanted to upload it to the AS400.  I also wanted a batch program to do it for me when I clicked on it.

1st.  I created with notepad c:/ftpcmds.fil.

     In it was:
         as400usr  (AS/400 USER ID)
         password
(Password)
         put xyz
(or what ever FTP command(s) you want.  This just writes a file to the 400.)
         quit
(ends FTP session)

2nd, I created ftpit.bat

      In it was:

            FTP -s:c:/myprog~1/ftpcmds/ftpcmd1.fil sysnam
                                
^                                         ^
                                  "                                         "

                         
Path on C: Drive                       System Name

3rd, I wanted to be able to have the AS/400 run the PC Command
  From an AS/400 Command Line
    Key in
                STRPCO PCTA(*NO)
                STRPCCMD   PCCMD('c:\windows\desktop\ftpit.bat')

Here is a cool FTP Command to have.  QUOTE RCMD xxxxxx xxxxx

i.e. QUOTE RCMD SNDMSG MSG('This was sent from an FTP session') TOUSR(AS400USR)

Ah yes, even a CALL or SBMJOB can be done.  Although the User Profile being connected has to have command line authority.

To the all and powerfull Tech Support people out there.  Be Aware.  If an ID is set up for FTP please protect yourself from this.


Here is a great link for FTP Documentation