Defining libraries for local projects and files
You can define local or remote libraries that can be used for real-time syntax
checking and open file operations in local Assembler, COBOL, PL/I, JCL, and REXX files that are open
in the editor.
This topic describes how to define local and remote libraries for COBOL,
PL/I, JCL, and REXX 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.
Before you start
Define a local property group for a local COBOL, PL/I, JCL, or REXX file, or associate an existing local property group with the file on which you want to run operations, such as real-time syntax checking and open copybook or include file.When you run operations that require access to copybooks and include files from local source
files, the editors use property group settings to locate the files:
- It locates local files by using the SYSLIB field or Environment variables field of the Local Compiler Options page for COBOL or PL/I files, Local JCL Options (for JCL Editor only) page for JCL files, and the Local REXX options page for REXX files. These fields specify an ordered list of local file paths to search for copybooks, include files, or macros.
- It locates remote copy and include files by using the Copy Libraries page for COBOL, the Include Libraries page for PL/I or REXX, or the Remote JCL Options for page for JCL.
The editors search these libraries in the following order:
- If both local and remote libraries are defined in the property group, the editors search the local libraries first and then the remote libraries.
- If no local libraries are defined, the editors search only the remote libraries.
- If no remote libraries are defined, the editors search only the local libraries.
Defining local libraries
- To define libraries:
- In the z/OS Projects view, right-click a local project or file and click . The property group editor opens.
- Click the COBOL, PL/I, JCL, or REXX tab at the bottom of the editor.
- To set the local libraries, choose Local Compiler Options, Local JCL Options (JCL Editor only), or Local REXX Options from the list of categories on the left.
- In the SYSLIB field, specify the local file path of the library. To
specify local libraries other than SYSLIB, use the Environment variables
field.Tip: The
Add a folder
window supports global patterns, such as **/COPY. To enter a global pattern, click Text Input and type the folder search strings into the text pane. Enter one global pattern per line.
Defining remote libraries
When you define remote libraries for a local project or file, the following actions or features
are disabled for that project or file:
- Show remote dependencies
- Local preprocessor support
- To set the remote libraries, choose Copy Libraries, Include Libraries, Remote JCL Options (JCL Editor only), or Remote Libraries from the list of categories at the left.
- From the Connection name list, choose a remote system.
- Click Add, Edit, or Remove to add copy or include libraries to the table, edit the entries in the table, or remove entries from the table. When you click Add or Edit, a window opens prompting you for a library name and a data set name.
- In the Library name field, type a name for the library. For
example, type SYSLIB.
- The table can have only one SYSLIB entry.
- The table can only have one MACLIB entry.
- The table allows for the specification of a name other than SYSLIB for the library, as in the
following examples. The editor searches the partitioned data sets defined in MYLIB instead of
SYSLIB. If you have the following statements in COBOL or PL/I code you can use this field to define
the library name MYLIB.
- COBOL example:
COPY MYFILE OF MYLIB. - PL/I example:
%INCLUDE MYLIB (MYFILE);
- COBOL example:
- If the library name is set to JCLLIB and the path is specified as
**, the system searches for the include library using the datasets defined in
the JCL JOB Card. The search order is as follows:
- JCLLIB
- JOBLIB
- PROCLIB
- SYS1.PROCLIB
- The system extracts and searches the datasets specified in these statements. If a dataset name is referenced using a variable declared by a SET statement within the same JOB Card, the variable is resolved before performing the search.
- In the Library path field, type one or more partitioned data set names to search and click OK. Separate multiple data set names with space, as in the following example. The editor searches the data sets in the order listed.
The following screen capture shows an example of remote copy libraries defined for a local
project:
