Adding definitions to a macro library
You can add macro definitions, and members containing assembler
source statements that can be read by a COPY instruction, to a macro
library. Use the LIBR utility program for this purpose. Details of
this program and its control statements are contained in the applicable System
control statements publication. The following example adds a new
macro definition, NEWMAC, to the system library, PRD2.PROD.
// JOB CATMAC
// EXEC LIBR
ACCESS SUBLIB=PRD2.PROD
CATALOG NEWMAC.A REPLACE=YES
MACRO
NEWMAC &OP1,&OP2
LCLA &PAR1,&PAR2
⋮
MEND
/+
/*
The ACCESS statement specifies the sublibrary into which the macro is cataloged. The CATALOG statement specifies the member name and member type. REPLACE=YES indicates that the member is replaced if it already exists.