IBM Support

Using the FTP Subcommand: NAMEFMT

Troubleshooting


Problem

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:

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 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:

1If 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.
2Issue 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

[{"Product":{"code":"SWG60","label":"IBM i"},"Business Unit":{"code":"BU054","label":"Systems w\/TPS"},"Component":"Communications-TCP","Platform":[{"code":"PF012","label":"IBM i"}],"Version":"Version Independent;7.1.0;6.1.1;6.1.0;5.4.5;5.4.0","Edition":"","Line of Business":{"code":"LOB08","label":"Cognitive Systems"}},{"Product":{"code":"SSC52E","label":"IBM i 7.1"},"Business Unit":{"code":"BU054","label":"Systems w\/TPS"},"Component":" ","Platform":[{"code":"","label":null}],"Version":"","Edition":"","Line of Business":{"code":"","label":""}},{"Product":{"code":"SSC3X7","label":"IBM i 6.1"},"Business Unit":{"code":"BU054","label":"Systems w\/TPS"},"Component":" ","Platform":[{"code":"","label":null}],"Version":"","Edition":"","Line of Business":{"code":"","label":""}}]

Historical Number

22994414

Document Information

Modified date:
18 December 2019

UID

nas8N1017416