Defining copy, include, and macro libraries

Property groups provide multiple places where you can define copy, include, macro, and procedure libraries for local and remote source files. These multiple locations provide flexibility for writing code, checking dependencies, and compiling code across a hybrid system that includes files on your workstation client or a Git repository (local files), and files on an MVS or z/OS UNIX System Services system (remote files). Use this table to understand where to define copy, include, macro, and procedure libraries so that the product editors can find dependent files. For High Level Assembler files, the HLASM Editor and the z Systems® LPEX Editor locate and support copy and macro files differently. For a summary of defining libraries for the two editors, see Copy and macro library support in HLASM files.
Note: Remote property groups include pages and fields for specifying local libraries and remote libraries. When both local and remote libraries are defined in a remote property group, the local libraries are searched first. This search order applies only to resolving copy, macro, include, procedure files. It does not apply to compilation on a remote system. Compilers on a remote system search only the remote libraries for copy, include, macro, or procedure files.

Although the Assembler page of remote property groups contains fields for defining local macros and local copybooks, local macros and local copybooks are not supported in remote property groups by the z System LPEX editor. Local macros and local copybooks are supported in remote property groups by the HLASM editor.

Table 1. Where to define copy, include, and macro libraries
If the source file is on a And the copy, include, or macro file is on a Define copy, include, or macro libraries here:
Property Group Location Tab Page Field
Local system Local system Local system Assembler Local Options Macro Libraries
Copy Libraries1
COBOL or PL/I Local Compiler Options SYSLIB
REXX Local REXX Options SYSLIB
JCL Local JCL Options SYSLIB 4 (INCLUDE)
PROCLIB (PROC)
Remote system Local system Assembler Remote Libraries Remote Macro Libraries > Connection name2
Remote Macro Libraries > Library table3
Remote Copy Libraries > Connection name2
Remote Copy Libraries > Library table1
COBOL or PL/I Copy Libraries Library table
REXX Include Libraries All fields
JCL Remote JCL Options Library Table 4
PROCLIB (Library table)
Remote system Remote system
Remote system
Assembler Procedures and steps > Step options Macro libraries3
Copy libraries1
COBOL or PL/I Procedures and steps > Step options SYSLIB
REXX Remote REXX Options SYSLIB
JCL Remote JCL Options Include and Procedure Search Libraries
Library table
Local system Remote system Assembler Local Options Copy libraries1
COBOL or PL/I Local Compiler Options SYSLIB
REXX Local REXX Options SYSLIB
JCL Local JCL Options SYSLIB 4
PROCLIB (PROC)
  1. These fields are used only by the HLASM Editor. They are not used by the z Systems LPEX Editor.
  2. For remote macro and copy libraries to be found, you must specify a connection name and be connected to the z/OS system.
  3. This field is used by the HLASM Editor and z Systems LPEX Editor. For remote files, the HLASM Editor searches the SYS1.MACLIB library by default, and no property group definitions are necessary. All other locations to macros must be defined. For z System LPEX Editor, all locations for macros and copybooks must be defined in this field.
  4. This field is used only by the JCL Editor. It is not used by the z Systems LPEX Editor.