Integrated File System Introduction
Path name rules for CL commands and displays
When using an integrated file system command or display to operate on an object, you identify the object by supplying its path name. Following is a summary of rules to keep in mind when specifying path names. The term object in these rules refers to any directory, file, link, or other object.
- Object names must be unique within each directory.
- The path name that is passed to an integrated file system CL command must be represented in the CCSID currently in effect for the job. If the CCSID of the job is 65535, the path name must be represented in the default CCSID of the job. Because text strings are normally encoded in CCSID 37, it is necessary to convert hard-coded path names to the job CCSID before passing the path to the command.
- Path names must be enclosed in apostrophe (') marks when entered on a command line. These marks are optional when path names are entered on displays. If the path name includes any quoted strings, however, the enclosing ' ' marks must also be included.
- Path names are entered left-to-right, beginning with the highest level directory and ending with the name of the object to be operated on by the command. The name of each component in the path is separated by a slash (/) or back slash (\); for example:
'Dir1/Dir2/Dir3/UsrFile'or
'Dir1\Dir2\Dir3\UsrFile'- The / and \ characters and nulls cannot be used in the individual components of the path name (because the / and \ are used as separators). Lowercase letters are not changed to uppercase letters by the commands. The name may or may not be changed to uppercase, depending on whether the file system containing the object is case-sensitive and whether the object is being created or searched for.
- The length of an object name is limited by the file system the object is in and the maximum length of a command string. The commands will accept object names up to 255 characters long and path names up to 5000 characters long.
See File systems in the integrated file system for path name limits in each file system.
- A / or \ character at the beginning of a path name means that the path begins at the topmost directory, the "root" (/) directory; for example:
'/Dir1/Dir2/Dir3/UsrFile'- If the path name does not begin with a / or \ character, the path is assumed to begin at the current directory of the user entering the command; for example:
'MyDir/MyFile'where MyDir is a subdirectory of the user's current directory.
- A tilde (~) character followed by a slash (or backslash) at the beginning of a path name means that the path begins at the home directory of the user entering the command; for example:
'~/UsrDir/UsrObj'- A tilde (~) character followed by a user name and then a slash (or backslash) at the beginning of a path name means that the path begins at the home directory of the user identified by the user name; for example:
'~user-name/UsrDir/UsrObj'- In some commands, an asterisk (*) or a question mark (?) can be used in the last component of a path name to search for patterns of names. The * tells the system to search for names that have any number of characters in the position of the * character. The ? tells the system to search for names that have a single character in the position of the ? character. The following example searches for all objects whose names begin with d and end with txt:
'/Dir1/Dir2/Dir3/d*txt'The following example searches for objects whose names begin with d followed by any single character and end with txt:
'/Dir1/Dir2/Dir3/d?txt'- To avoid confusion with iSeries server special values, path names cannot start with a single asterisk (*) character. To perform a pattern match at the beginning of a path name, use two asterisks (*); for example:
'**.file'
- This only applies to relative path names where there are no other characters before the asterisk (*).
- When operating on objects in the QSYS.LIB file system, the component names must be of the form name.object-type; for example:
'/QSYS.LIB/PAY.LIB/TAX.FILE'See Library file system (QSYS.LIB) for more details.
- When operating on objects in the Independent ASP QSYS.LIB file system, the component names must be of the form name.object-type; for example:
'/asp_name/QSYS.LIB/PAYDAVE.LIB/PAY.FILESee Independent ASP QSYS.LIB for more details.
- The path name must be enclosed in additional sets of apostrophes (') or quotation marks (") if any of the following characters is used in a component name:
- Asterisk (*)
- Question mark (?)
- Apostrophe (')
- Quotation mark (")
- Tilde (~), if used as the first character in the first component name of the path name (if used in any other position, the tilde is interpreted as just another character)
For example:
'"/Dir1/Dir/A*Smith"'or
'''/Dir1/Dir/A*Smith'''This practice is not recommended because the meaning of the character in a command string could be confused and it is more likely that the command string will be entered incorrectly.
- Do not use a colon (:) in path names. It has a special meaning within the system.
- The processing support for commands and associated user displays does not recognize code points below hexadecimal 40 as characters that can be used in command strings or on displays. If these code points are used, they must be entered as a hexadecimal representation, such as the following:
crtdir dir(X'02')Therefore, use of code points below hexadecimal 40 in path names is not recommended. This restriction applies only to commands and associated displays, not to APIs (see Perform operations using APIs).
For restrictions on using a particular command, see the command help or the Control language (CL) topic in the iSeries Information Center.
[ Top of Page | Previous Page | Next Page | Table of Contents | Index ]