IBM Support

Using the FTP Subcommand: NAMEFMT

Troubleshooting


Problem

This document explains how to use the NAMEFMT command with IBM i

Resolving The Problem

The NAMEFMT (name format) subcommand is used to change the way IBM i 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:

Libraryname/Filename.Membername

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 save files.

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:
/QSYS.LIB/libraryname.LIB/filename.FILE/membername.MBR .

In the case of savefiles, the format is:
/QSYS.LIB/libraryname.LIB/savefilename.SAVF

For QDLS shared folders:
/QDLS/foldername[.extension]/filename[.extension]

For QOPT:
/QOPT/volumename/directoryname/filename.extension

[{"Type":"MASTER","Line of Business":{"code":"LOB57","label":"Power"},"Business Unit":{"code":"BU058","label":"IBM Infrastructure w\/TPS"},"Product":{"code":"SWG60","label":"IBM i"},"ARM Category":[{"code":"a8m0z0000000CLbAAM","label":"Communications->FTP"}],"ARM Case Number":"","Platform":[{"code":"PF012","label":"IBM i"}],"Version":"All Versions"}]

Historical Number

22994414

Document Information

Modified date:
13 October 2021

UID

nas8N1017416