Creating the DOSMAC EXEC Procedure
Issue the following command to create a EXEC procedure called DOSMAC EXEC: EDIT DOSMAC EXEC Enter the INPUT subcommand to get into input mode and key in the
following lines. Do not key in the numbers along the left side of
the following example. The numbers refer to notes of explanation that
follow the example.
&C ONT ROL OFF &GENSWT = 0 CP PURGE RDR ALL CP 9 * CLASS A STYPE ENTER THE ADDRESS OF YOUR SYSRES VOLUME ( DEFAULT = 350 )
&READ ARGS EQ 0 ACCESS 350 Z &IF &INDEX NE 0 ACCESS &1 Z SET DOS ON Z (VSAM &TYPE IF YOU WISH TO ASSGN AND DLBL A PRIVATE SOURCE STATEMNT LIBRARY &TYPE NOW IS THE TIME ( ENTER YOUR ASSGN ). IF YOU DO NOT ENTER A NULL LI
&READ &TYPE A DLBL IS ALSO REQUIRED FOR SSL &READ -MACGEN &CONTINUE &TYPE ENTER THE NAME OF THE MACLIB TO BE CREATED THE DEFAULT IS DOSMAC &READ ARGS &IF tINDEX EQ 0 &LIB = DOSMAC &IF &INDEX NE 0 &LIB = &1
1. CP SPOOL CONS START NOTERM DSERV SD ( TERM CP SPOOL CONS STOP TERM CP CLOSE 9
READ $ESER EXEC 2. COPYFILE $ESER EXEC A $ESERV EXEC A ( LRECL 80 REPLACE &BEGSTACK DEL Q
F CP DEL 5 TOP C / /&1 &2/*
FILE
&END EDIT $ESERV EXEC ERASE $ESER EXEC -STACKER &CONTINUE &BEGTYPE 3. IF YOU WISH TO ALTER THE LIST OF MACROS NOW IS THE TIME TO DO SO YOU MAY BYPASS ALTERATION BY ENTERING A NULL LINE OR ELSE ENTER A NON-BLANK CHARACTER TO BEGIN ALTERATION ALTERATION IS ACCOMPLISHED VIA EDIT'ING THE EXEC FILE CONTAINING THE KACR( YOU MUST ISSUE THE EDIT SUBCOMMAND FILE TO RE-ENTER THIS EXEC AND CONTINUl &END
&READ ARGS &IF &INDEX NE 0 EDIT $ESERV EXEC &CONTROL ALL UUU IBM VM/37Q Planning and System Generation Guide
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 &3 ESERV 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 sample EXEC procedure shown above.
1. The output of the DSERV 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 generated ESERV commands, enter
any nonblank character. If you do not wish to delete any ESERV 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 (for ESERV). If not an E, ignore the line and read
the next one.
6. If it is an E, create a DSPCH fn for this macro. Note.;,. PUNCH or DSPLY may be substituted for DSPCH. Appendix G: Sample EXEC Procedure for Copying DOS/VS Macros 445
Previous Page Next Page