An  Annotated  Edit  Macro  
The edit macro shown below,$DOUBLE,   can  be  used  to  double  space  a  C!S   file.  Regardless  of  where  the  current  line  pointer  is,  a  blank  line  is  
inserted in the file following every existing line. The statements in
the edit macro are separated into groups; the number to the left of a
statement or group of statements indicates an explanatory note. The
numbers are not part of the EIEC file.
1&CONTROL   OFF   2  &IF  &INDEI  1  &IF  &1  =  ?  &GOTO   -TELL  
3 &IF &INDEI =
1 &IF &1 =TWO   &GOTO   -LOOP   4  &IF  &INDEI  NE  o  &GOTO   -TELL  
5 &IF &READFLAG EQSTACK   &READ  VARS   &GARB  
6&STACK   &STACK   PRESERVE   &STACK   VERIFY   OFF   7  &STACK   BOTTOM   &STACK   I  IIIIXXII   &STACK   TOP   Notes:  
-1---The&CONTROL   statement  suppresses  the  display  of  CMS   coamands,  in  
2
3
4
5
6
7
this case, theDESBUF   command.  
The first &IF checks that there is only one operand passed in the$DOUBLE   command.  The  second  &IF  checks  whether  $DOUBLE   has  been  
invoked with a question mark (1). If both &IFs are true, control
is passed to the statement at the label -TELL.&TYPE   control  
statements at -TELL explains what the macro does.
The second &IF statement checks whether$DOUBLE   has  been  invoked  
with the argumentTWO,   which  indicates  that  the  macro  has  executed  
itself, so the subcommands that initialize the file are stacked
only once.
There are threeways   to  properly  invoke  this  edit  macro:  with  a  1,  
with the argumentTWO,   or  with  no  arguments.  The  third  &IF  
statement checks for the (no arguments) condition; if theaacro   is  
invoked any otherway,   control  is  passed  to  the  label  -TELL,  which  
explains the macro usage.
The &READFLAG special variable is checked. If$DOUBLE   is  executed  
at the top or at the end of the file, the tokenTOF   or  EOF   is  in  
the stack, and should be read out.
A null line is placed in the console stack for loop control (see
Note 9.) ThePRESERVE   and  VERIFY   subcommands  are  stacked  so  that  
the editor does not display each line in the file as it executes
the stacked subcommands.
TheBOTTOM,   INPUT,   and  
placing a marker at the
the current line pointerTOP   subcommands  initialize  the  file  by  
bottom of the file, and then positioning
at the top of
318IBM   VM/370   CMS   User's   Guide  
The edit macro shown below,
inserted in the file following every existing line. The statements in
the edit macro are separated into groups; the number to the left of a
statement or group of statements indicates an explanatory note. The
numbers are not part of the EIEC file.
1
3 &IF &INDEI =
1 &IF &1 =
5 &IF &READFLAG EQ
6
-1---The
2
3
4
5
6
7
this case, the
The first &IF checks that there is only one operand passed in the
invoked with a question mark (1). If both &IFs are true, control
is passed to the statement at the label -TELL.
statements at -TELL explains what the macro does.
The second &IF statement checks whether
with the argument
itself, so the subcommands that initialize the file are stacked
only once.
There are three
with the argument
statement checks for the (no arguments) condition; if the
invoked any other
explains the macro usage.
The &READFLAG special variable is checked. If
at the top or at the end of the file, the token
the stack, and should be read out.
A null line is placed in the console stack for loop control (see
Note 9.) The
the editor does not display each line in the file as it executes
the stacked subcommands.
The
placing a marker at the
the current line pointer
bottom of the file, and then positioning
at the top of
318
 
             
            











































































































































































































































































































































































































































































































