You can give more than one name to objects on the server. An additional name for an object is sometimes called a link. Some links, referred to as hard links, point directly to the object. Other links are more like a nickname for an object. The nickname does not point directly to the object. Instead, you can think of the nickname as an object that contains the name of the original object. This type of link is referred to as a soft link, or a symbolic link.
If you create links for objects, study the examples that follow to ensure that your save strategy saves both the contents of objects and all their possible names.
The following figure shows an example of a hard link: The root directory contains UserDir. UserDir contains JCHDIR and DRHDIR. JCHDIR contains FILEA that has a hard link to Object A. DRHDIR contains FILEB which also contains a hard link to Object A.
You can save Object A with either of the following commands. For both commands, you get the description of the specified object and the contents of object .:
If you use only the first command (JCHDIR), you have not saved the fact that FILEB is also named in the DRHDIR directory.
You can use any of the following commands to get the data once and both names (hard links) for the file:
The following figure shows an example of a symbolic link: The root directory contains QSYS.LIB and Customer. QSYS.LIB contains CUSTLIB.LIB. CUSTLIB.LIB contains CUSTMAS.FILE. Customer is a symbolic link to CUSTMAS.FILE.
Following are several commands you can use to save the CUSTMAS file (both description and data):
None of these commands saves the fact that the CUSTMAS file has a "nickname" of customer in the root directory.
If you specify SAV OBJ('/customer'), you save the fact that customer is a nickname for the CUSTMAS file. You do not save the description of the CUSTMAS file or its contents.