The ESERV Command

The CMS/DOS ESERV command is actually an exec procedure that calls the VSE ESERV utility program. To use the ESERV program, you first must IPL CMS with a CMSBAM DCSS (shared segment), then create a file with a file type of ESERV that contains the ESERV control statements you want to execute.

For example, if you want to write a de-edited copy of the macro DTFCD onto your A-disk, you might create a file named DTFCD ESERV, with the record:
PUNCH E.DTFCD
Just as when you submit ESERV jobs in DOS, column 1 must be blank.

Before executing the ESERV program, you must enter the CMS/DOS environment by specifying the SET DOS ON command using a VSE system residence volume. This is necessary because the ESERV procedure invokes the ESERV program directly from the VSE core image library.

Then, you must assign SYSIN to the device on which the ESERV source file resides, usually your A-disk:
assgn sysin a
Then you can enter the ESERV command specifying the file name of the ESERV file:
eserv dtfcd
No other ASSGN commands are required. The CMS/DOS ESERV EXEC makes default assignments for SYSPCH and SYSLST to disk.
To copy and de-edit macros from a private E sublibrary, issue the ASSGN and DLBL commands to identify the library. For example, to identify a source statement library named TEST.MACROS on the DOS disk accessed as the C-disk, enter:
assgn sysslb c
dlbl ijsyssl c dsn test.macros (sysslb
The SYSLST output is contained in a CMS file with the same file name as the ESERV file and a file type of LISTING. You must examine the LISTING file to see if the ESERV program executed successfully.

The SYSPCH output is contained in a file with the same name as the ESERV file and a file type of MACRO. If you want to punch ESERV output to your virtual card punch, make an assignment of SYSPCH to PUNCH.

When you use the PUNCH or DSPCH ESERV control statements, CATAL.S, END, or /* records may be inserted in the output file. When you use the MACLIB command to add the MACRO file to a CMS macro library, these statements are ignored.

See Using Macro Libraries for information on creating and manipulating CMS macro libraries.