If this EXEC is named EDEX, and you invoke it with:
edexfrOl the BDIT subcommands are stacked in the order they appear in the EXEC. The EDIT command is invoked to edit the file FROl DATA, and the EDIT
subcommands are read from the stack and executed.When the stack is eapty, your virtual machine is in the edit environment in input mode,
and the first line you enter replaces the existing line that contains
the character string xx.
Note that all of the EDIT subcommands in the example, except for theREPLACE subcommand, are stacked within an SBBGSTACK stack, and that the REPLACE subcommand is stacked with SSTACK. If you are creating EXEC files with fixed-length records, you must use SSTACK to stack the INPUT and REPLACE subcommands. If you use SBEGSTACK, then the INPUT and
REPLACE subcommands are treated as if they contain text data, and so
insert or replace one line in the file (a line of This is not
true, however, for variable-lengthEXEC files.
Similarly, if you want to stack a null line, to change from inputmode to edit mode in an EXEC, you must use the SSTACK statement with no
other data on the line (in both fixed-and variable-lengthEXEC files),
for example:SSTACK INPUT SBEGSTACK ••• data line ••• data line ••• data line SEND SSTACK SSTACK FILE
EDITSl S2 SEXIT When this EXEC is invoked with a filename and filetype as arguments, the INPUT subcommand, data lines, null line, and FILE subcommand are placed
in the stack before the EDIT command is issued. The data lines are
placed in the specified file and the file is written onto disk before
theEXEC returns control to CMS. STACKING LINES FOR EXEC TO READ
Lines in the console stack canbe read by the FXEC interpreter with an SREAD control statement; for example: -SETUP SLOOP 3 SNUft = 50 SSTACK SNUM SCHAR SNUft = SlUM + 1 SCHAR = SCONCAT SSTRNG SNU8 -READ SLOOP -FINIS SREADFLAG EQ CONSOLE SREAD ARGS -FINIS
edex
subcommands are read from the stack and executed.
and the first line you enter replaces the existing line that contains
the character string xx.
Note that all of the EDIT subcommands in the example, except for the
REPLACE subcommands are treated as if they contain text data, and so
insert or replace one line in the file (a line of
true, however, for variable-length
Similarly, if you want to stack a null line, to change from input
other data on the line (in both fixed-and variable-length
for example:
EDIT
in the stack before the EDIT command is issued. The data lines are
placed in the specified file and the file is written onto disk before
the
Lines in the console stack can