Creating an object library under z/OS batch

Under z/OS® batch, the following cataloged procedures include an object library utility step:
EDCLIB
Maintain an object library
EDCCLIB
Compile and maintain an object library (C only)
The EDCLIB cataloged procedure is located in the CEE.SCEEPROC data set. The EDCCLIB cataloged procedure is located in the CBC.SCCNPRC data set. For more information on the data sets that you use with the object library utility, see Description of data sets used.
To compile the z/OS XL C source file WALTER.SOURCE(SUB1) with the LONGNAME compiler option, and then add it to the preallocated PDS (or PDSE) data set WALTER.SOURCE.LIB, use the following JCL. If this is the first time the object library utility has been used to add an object module to WALTER.SOURCE.LIB, then the Basic and Enhanced Directory members will be created in this data set. If they already exist in this data set, then they will be updated to include the information for the object module created during the compilation.
//COMPILE EXEC EDCCLIB,INFILE='WALTER.SOURCE(SUB1)',CPARM='LO',
//      LIBRARY='WALTER.SOURCE.LIB',MEMBER='SUB1'
If you request a map for the library WALTER.SOURCE.LIB, use the following:
//OBJLIB EXEC EDCLIB,OPARM='MAP',LIBRARY='WALTER.SOURCE.LIB'

For z/OS XL C++, use the EDCLIB cataloged procedure. You can specify commands for the object library utility step on the OPARM parameter. You can specify options for the object library utility step. These options can generate a library directory, add members or delete members of a directory, or generate a map of library members and defined external symbols. This topic shows you how to specify these options under z/OS batch.

Example: The following example creates a new object library utility directory. If the directory already exists, it is updated.
   //DIRDIR   EXEC EDCLIB,
   //         LIBRARY='LUCKY13.CXX.OBJMATH',
   //         OPARM='DIR'
Example: To create a listing of all the object files (members) in an object library utility directory:
   //MAPDIR   EXEC EDCLIB,
   //         LIBRARY='LUCKY13.CXX.OBJMATH',
   //         OPARM='MAP'

To add new members to an object library, use the ADD option to update the directory.

Example: To add a new member named MA191:
   //ADDDIR   EXEC EDCLIB,
   //         LIBRARY='LUCKY13.CXX.OBJMATH',
   //         OPARM='ADD MA191',
   //         OBJECT='DSNAME=LUCKY13.CXX.OBJ(OBJ191),DISP=SHR'

To delete a member from an object library, use the DEL option to keep the directory up to date.

Example: To delete a member named OLDMEM:
   //DELDIR   EXEC EDCLIB,
   //         LIBRARY='LUCKY13.CXX.OBJMATH',
   //         OPARM='DEL OLDMEM'