Copy and macro library support in HLASM files

IBM® Developer for z/OS® supports two editors for HLASM files: the HLASM Editor and the z Systems LPEX Editor. Both editors support copy and macro libraries, including local and remote custom macros.

Both editors use property groups to locate copy and macro libraries. The HLASM Editor uses the Copy Libraries and Macro Libraries fields, while the LPEX Editor relies primarily on the Macro Libraries fields. Use the information in this topic to understand how each editor resolves copy and macro libraries and how to set up property groups. For more information, see Defining macro files for Assembler programs (z Systems LPEX Editor).

Summary of copy and macro library support

HLASM Editor
The HLASM Editor uses the Copy Libraries lists in local and remote property groups to resolve copy libraries. It resolves local macro files by searching the Macro Libraries list in local property groups. It resolves remote macro files by searching the Macro Libraries list in remote property groups. To resolve macros in SYS1.MACLIB for source files on a remote system, SYS1.MACLIB can be added to the Macro Libraries field of the remote property group, though this reference is optional. For source files on a local system, resolving macros in SYS1.MACLIB requires pointing to a remote connection in a local property group.
z Systems LPEX Editor
The z Systems LPEX Editor uses the Macro Libraries fields in local and remote property groups to resolve macro files and copy files. It does not use the Copy Libraries fields. Copy libraries are not supported in LPEX. It does not support the resolution of local copy or macro files from remote source files.
Note: In order for custom macros to be resolved in the LPEX Editor, they must be defined in a .dat file. If not defined, syntax warnings are displayed the LPEX Editor. For more information, see Defining macro files for Assembler programs (z Systems LPEX Editor).

Property group settings

You can use this table to determine where to define the location of copy and macro files for each editor.

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, or include files. It does not apply to compilation on a remote system. Compilers on a remote system search only the remote libraries for copy, include, or macro 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. Defining the location of copy and macro files for HLASM source
Editor Location of source file Define local copy libraries in Define local macro libraries in Define remote copy libraries in Define remote macro libraries in
HLASM Editor Local
  • Property Group: Local
  • Tab: Assembler
  • Page: Local Options
  • Field: Copy Libraries
Local Options page of a local property group
  • Property Group: Local
  • Tab: Assembler
  • Page: Local Options
  • Field: Macro Libraries
Local Options page of a local property group
  • Property Group: Local
  • Tab: Assembler
  • Page: Remote Libraries
  • Fields: Connection name and Library Name/Library Path table in theRemote Copy Libraries section
Remote Libraries page of a local property group
  • Property Group: Local
  • Tab: Assembler
  • Page: Remote Libraries
  • Fields: Connection name. The editor searches for macro files in the SYS1.MACLIB library of the connection name. The connection name can be defined in either the Remote Copy Libraries section or the Remote Macro Libraries section.
Remote Libraries page of a local property group
Remote
  • Property Group: Remote
  • Tab: Assembler
  • Page: Local Options
  • Field: Copy Libraries
Local Options page of a remote property group
  • Property Group: Remote
  • Tab: Assembler
  • Page: Local Options
  • Field: Macro Libraries. Defining local macro libraries in remote sources.
Local Options page of a remote property group
  • Property Group: Remote
  • Tab: Assembler
  • Page: Procedures and Steps
  • Fields: Assembler Step Options area:Copy libraries field
Assembler Step Options in a remote property group
  • Property Group: Remote
  • Tab: Assembler
  • Page: Procedures and Steps
  • Fields: Remote Macro Libraries
  • No definition needed if macros are in SYS1.MACLIB. The editor searches for macro files in the SYS1.MACLIB library of the z/OS system where the source file is located. If macros are defined in other locations, the location must be specified in this field.
Assembler Step Options in a remote property group
z Systems LPEX Editor Local
  • Property Group: Local
  • Tab: Assembler
  • Page: Local Options
  • Field: Macro Libraries1
Local Options page of a local property group
  • Property Group: Local
  • Tab: Assembler
  • Page: Local Options
  • Field: Macro Libraries1
Local Options page of a local property group
  • Property Group: Local
  • Tab: Assembler
  • Page: Remote Libraries
  • Fields: Connection name and Library Name/Library Path table in the Remote Macro Libraries section.
Remote Libraries page of a local property group
  • Property Group: Local
  • Tab: Assembler
  • Page: Remote Libraries
  • Fields: Connection name and Library Name/Library Path table in the Remote Macro Libraries section.
Remote Libraries page of a local property group
Remote Not supported Not supported
  • Property Group: Remote
  • Tab: Assembler
  • Page: Procedures and Steps
  • Fields: Macro libraries
Assembler Step Options in a remote property group
  • Property Group: Remote
  • Tab: Assembler
  • Page: Procedures and Steps
  • Fields: Macro libraries
Assembler Step Options in a remote property group
Note:
  1. In order for custom macros to be resolved in the LPEX Editor, they must be defined in a .dat file. If not defined, syntax warnings are displayed the LPEX Editor.