Under batch

Under MVS™ batch, the following cataloged procedures include an Object Library Utility step:
EDCLIB
Maintain an object library.
EDCCLIB
Compile and maintain an object library.

For more information about the data sets used with the Object Library Utility, see z/OS XL C/C++ User's Guide.

You can specify options for the Object Library Utility step that generate a library directory, add 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 MVS batch.

To compile the C program WALTER.SOURCE(SUB1) for L-names and add to WALTER.SOURCE.OBJ(SUB1), use the following JCL. The Object Library Utility directory for the library, WALTER.SOURCE.OBJ, is updated in the process.
//COMPILE EXEC EDCCLIB,INFILE='WALTER.SOURCE(SUB1)',CPARM='LO',
//      LIBRARY='WALTER.SOURCE.OBJ',MEMBER='SUB1'
To request a map for the library WALTER.SOURCE.OBJ, use:
//OBJLIB EXEC EDCLIB,OPARM='MAP',LIBRARY='WALTER.SOURCE.OBJ'
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'
To create a map:
//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. For example, to add a new member named MA191, code:
//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. For example, to delete a member named OLDMEM, code:
//DELDIR   EXEC EDCLIB,
//         LIBRARY='LUCKY13.CXX.OBJMATH',
//         OPARM='DEL OLDMEM'