INCLUDE brings data into the workmod. The source is usually a data set that can contain a program object, a load module, or a combination of object modules and control statements. In some cases, the program module might be included from virtual storage rather than an external data set. Multiple INCLUDE calls cause all included program objects, load modules, and object modules to be merged in the specified workmod. You can specify a z/OS UNIX System Services file as the DDNAME parameter value on an INCLUDE statement.
The syntax of the INCLUDE call is:
[symbol] | IEWBIND | FUNC=INCLUDE [,VERSION=version] |
INTYPE=DEPTR
DDNAME=ddname
DEPTR=deptr
INTYPE=NAME
DDNAME=ddname
MEMBER=memberIO
PATHNAME=pathname
INTYPE=POINTER
DCBPTR=dcbptr
DEPTR=deptr
INTYPE=SMDE
DDNAME=ddname
DEPTR=deptr
INTYPE=TOKEN
EPTOKEN=eptoken
The values are as follows:
The values for INTYPE can be abbreviated as N, D, S, P, or T .
The binder can retrieve a module identified by an entry point token only if the module was loaded. EPTOKEN cannot be used to retrieve a module in LPA or LLA. EPTOKEN can be used for programs loaded from the UNIX shell by BPX1LOD.
If ATTRIB=YES, the following attributes are copied from the input directory: AC, AMODE, DC, LONGPARM, OL, REUS, RMODE, SSI, TEST, ENTRY POINT, DYNAM, and MIGRATABLE. If INTENT=ACCESS, the following additional attributes are copied: EDITABLE, EXECUTABLE, OVLY, and PAGE-ALIGNED. You cannot set the EXECUTABLE, MIGRATABLE, and PAGE-ALIGNED attributes with either SETO or STARTD.
When INTENT=ACCESS is specified on CREATEW, only one data set can be included in the workmod and the data set must be a program object or load module.
If INTENT=ACCESS and ALIASES=YES, the aliases and any associated addressing modes are included. If INTENT=BIND and ALIASES=YES, the aliases are included, but the associated addressing modes are not.
If INTENT=ACCESS and ATTRIB=YES, the SIGN option value is preserved in the included module, which means the signature and the directory bit that indicates the presence of the signature are preserved on an INCLUDE API call.
When INTENT=BIND, the ddname can refer to a concatenation of data sets or to a z/OS UNIX System Services file. These data sets must be either all libraries or all sequential data sets. If the ddname refers to a library and the member name is included with the library name, it is processed sequentially and can only be concatenated with other library members or sequential data sets. Each library member must contain either a single program module or a mixture of object modules and control statements. Sequential data sets can only contain object modules and control statements.
The processing of INCLUDE can be modified by the ALTERW function. CSECTs and symbols can be replaced or deleted in an included module when specified on earlier ALTERW calls or equivalent control statements. The scope of such alterations extends only to the first end-of-module condition encountered in the included file. Additional modules can not be included into the workmod once it has been bound.
The common binder API reason codes are shown in Table 1.
Return Code | Reason Code | Explanation |
---|---|---|
00 | 00000000 | Normal completion. File included successfully. |
04 | 83000515 | Unsupported control statement encountered in included file. File included successfully. |
04 | 83000525 | An unusual condition was encountered while processing a REPLACE or CHANGE control statement. |
04 | 83000526 | An unusual condition was encountered in an input module, while converting it into workmod format. For example, this reason code will be returned if a two-byte relocatable adcon was seen. |
08 | 83000502 | One or more editing requests (delete, change or replace operations) failed during inclusion of the module. The module was included successfully, but some of the requested changes were not made. |
08 | 83000505 | The included module was marked not editable, and has been deleted. |
08 | 83000507 | A format error has been encountered in a module being included. The module was not added to the target workmod. |
08 | 83000510 | Errors were encountered in the included module. The module is rejected. |
08 | 83000511 | A control statement in an included file attempted to include the file containing the statement, or include another file that, in turn, included the original file. The recursive include has been rejected. |
08 | 83000514 | The requested member could not be found in the library, or the library could not be found. Request rejected. |
08 | 83000516 | A format error has been encountered in one or more control statements being included. The erroneous statements have been ignored. |
08 | 83000517 | A NAME control statement was encountered, but no target library (MODLIB) had been specified. The statement was ignored. |
08 | 83000518 | A NAME control statement was encountered in a secondary input file. The statement was ignored. |
08 | 83000519 | Errors (invalid data) were found in a module being brought in by an INCLUDE control statement. The module was not included. |
08 | 83000520 | The data set or library member specified by an INCLUDE control statement could not be found. The data set or library member was not included. |
08 | 83000521 | An I/O error occurred while trying to read an input data set (or directory) specified on an INCLUDE control statement. The data set (or member) was not included. |
08 | 83000522 | The input data set specified on an INCLUDE control statement could not be opened. The data set (or member) was not included. |
08 | 83000527 | Identify data could not be processed because the section was not included prior to identify statement. |
08 | 83000528 | The DE parameter value; the TTR or K (concatenation) field is invalid. |
12 | 83000101 | Not all the parameters required for the specified INTYPE (as described above) were provided. The request has been rejected. |
12 | 83000103 | The workmod was specified with INTENT=BIND, but the INTYPE was other than DDNAME. The request has been rejected. |
12 | 83000500 | The INCLUDE call has attempted to include a second module when the processing intent is ACCESS. The request has been rejected. |
12 | 83000503 | An I/O error occurred while trying to read the input data set or its directory. The input is not usable. |
12 | 83000504 | The module was successfully included, but the ALIASES or ATTRIB option could not be honored because the directory was not accessible. |
12 | 83000506 | An attempt has been made to include an object module into a workmod specified as INTENT=ACCESS. Request rejected. |
12 | 83000507 | A format error has been encountered in a module being included. The module was not added to the target workmod. |
12 | 83000509 | An attempt has been made to include a file containing control statements but the workmod specified INTENT=ACCESS. The request has been rejected. |
12 | 83000512 | The designated source for the current INCLUDE contained more than one module but the target workmod was specified with INTENT=ACCESS. The request has been rejected. |
12 | 83000513 | The file could not be opened. Request rejected. |
12 | 83000523 | For intent access, the requested module contained a format error and has not been placed in workmod. Request rejected. |
If your program does not use the IEWBIND macro, place the address of the INCLUDE parameter list in general purpose register 1.
PARMLIST | DS | 0F | |
DC | A(INCLUDE) | Function code | |
DC | A(RETCODE) | Return code | |
DC | A(RSNCODE) | Reason code | |
DC | A(WORKMOD) | Workmod token | |
DC | A(INTYPE) | Intype | |
DC | A(DDNAME) | ddname or pathname. Pathname is only valid if INTYPE=N. | |
DC | A(MEMBER) | Member name. A(0) should be coded if PATHNAME is specified. | |
DC | A(DCBPTR) | Pointer to DCB | |
DC | A(DEPTR) | Pointer to BLDL entry | |
DC | A(EPTOKEN) | EPTOKEN | |
DC | A(0) | Reserved | |
DC | A(ATTRIB) | ATTRIB option | |
DC | A(ALIASES) | ALIASES option | |
DC | A(IMPORTS+X'80000000') | IMPORTS option and end-of-list indicator | |
INCLUDE | DC | H'40' | Function code |
DC | H'version' | Interface version number | |
INTYPE | DC | CL1'N' | INTYPE source option 'N' = Name |
ATTRIB | DC | CL1'Y' | ATTRIB option 'Y' = Yes |
ALIASES | DC | CL1'Y' | ALIASES option 'Y' = Yes |
IMPORTS | DC | C'Y' | Whether imports in input should be included 'Y' = Yes |