On 6/20/2023 10:59 AM, tim ken wrote:
Hi,

Thanks.

I tried both but none worked to change current library and same error(550)
i got: -

User (pub400.com:(none)): K21
331 Enter password.
Password:
230 K21 logged on.
ftp> QUOTE SITE NAMEFMT 1
250 Now using naming format "1".
ftp> cd k211
550-Specified directory does not exist or cannot be accessed.
550 Working directory not changed.
ftp> QUOTE SITE NAMEFMT 0
550 Current directory requires name format 1.
ftp> QUOTE SITE NAMEFMT 1
250 Now using naming format "1".
ftp> cd k211
550-Specified directory does not exist or cannot be accessed.
550 Working directory not changed.
ftp>

The initial request was for a manual reference. All IBM i manuals are in the Knowledge Center: https://www.ibm.com/docs/en/i/7.4 If one is unfamiliar with the way IBM organise titles, try the searches. In this specific case, FTP is documented under Networking > TCP/IP applications, protocols, and services > FTP on IBM i: https://www.ibm.com/docs/en/i/7.4?topic=services-ftp-i Very few IBM manuals are tutorials with step-by-step instructions. They tend to be reference material, to remind one of the exact syntax for this or that. I think the reference you are looking for is here: https://www.ibm.com/docs/en/i/7.4?topic=i-ftp-reference-information

The advice you've received to 'learn FTP' is sound, but somewhat spartan. NAMEFMT is probably the one thing that confuses newcomers. The default is NAMEFMT 0 - LIBRARY/FILE(MEMBER). The IBM FTP server will switch over to NAMEFMT 1 if the very first FTP subcommand that has a file parameter specifies that file with a slash or tilde. Or, of course, if you issue your own NAMEFMT 1, as was done here. In NAMEFMT 1, one specifies only IFS paths, so /QSYS.LIB/LIBRARY.LIB/FILE.FILE/MEMBER.MBR Do note the leading slash!

Let's take a peep at the session above. It specifies NAMEFMT 1, which means IFS paths. Then, cd k211 is issued. Since there's no leading slash, that makes this a /relative/ reference - change to the k211 directory that's inside the current directory the session is already in. That's your home IFS directory up on the PUB400 server. Not your current library, but your home directory. DSPUSRPRF K21, page down to the very bottom and there's your home directory. For the sake of example, let's assume it's /home/K21. The 'cd k211' command is trying to change the current directory to /home/K21/k211 - which clearly does not exist.

Try a new FTP session. If you want to manipulate LIBRARY/FILE(MEMBER), don't issue NAMEFMT 1 and don't CD /somedir. Make the very first FTP subcommand that you issue be a CD LIBRARY and you'll see the confirmation.

--buck


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.