File-Naming Considerations on iSeries

On the iSeries (AS/400), there are two main types of file systems—the default library system and the Integrated File System (IFS).

If no PathPrefix is specified, the object is assumed to be a library, file, or a member of a file in the library system. You can explicitly specify the library system using the QSYS: path prefix.

An object in the IFS is indicated by the presence of the IFS: or ! path prefix.

To keep your file names and directory names as generic as possible when you use file management ProcScript, use Uniface logicals in your assignment file to prefix the names with IFS: or QSYS:.

For more information about naming conventions, case sensitivity, and so forth, refer to the IBM documentation about the default library system and the IFS. The following is only a high-level summary of these systems for naming file and directories on the iSeries.

Default Library File System

The library file system contains libraries, not directories, so there is no concept of a root directory. A library can contain files and other objects, but cannot contain other libraries. Files contain members.

Names within the library file system are case insensitive. The maximum file name length is 10 characters for the library, 10 for the file, and another 10 for the member. A dot (.) indicates the current library and two dots (..) is illegal.

The syntax for names in the library file system is, for each level:

  • Library—library/ or /library/

    A period (.) before the slash (./) indicates the current library.

  • File in the current library—.file (with period)
  • File in a library—library/.file

    with a period (.) before the file name, because the file name is normally specified as an extension without a period, for example library/file

  • Member in a file in the current library—member.file or file(member)
  • Member in a file in a library—library/member.file

    Note that the normal file specification would have been file.member instead of member.file. Alternatively, library/file(member) is also recognized.

Integrated File System (IFS)

Objects in a library other than a physical file or a member of a file can be accessed only by using their IFS paths. The IFS path of an object in a library is constructed as follows:

IFS:/QSYS.LIB/Library.LIB/Name.Type

For example, a *PGM object called MYPGM in library MYLIB would be specified as:

IFS:/QSYS.LIB/MYLIB.LIB/MYPGM.PGM

The IFS consists of a further set of different sub-file systems, one of which is the library file system, each having its own naming conventions and restrictions that might or might not be thread-safe. Uniface is a multi-threaded application so it is not able to access file systems within the IFS that are not thread-safe. Uniface does not check these restrictions, so the user must be aware of the restrictions of the chosen file system.

You can specify files using the Universal Naming Convention (UNC) with either forward slashes (/) or backslashes (\), but you must use the IFS prefix. For example, //IFS/mydir/mysubdir is equivalent to IFS:/mydir/mysubdir (and to !mydir/mysubdir).