The standard rules for all names are described in Naming within commands. In addition, the following rules are used to name
all OS/400(R) objects used in control language commands. The
parameter summary table for each CL command shows whether a simple object
name, a qualified name, or a generic name can be specified.
INV and INV* are valid values where a generic name is accepted. When the name INV is specified, only the object INV is referenced. When the quoted generic name INV* is specified, objects that begin with INV are referred to, such as INV, INVOICE, INVENTORY, and INVENPGM1. When the quoted generic name "INV*" is specified, objects that begin with "INV" are referred to, such as "INV%1" and "INV>."
Two objects with the same name cannot be stored in the same library unless their object types are different. Two objects named OBJA can be stored in the library LIBx only if, for example, one of the objects is a program and the other is a file. The following combinations of names and object types could all exist on the system at the same time.
If more than one library contains an object with the same name (and both libraries are in the same library list) and a library qualifier is not specified with the object name, the first object found by that name is used. Therefore, when you have multiple objects with the same name, you should specify the library name with the object name or ensure that the appropriate library occurs first in the library list. For example, if you are testing and debugging and choose not to qualify the names, ensure that your test library precedes your production library in the library list.
Default libraries
In a qualified object name, the library name is usually optional. If an optional library qualifier is not specified, the default given in the command's description is used (usually either *CURLIB or *LIBL). If the named object is being created, the current library is the default; when the object is created, it is placed either in the current library or in the QGPL (the general purpose library ) if no current library is defined. For objects that already exist, *LIBL is the default for most commands, and the job's library list is used to find the named object. The system searches all of the libraries currently in the library list until it finds the object name specified.
For additional information about object naming, see the following:
Related information:
A path name is a character string that can be used to locate objects in the integrated file system. The string can consist of one or more elements, each separated by a slash (/) or back slash (\). Each element is typically a directory or equivalent, except for the last element, which can be a directory, another object such as a file, or a generic presentation of an object or objects to be located.
The / and \ characters and nulls cannot be used in the individual components of the path name because the / and \ characters are used as separators. 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. If the parameter is defined as CASE(*MONO) (the default), any values that are not enclosed in single quotes will be changed to uppercase by the command analyzer.
A / or \ character at the beginning of a path name means that the path begins at the top most directory, the "root" (/) directory. 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.
The path name 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. Hard-coded path names in programs are encoded in CCSID 37. Therefore, the path name should be converted to the job CCSID before being passed to the command. The maximum length of the path name character string on the CL commands is 5000 characters.
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'
Path names must be enclosed in apostrophe (') marks when entered on a command line if they contain special characters. These marks are optional when path names are entered on displays. If the path name includes any quoted strings or special characters; however, the enclosing '' marks must be included. The following are rules for using special characters:
Note: This only applies to relative path names where there are no other characters before the asterisk.
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.
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.
In addition, a value of hexadecimal 00 is not allowed in path names.
For further information on device names, see Specifying the device name in the Systems management, Backup and recovery topic.
For further information on path names, see the Integrated File System topic in the Information Center.
A generic name is one that contains at least one initial character that is common to a group of objects, followed by an asterisk. (The asterisk identifies the series of common characters as a generic name; otherwise, the system interprets the series of characters as the name of a specific object).
For more information on *GENERIC names, see the Generic object names section in this topic.
Additional rules involving special characters (as an extra character) that apply to the following types of names are:
These special characters are not part of the name; each is an additional character attached to a name (making a maximum of 11 characters) indicating to the system what the name identifies.
The names of OS/400(R) objects, CL program variables, system values, and built-in functions can be specified in the parameters of individual commands. Instead of specifying a constant value, a CL variable name can be used on most parameters in CL programs to specify a value that may change during the running of programs. It is the contents of the variable that identify the objects and variables that are used when the command is run.
(C) Copyright IBM Corporation 1992, 2005. All Rights Reserved.