l!Q! To stack a null line in an edit macro, to cause the editor to leave input mode, you must use the SSTACK control statement with no other tokens, as follows: SSTACK If you want to use the CHANGE, DSTRING, or LOCATE subcommands in an EXEC, you must take into account that when you stack any of these subcoamands using the SSTICK control statement, all
of the character strings on the line are truncated or padded to eight
characters. Also, if you want to use a variable value for a character
string, you are limited to eight characters, all uppercase.
For example, if a
delete the line on
variable symbol: SSTACK LOCATE /Sl SSTACK DEL macro is used to locate a character string and
which it appears, the LOCATE subcommand has a Q!ER1!!: The TABSET and OVERLAY subcommands allow you to
set margins and column stops for records in a file and to overlay
character strings in particular positions. For example, the following macro places a vertical bar in columns 1, 15, 40, and 60 for all records
in the file from the current line to the end of the file: SBEGSTACK PRESERVE Il!AGE ON TABSET 1 15 40 60 REPEAT *
o 1->1->1->1 RESTORE SEND In the (X'05'). above example, the "-)" symbol represents a tab character
To create this EXEC, you can either issue the EDIT subcommand:
image off
and use the Tab key (or equivalent) on your terminal when you enter the
line, or you can enter some other character and use the ALTER subcommand
to alter that character to a X·05'. If you want to overlay only one character string in a particular
position in a file, you can use the TABSET subcommand to set that coluan position as the left margin, and then use the OVERLAY subcommand, as
follows: SCONTROL OFF SBEGSTACK PRESERVE VERIFY OFF TRUNC * TABS 72 SEND SSTACK REPEAT Sl SBEGSTACK OVERLAY C RESTORE SEND 316 IBM VM/310 CMS User's Guide
If you name this file $CONT EXEC, and if you invoke it with the line:
$cont 3
then the OVERLAY subcoamand is executed on three successive lines, to
place the continuation character "C" in column 72.
THE STACK SUBCOMMAND The STACK subcomaand allows you to stack up to 25 lines fro. a file in
the console stack. The lines are not deleted from the file, but the line
pointer is moved to point to the last line stacked. You can also use the STACK subcommand to stack EDIT subcommands. You might do this if there were subcommands that you wanted to place in the
stack to execute after all the subcommands stacked by the EXEC had
executed.
These techniques are used in the two edit macros that are distributed
with the VM/370 systea: $MOVE and $DUP. If you want to examine these
files for examples of how to use the STACK subcommand, you can display
the files by entering, from the CMS environment:
type $move exec *
type $dup exec *
An additional use of the STACK subcommand is shown in "An Annotated
Edit Macro." Section 17. Writing Edit Macros 317
Previous Page Next Page