Creating and Manipulating the CMS Libraries

This chapter describes:
  • How to create and manipulate macro libraries, text libraries, and load libraries
  • How to use callable services libraries
  • How to use ISPF/PDF libraries.

Most operating systems provide library facilities. These help you develop programs and maintain an orderly environment for managing your files. All the CMS library types have a similar structure. Each one contains one or more members and has an internal directory. The library facilities use this directory to locate members. Because libraries are unlike other CMS files, you create, update, and use them differently than you do other CMS files.

The CMS libraries are:
Macro Library (MACLIB)
Macro libraries have a file type of MACLIB. They contain COPY files usually written in a high-level programming language or MACRO files usually written in assembler language. These files are referenced when you invoke either a compiler or assembler to process an application. Some MACLIBs are provided with the individual programming language compilers. These MACLIBs contain routines used during the compilation process. Therefore, before compiling or assembling your application, you may need to make these routines available to the compiler or assembler by issuing the GLOBAL command. See Identifying Libraries to Be Searched for information on using the GLOBAL command to access MACLIBs. You can also use the MACLIB command to create or change the contents of a macro library.
Text Library (TXTLIB)
Text libraries have a file type of TXTLIB. They contain files (sometimes called object files) that are compiled or assembled. Some TXTLIBs are provided with the individual programming language product you are using. Therefore, before executing your application, you may need to make these TXTLIBs available to CMS by issuing the GLOBAL command. See Resolving External References by Identifying Libraries for information on using the GLOBAL command to access TXTLIBs. You can also create your own TXTLIBs with routines written for use in one or more applications.
Load Library (LOADLIB)
Load libraries have a file type of LOADLIB. They contain executable load modules that have been compiled or assembled and link-edited.
Callable Services Library (CSL)
Callable services libraries have a file type of CSLLIB, CSLSEG, or TEXT, depending on whether the library is located on DASD, in a logical saved segment, or in the CMS nucleus. Files within these libraries contain routines that are written in the assembler language. Your high-level language or assembler application can call these routines to perform a specific function. z/VM® provides you with libraries named VMLIB and VMMTLIB that contain many routines your applications can call.
Interactive System Productivity Facility/Program Development Facility (ISPF/PDF)
An ISPF/PDF library can be a set of CMS files, MACLIBs, or TXTLIBs. Organizing this information in an ISPF/PDF library allows many people to share the code and data.
Figure 1. CMS Libraries
dmsa3lib dmsa3lib