The resulting file, OSMAC MACLIB Al, contains the members:
GET PUT TTIMER STIMER PUT REGEQU The PUT macro, which appears twice in the input to the command, also
appears twice in the output. The MACLIB command does not check for
duplicate macro names. If, at a later time, the PUT macro is requested
from OSMAC MACLIB, the first PUT macro encountered in the directory is
used. When COpy files are added to MACLIBs, the name of the library member is taken from the name of the COpy file, or from the *COPY statement, as
in the file TIME COPY, above. Note that although the file REGEQU COPY contained two macros, they were both included in the MACLIB with the
name REGEQU. When the input file is a MACRO file, the member name(s) are
taken from macro prototype statements in the MACRO file. The ADD function appends new members to an existing macro
library. For example, assume that OSMAC MACLIE A1 exists as created in
the example in the explanation of the GEN function and the file DCB COpy exists as follows: *COpy DCB DCB macro definition *COPY DCED
DCBD macro definition
If you issue the command:
maclib add osmac dcb
the resulting OSMAC MACLIB A1 contains the members: GET PUT TTIMER STIMER PUT REGEQU DCB DCBD The REP (replace) function deletes the directory entry for
the macro definition in the files specified. It then appends new macro definitions to the macro library and creates new directory entries. For
example, assume that a macro library MYMAC MACLIE contains the members
A, B, and C, and that the following command is entered:
maclib rep mymac a c
The files represented by file identifiers A MACRO and C MICRO each have
one macro definition. Ifter execution of the command, MYMIC MICLIB contains members with the same names as before, but the contents of I and C are different. The DEL (delete) function removes the specified macro name from the directory and cOmpresses the directory so there
are no unused entries. The macro definition still occupies space in the
library, but since no directory entry exists it cannot be accessed or
retrieved. If you attempt to delete a macro for which two macro
definitions exist in the macro library, only the first one encountered
is deleted. For example: maclib del osmac get put ttimer deb
138 IBM VM/370 eMS User·s Guide
March 30, 1979
deletes macro names GET, PUT, TTIMER, and DCE from the directory of the
macro library named OSMAC MACLIB. Assume that OSMAC exists as in the ADD function example. After the above command, OSMAC MACtIB contains the
following members: STIMER PUT REGEQU DCBD CaMP Function: Execution of a MACLIB command with the DEL or REP functionS--can leave unused space within a macro library. The CaMP (compress) function removes any macros that do not have directory
entries. This function uses a temporary file named MACLIB CMSUT1. For example, the command:
mac lib camp mymac
compresses the library MYMAC MACLIB. MAP Function: The MAP function creates a list containing the name of each-macro--in the directory, the size of the macro, and its position
within the macro library. If you want to display a list of the members
of a MACLIB at the terminal, enter the command:
maclib map mylib (term
The default option, DISK, creates a file on your A-disk, which
filetype of MAP and a filename corresponding to the filename MACLIB. If you specify the PRINT option, the list is spooled
virtual printer. !gte: TERM and PRINT options will erase the old MAP file.
has a
of the
to your
The following CMS commands have MEMBER options, which allow you to
reference individual members of a MACLIB: PRINT (to print a member) PUNCH (to punch a member) TYPE (to display a member) FILEDEF (to establish a file definition for a member) You can use the eMS editor to create MACRO and COpy use the MACLIB command to place the files in a library.
in a library, you can erase the original files.
files and then Once they are
To extract a member from a macro library, you can use either the PUNCH or the MOVEFILE command. If you use the PUNCH command you can
spool your virtual card punch to your own virtual reader:
cp spool punch to *
Then punch the member:
punch testmac maclib (member get noheader
and read it back onto disk:
readcard get macro
Section 8. Developing OS programs Under eMS 139
Previous Page Next Page