Example A: Putting the whole path in the DD statement

In this example INPUT is the DD name for the file to be included. PATH= in this case specifies a whole path which must be in quotation marks because it contains lower case letters. INPUT is then used in the INCLUDE statement:

//INPUT     DD PATH='/u/userid/hello.o',PATHDISP=(KEEP,KEEP)              
//SYSLMOD   DD DSN=USERID.PDSE.LOAD,DISP=SHR                              
//SYSLIN    DD *                                                          
  INCLUDE -IMPORTS,-ATTR,INPUT                                            
  NAME TEST(R)                                                            
/* 

When you use "member syntax" in the INCLUDE statement, rather than putting the whole path in the DD statement, you put a directory path in the DD statement, and then in the INCLUDE statement you specify the file in the directory you want included. In this case, there are three rules to remember. First, the PATH= in the DD statement must point to a directory, not a file. As before, the path should be in quotation marks if it contains lower case letters.

Secondly, you must put information needed to locate the file within the directory in the INCLUDE statement.

Finally, if the information in the INCLUDE statement is lower or mixed case, it must be quoted, unless CASE=MIXED is specified as an invocation option. Examples B, C, and D show three ways to do this.