Smart questions
Smart answers
Smart people
INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Member Login




Remember Me
Forgot Password?
Join Us!

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips now!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

Join Tek-Tips
*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Donate Today!

Do you enjoy these
technical forums?
Donate Today! Click Here

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.
Jobs from Indeed

Link To This Forum!

Partner Button
Add Stickiness To Your Site By Linking To This Professionally Managed Technical Forum.
Just copy and paste the
code below into your site.

softlad (Programmer)
27 Jan 03 13:41
Does anyone know how to use the AS/400 ftp put command to transfer a file from the AS/400 down to a PC file.

I can use ftp on the PC to PUT a file from a PC to the AS/400, and use the GET command to get a file from the AS/400 and save it to the PC.

The AS/400 PUT used is

put <libraryname>/<filename> c:\testfile

I keep getting an

227 Entering Passive Mode (10,44,99,45,19,86).
550 e:\testfile: Access is denied.            

even if I just type

put <libraryname>/<filename>

I get

227 Entering Passive Mode (10,44,99,45,19,87).
550 testfile: Access is denied.               

and I have full access to the library and file.

Any ideas, I'm going mad!

thank
iSeriesCodePoet (Programmer)
27 Jan 03 15:10
Have you tried QSYS.LIB/MYLIB.LIB/MYFILE.FILE?

iSeriesCodePoet
IBM iSeries (AS/400) Programmer

remsauk (MIS)
27 Jan 03 16:46
Hi...if you're getting a file from the AS/400 don't you want the GET command?...here's what I would do...a little extra keying but keeps things easier...
1. Open a DOS/Command Window
2. cd to the directory you want the file to go to on your PC
3. ftp your AS/400 and log on
4. cd to the library where your file is
5. key get and press <Enter>
6. Key the name of your file on the AS/400
7. At the Local file prompt key what you want to name it..if you want to name it a text file key filename.txt

It sounds like you don't have Client Access which has a send/transfer file piece.  Hope that helps
jaicee (IS/IT--Management)
23 Feb 03 23:44
Unless i'm missing something, if you don't have an FTP server on the PC you cannot put/get a file from an FTP session on the AS/400.  It would be the same as if you ended the FTP server on the 400 and then tried to transfer files from an FTP session on the PC to the 400.

Does that make sense?

I don't believe Client Access is required for this.

Joseph R. Cattano
IS/Tech Support
Goldman Associates of NY

charliehummel (MIS)
3 Mar 03 8:59
If you have operations navigator installed on PC ,, check the file shares under the file system. Sounds like you have a file share problem.

Try registering the user you sign on to ftp to Client access also.

The Net server function replaced the virtual drive when client access express was introduced. a lot of the old functions used in client access are no longer available.

check out client acess express redbook publications at IBM pubs also
junglejimv (Programmer)
5 Mar 03 22:29
The following information was obtained via the www.iseriesnetwork.com website.  The content of which was originated by Jay Oswal who is a business systems analyst at TotalFinaElf E&P USA, Inc., in Houston, Texas. You can e-mail him at jay.oswal@TotalFinaElf.com.

There is an accompanying chart of virtually all possible ftp commands to and from the AS/400. Unfortunately, being a spreadsheet it did not load well into this post and so I removed it. The information is valuable for anyone considering using ftp with an AS/400.

**********************************************************
Before you begin, consult your AS/400 security officer and network administrators to verify that the following requirements are satisfied:

The TCP/IP network is running.
The AS/400 TCP/IP interface and FTP server are running.
AS/400 names resolve to their respective IP addresses.
Communication between your desktop PC and AS/400 and between AS/400s is active.

You have sufficient authority to the AS/400 objects you want to use in FTP processes.

To transfer files between a PC and an AS/400, open an MS-DOS command interface window (select Start, choose Run, type command, click OK) and then enter the appropriate FTP commands.

To transfer files between two AS/400s, make sure you have LMTCPB (*NO) specified in your user profile, go to any OS/400 screen that presents a command line, and enter the appropriate FTP commands from the reference chart.

Before you begin any file transfer, you must establish a connection to the remote system. For file transfers between a PC and an AS/400, I use AS400 as the value for the remote system. For file transfers between two AS/400s, I use LCL400 as the local AS/400 and RMT400 as the remote AS/400.

Once you've established a connection, you'll be prompted to type your AS/400 user name and password.

The AS/400 will automatically choose the proper NAMEFMT for an FTP session based on the syntax of the first transfer command only. Therefore, you should always explicitly specify the NAMEFMT 0 for a native file system and NAMEFMT 1 for the integrated file system (IFS) before typing the actual transfer command.

Use GET and MGET commands to transfer files from a remote system to a local system (known as downloading). Use PUT and MPUT commands to transfer files from a local system to a remote system (known as uploading). You use GET and PUT to transfer single files and MGET and MPUT to transfer multiple files.

Notice in the FTP chart the "BIN"ary mode used for transferring physical file members (PFMBR). Binary mode is a bit-by-bit transfer of data without any conversion. Considering that AS/400 physical files are likely to contain packed fields and FTP can't unpack the packed fields, there's no point in transferring an AS/400 physical file to a PC except for transferring it back to the same or another AS/400. (For more information about converting AS/400 data types, see "Convert AS/400 Data for FTP," November 1997.)

You select a particular command set over another based on file type, purpose of the file transfer, and subsequent destination of the files. For example, suppose you want to download multiple members of a source physical file (SRCPF) from an AS/400 to a PC, edit the members on the PC, and then upload them back to AS/400. To do so, you should choose the command set that includes FTP command QUOTE SITE NAMEFMT 0 before the MGET command, as Set # 3 in the reference chart shows. Be sure to review the comments in the Remarks column to help you choose the appropriate pair of FTP command sets for your task.

Jay Oswal is a business systems analyst at TotalFinaElf E&P USA, Inc., in Houston, Texas. You can e-mail him at jay.oswal@TotalFinaElf.com.
RedMage1967 (Programmer)
13 Mar 03 14:04
I concur with jcattano, that you either do not have ftp running to the target pc, or you do not have the proper authority on your network to ftp a file to that pc.  I have various scripts I use in retreiving files from my pc based ftp site and transfering them directly to the AS/400.  You need to have ftp running on the pc in question, and have authority to that pc and it's files/folders.

RedMage1967
IBM Certified - RPG IV Programmer

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members!

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close