When the filename specified in the #include directive is not in absolute form, the compiler combines it with different types of libraries to form complete data set specifications. These libraries may be specified by the LSEARCH or SEARCH compiler options. When the LSEARCH or SEARCH option indicates a data set then, depending on whether it is a ddname, sequential data set, or PDS, different parts of filename are used to form the ddname or data set name.
In this example, if your header file includes an underscore (_), for example, #include "sys/afile_1.g.h", the resulting ddname is DD:SYSLIB(AFILE@1).
The following table gives the original format of the filename and the resulting converted name when you specify the NOOE option:
#include Directive | Converted Name |
---|---|
Example 1. This filename is absolute because single quotation marks (') are used. It is a sequential data set. A library search is not performed. LSEARCH is ignored. | |
#include "'USER1.SRC.MYINCS'" | USER1.SRC.MYINCS |
Example 2. This filename is absolute because single quotation marks (') are used. The compiler attempts to open data set COMIC/BOOK.OLDIES.K and fails because it is not a valid data set name. A library search is not performed when filename is in absolute form. SEARCH is ignored. | |
#include <'COMIC/BOOK.OLDIES.K'> | COMIC/BOOK.OLDIES.K |
Example 3. | |
SEARCH(LIB1.*,LIB2.+,LIB3) #include "sys/abc/xx" |
|
Example 4. | |
SEARCH(LIB1.*,LIB2.+,LIB3) #include "Sys/ABC/xx.x" |
|
Example 5. | |
SEARCH(LIB1.*,LIB2.+,LIB3) #include <sys/name_1> |
|
Example 6. | |
SEARCH(LIB1.*,LIB2.+,LIB3) #include <Name2/App1.App2.H> |
|
Example 7. The PDS member named YEAREND of the library associated with the ddname PLANLIB is used. A library search is not performed when filename in the #include directive is in absolute form (ddname is used). SEARCH is ignored. | |
#include <dd:planlib(YEAREND)> | DD:PLANLIB(YEAREND) |