Ftp Error You Must First Issue The User Subcommand
? Ask a question, help others, and get answers from the community Discussions Start a thread and discuss today's topics with top experts Blogs Read the latest tech blogs written by experienced community members Automate transferring data from the iSeries DebraTart pts. Tags: Thanks! We'll email youwhen relevant content isadded and updated. Following Follow Application development Rick wrote in with this question recently: "I am trying to automate transferring data from the iSeries to a PC server using FTP. I have built the CL's, the RPG ILE program and the test file. Everything looks good except that when I execute the CL and the program gets to the FTP portion I receive a message, 'You must first issue the User sub command.' I have researched this and have been unable to determine where my file differs from the posted ones. Can anyone give me pointers?" File Layout ======= FTP 192.168.66.99 USER FTPUser PASS FRED999 PUT WEBAPP/QRYARMST QRYARMST.TXT QUIT ====================== -- Deb Tart, associate editor Asked: February 22, 20064:16 PM Last updated: February 23, 200610:13 AM Related Questions Is an FTP finished? FTP Server on iSeries Moving FTP to FTPS on iSeries Alternative to FTP for file transfer to iSeries (AS/400) In cpyfrmstmf, can a wildcard be used in the path? I thought I could use * or?. Answer Wiki Last updated: February 23, 20067:18 AM GMT Fabrics0 pts. History Contributors Ordered by most recent Fabrics0 pts. Thanks. We'll let you know when a new response is added. We ftp files in batch on a regular basis. We do it through the use of source files to get the actual commands to run. I am attaching the CL and the source file we use to do this as an example. PGM OVRDBF FILE(INPUT) TOFILE(FABRICLIB/QTXTSRC) + MBR(MAHINPUT) OVRDBF FILE(OUTPUT) TOFILE(FABRICLIB/QTXTSRC) + MBR(MAHOUTPUT) FTP RMTSYS(FTP.INTFABGRP.COM) /* SEND FILES TO + THE FTP SERVER */ The input source file contains the following as400 as400 cd /maharam PUT FABGPL/MAHRECVP MAHRECVP.TXT quit The top 2 lines are the user id and password. The output source file contains the ftp log so you can view any errors etc. Hope this helps. We ftp files in batch on a regular basis. We do it through the use of source files to get the actual commands to run. I am attaching the CL and the source file we use to do this as an example. PGM OVRDBF FILE(INPUT) TOFILE(FABRICLIB/QTXTSRC) + MBR(MAH
Date: Mon, 12 Jun 2000 21:41:37 -0400 Thanks everyone for your suggestion. Everyone was right, I did not have any FTP "server", only client. (Thanks to IBM, there is an FTP server on the AS/400). I did get a copy of http://archive.midrange.com/midrange-l/200006/msg00467.html IPSwitch WS-FTP. I installed it immediately. I think I still need to "configure" it because I http://ps-2.kev009.com/tl/techlib/manuals/adoclib/cmds/aixcmds2/ftp.htm cannot yet FTP to the (static IP) Netfinity-NT server (from a regular PC nor from the AS/400). I will setup a job to automaticaly FTP to the NT server. booth@martinvt.com wrote: > This was my first thought too until I saw the message about the "@" sign > which leads me to the thought that it is looking for the anonymous logon > with an ftp error e-mail address, or something of that nature? > _______________________ > Booth Martin > > > Can you FTP from another PC to your PC (10.10.10.104)? I'd suggest your PC > does not have an FTP service running to receive the file. Depending on the > software and opsys of your PC, you may not have an FTP server running on > your desktop. > > Patrick > > > -----Original Message----- > > > > Am I missing something here? > ftp error you > > > From my PC, I can FTP files (GET) from the AS/400. It works like a > > charm! > > > > From the AS/400, I cannot connect using FTP to my PC. I can PING, no > > problem. But NO FTP connection! > > > > AS/400 address 10.10.10.1 > > NT Server address 10.10.10.3 > > My PC, 10.10.10.104 ((NT) DHCP lease) > > > > When I try (from an AS/400 session) to connect to my to my PC > > (10.10.10.104) using FTP, I get this message: > > "Connecting to remote host 10.10.10.104 using port 21" > > "Cannot connect to host 10.10.10.104 at address 10.10.10.104. Try again > > later". > > > > When I try (from an AS/400 session) to connect to connect to the NT > > Server (10.10.10.3), I get this conversation: > > "Connecting to remote host 10.10.10.3 using port 21." > > "220 InterScan FTP VirusWall NT 3.11: Stand-alone mode, Virur scan on" > > "Enter login ID (leo):" > > (( I enter "administrator" as login id )) and I receive the message: > > "421 InterScan FTP VirusWall NT 3.11: FTP address missing '@' " > > "Enter an FTP subcommand." > > > > Every subcommand I enter after that point, I receive this message: > > "You must first issue the USER subcommand" > > > > I enter the sub
[ HostName [ Port ] ] Description The ftp command uses the File Transfer Protocol (FTP) to transfer files between the local host and a remote host or between two remote hosts. The FTP protocol allows data transfer between hosts that use dissimilar file systems. Although the protocol provides a high degree of flexibility in transferring data, it does not attempt to preserve file attributes (such as the protection mode or modification times of a file) that are specific to a particular file system. Moreover, the FTP protocol makes few assumptions about the overall structure of a file system and does not provide or allow such functions as recursively copying subdirectories. Note: If you are transferring files between systems and need to preserve file attributes or recursively copy subdirectories, use the rcp command. Issuing Subcommands At the ftp> prompt, you can enter subcommands to perform tasks such as listing remote directories, changing the current local and remote directory, transferring multiple files in a single request, creating and removing directories, and escaping to the local shell to perform shell commands. See the Subcommands section for a description of each subcommand. If you execute the ftp command and do not specify the HostName parameter for a remote host, the ftp command immediately displays the ftp> prompt and waits for an ftp subcommand. To connect to a remote host, execute the open subcommand. When the ftp command connects to the remote host, the ftp command then prompts for the login name and password before displaying the ftp> prompt again. The ftp command is unsuccessful if no password is defined at the remote host for the login name. The ftp command interpreter, which handles all subcommands entered at the ftp> prompt, provides facilities that are not available with most file-transfer programs, such as: Handling file-name parameters to ftp subcommands Collecting a group of subcommands into a single subcommand macro Loading macros from a $HOME/.netrc file These facilities help simplify repetitive tasks and allow you to use the ftp command in unattended mode. The command interpreter handles file-name parameters according to the following rules: If a - (hyphen) is specified for the parameter, standard input (stdin) is used for read operations and standard ou