COBOL Manual for TNS/E Programs (H06.03+)
Creating and Compiling HP COBOL Source
Programs
HP COBOL Manual for TNS/E Programs—520347-003
22-7
EDIT Editor
To retrieve lines from a non-EDIT file (in this example, PAYROLXX) and put them into
an EDIT file (in this example, PAYROLS), use the GET and PUT commands together:
*GET PAYROLXX PUT PAYROLS
(With the TEDIT editor, you cannot combine the GET and PUT commands.)
If the file PAYROLS already exists, the EDIT editor asks you whether it should purge
the old PAYROLS (that is, overwrite its current text with the new text from PAYROLXX,
keeping the name PAYROLS for the file):
*GET PAYROLXX PUT PAYROLS
SHALL I PURGE THE OLD \NODE1.$VOL3.SUBVOL2.PAYROLS?
If you tell the EDIT editor not to delete PAYROLS, the EDIT editor asks you for a new
name for the EDIT file:
SHALL I PURGE THE OLD \NODE1.$VOL3.SUBVOL2.PAYROLS? NO
NAME THE NEW FILE: PAYROLS2
CURRENT FILE IS \NODE1.$VOL3.SUBVOL2.PAYROLS2
If you are sure that you want to overwrite PAYROLS, you can avoid the question-and-
answer routine by following PAYROLS with an exclamation mark:
*GET PAYROLXX PUT PAYROLS!
CURRENT FILE IS \NODE1.$VOL3.SUBVOL2.PAYROLS
Another convenience the EDIT editor provides that the TEDIT editor lacks is the ability
to list all lines that contain two or more combinations of text characters in any order.
Although the TEDIT editor has some powerful pattern-matching abilities, it is much
easier to find all lines containing both ABC and XYZ, in any order, using the EDIT
editor.
The EDIT editor has a line editor and a full-screen editor. The full-screen editor is
named VS. If VS terminates abnormally, it creates a recovery file whose name is of the
form ZZVSnnnn (where nnnn is a four-digit number chosen by VS to make a unique
file name). To detect these ZZVSnnnn files, use the TACL command FILES. Purge
any ZZVSnnnn files that you do not need.
To exit the EDIT editor, type “exit” in response to the asterisk prompt (case is
unimportant):
*EXIT
95>
For complete information about the EDIT editor, see the EDIT User’s Guide and
Reference Manual.










