4. EXEC $ESERV SSTACK SPACE ASSGN SYSIN A ASSGN SYSLST PRINTER ASSGN SYSPCH PUNCH CP SPOOL D TO * &CONTROL ALL -GETNEXT SCONTINUE SREAD ARGS 5. &IF S2 NE E SGOTO -STAKTST 6. SSTACK LIFO FILE SSTACK LIFO C 1$1 1 4 SSTACK LIFO TOP &STACK LIFO I $DSPCH &3
EDIT &3ESERV 7. EXEC ESERV &3 ERASE S3 ESERV 8. READ &3 MACRO SSTACK LIFO FILE SST ACK LIFO DEL SST ACK LIFO BO SSTACK LIFO DEL SSTACK LIFO L ICATALS/ EDIT S3 MACRO SIF &GENSWT NE 0 &GOTO -KACADD SGENSWT = 1 MACLIB GEN SLIB S3 ERASE S3 MACRO &GOTO -STAKTST -MACADD &CONTINUE 9. MACLIB ADD SLIB &3 ERASE &3 MACRO SIF &READFLAG EQ STACK &GOTO -GETNEXT -FINALE &CONTINUE &STACK QUIT SBEGTYPE THE MACLIB &LIB HAS BEEN CREATED AND THE FOLLOWING IS A MAP OF THE LIBRARY SEND &STACK MACLIB MAP &LIB ( TERM &EXIT -STAKTST &CONTINUE &IF &READFLAG EQ STACK &GOTO -GETNEXT &GOTO -FIN ALE
The following notes refer to the sampleEXEC procedure shown above.
1. The output of theDSERV command is spooled to your virtual card
reader and is read in as$ESER EXEC. 2. The $ESER EXEC file is copied, edited, and formatted as a CMS EXEC file. All DSERV header and trailer lines are deleted.
3. If you wish to delete any of the generatedESERV commands, enter
any nonblank character. If you do not wish to delete anyESERV commands (or after you have deleted them), enter a null line.
4.Stack the remaining lines of the $ESERV EXEC in the console stack. 5. Read a line from the console stack and check that the first letter
begins with E (forESERV). If not an E, ignore the line and read
the next one.
6. If it is an E, create aDSPCH fn for this macro. Note.;,. PUNCH or DSPLY may be substituted for DSPCH. Appendix G: Sample EXEC Procedure for Copying DOS/VS Macros 445
EDIT &3
The following notes refer to the sample
1. The output of the
reader and is read in as
3. If you wish to delete any of the generated
any nonblank character. If you do not wish to delete any
4.
begins with E (for
the next one.
6. If it is an E, create a