16.12.2012 Views

z/OS V1R9.0 UNIX System Services Command ... - Christian Grothoff

z/OS V1R9.0 UNIX System Services Command ... - Christian Grothoff

z/OS V1R9.0 UNIX System Services Command ... - Christian Grothoff

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

ln<br />

Localization<br />

Exit Values<br />

2. spawn() will access the file for name1 unaware that there is a symbolic link<br />

already established. It will access the name2 file by its underlying vnode, not<br />

the name2 handle.<br />

3. If the sticky bit is on for the name2 file, spawn() will do the MVS search for<br />

name1 (the only name it has to work with).<br />

Symbolic and external links with a sticky bit:<br />

Note: DLLs, and all flavors of spawn() and exec(), follow the same processing as<br />

described below. Where it says exec(), it covers all forms of module loading.<br />

1. External links:<br />

exec() does a stat() on the passed filename. stat() does the search, not exec().<br />

If the filename is an external link, then stat() fails with a unique reason code<br />

which causes exec() to read the external link. If the external link name is a valid<br />

PDS member name (1–8 alphanumeric/special characters), then exec() will<br />

attempt to locate the module in the MVS search order. If it cannot be found,<br />

exec() fails.<br />

The external link is normally used when you want to set the sticky bit on for a<br />

file name which is longer than 8 characters or contains characters unacceptable<br />

for a PDS member name.<br />

2. Symbolic links:<br />

If the filename you specify is a symbolic link, and exec() sees the sticky bit on,<br />

then it will truncate any dot qualifiers. So, as long as the base filename is an<br />

acceptable PDS member name, the need to set up links in order to get exec()<br />

to go to the MVS search order should not be an issue.<br />

For example, if you have a file named java.jll, when you put the sticky bit on,<br />

exec() will attempt to load JAVA. If exec() cannot find JAVA, it will revert to<br />

using the java.jll file in the file system.<br />

The important thing to understand is that exec() never sees the name that the<br />

symbolic link resolves to even though it can see the stat() data for the final file.<br />

ln uses the following localization environment variables:<br />

v LANG<br />

v LC_ALL<br />

v LC_CTYPE<br />

v LC_MESSAGES<br />

v LC_SYNTAX<br />

v NLSPATH<br />

See Appendix F for more information.<br />

0 All requested links were established successfully.<br />

1 Failure due to any of the following:<br />

v An argument had a trailing / but was not the name of a directory.<br />

v A file could not be found.<br />

v An input file could not be opened for reading.<br />

v An output file could not be created or opened for output.<br />

v The new link file already exists.<br />

v A link could not be established.<br />

v A read error occurred on an input file.<br />

v A write error occurred on an output file.<br />

350 z/<strong>OS</strong> <strong>V1R9.0</strong> <strong>UNIX</strong> <strong>System</strong> <strong>Services</strong> <strong>Command</strong> Reference

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!