Determining whether the file name is in absolute form

The compiler determines if the file name that is specified in #include is in absolute form as follows:

Figure 1. Testing if filename is in absolute form
REQTEXT
 1 
The compiler first checks whether you specified OE.
 2 
When you specify OE, if double slashes (//) do not precede filename, and the file name starts with a slash (/), then filename is in absolute form and the compiler opens the file directly as a z/OS® UNIX file. Otherwise, the file is not an absolute file and each opt in the SEARCH or LSEARCH compiler option determines if the file is treated as a z/OS UNIX file or data set in the search for the include file.
 3 
When OE is specified, if double slashes (//) precede filename, and the file name starts with a slash (/), then filename is in absolute form and the compiler opens the file directly as a z/OS UNIX file. Otherwise, the file is a data set, and more testing is done to see if the file is absolute.
 4 
If filename is enclosed in single quotation marks ('), then it is an absolute data set. The compiler directly opens the file and ignores the libraries that are specified in the LSEARCH or SEARCH options. If there are any invalid characters in filename, the compiler converts the invalid characters to at signs (@, hex 7c).
 5 
If you used the ddname format of the #include directive, the compiler uses the file associated with the ddname and directly opens the file as a data set. The libraries that are specified in the LSEARCH or SEARCH options are ignored.
 6 
If none of the conditions are true then filename is not in absolute format and each opt in the SEARCH or LSEARCH compiler option determines if the file is a z/OS UNIX file or a data set and then searches for the include file.
 7 
If none of the conditions are true, then filename is a data set, but it is not in absolute form. Only opts in the SEARCH or LSEARCH compiler option that are in data set format are used in the search for include file.
For example:
 Options specified:

  OE

Include Directive:

  #include "apath/afile.h"       NOT absolute, z/OS UNIX file/
                                 MVS (no starting slash)
  #include "/apath/afile.h"      absolute z/OS UNIX file,
                                 (starts with 1 slash)
  #include "//apath/afile.h.c"   NOT absolute, MVS (starts with 2 slashes)
  #include "a.b.c"               NOT absolute, z/OS UNIX file/
                                 MVS (no starting slash)
  #include "///apath/afile.h"    absolute z/OS UNIX file,
                                 (starts with 3 slashes)
  #include "DD:SYSLIB"           NOT absolute, z/OS UNIX file/
                                 MVS (no starting slash)
  #include "//DD:SYSLIB"         absolute, MVS (DD name)
  #include "a.b(c)"              NOT absolute, z/OS UNIX file/
                                 MVS (no starting slash)
  #include "//a.b(c)"            NOT absolute, OS/MVS (PDS member name)