This document explains how to use the NAMEFMT command with IBM OS/400.
Resolving The Problem
The NAMEFMT (name format) subcommand is used to change the way IBM OS/400 views and displays its internal file structure.
By default, FTP (File Transfer Protocol) uses the traditional OS/400 file naming conventions -- Libraries, which contain Files, which in turn contain Members. This is also known as the *LIB Naming Format, or 'NAMEFMT 0', and looks like the following:
FTP also supports OS/400's Integrated File System Naming Format. This looks much more like a UNIX or Personal Computer Directory system. We must use this Naming Format known as *PATH or 'NAMEFMT 1' to access files in the Integrated File System, the document library services QDLS folders, QOPT optical files, or to send savefiles.
The way this command is used depends on the types of systems involved in the file transfer.
If the file transfer is from a Microsoft Windows PC to an OS/400 Integrated File System file, there are two ways to do this:
|1||If the first command issued is CD /targetdirectory, OS/400 automatically selects NAMEFMT 1. The key is that the target directory path must start with a forward slash, and it must be the first command.|
|2||Issue the subcommand, QUOTE SITE NAMEFMT 1. Once this command is completed, the target IBM iSeries family of servers should be in NAMEFMT 1 mode, and the directory structure can be navigated using the CD command as with a PC or UNIX server.|
If the file transfer is between two IBM iSeries family of servers, the server that starts the FTP session will want to change both the local server and target server. To change the local server, enter the NAMEFMT 1 command. Then, to change the remote server, issue the SITE NAMEFMT 1 command. On OS/400 V4R5M0 and higher, issuing the NAMEFMT 1 command on the local server switches both machines to Integrated File SystemNaming Format.
To access something in the QSYS library after switching to Integrated File System Naming Mode, the format to follow is:
In the case of savefiles, the format is:
For QDLS shared folders:
18 December 2019