COBOL Manual for TNS and TNS/R Programs
Creating and Compiling HP COBOL Source
Programs
HP COBOL Manual for TNS and TNS/R Programs—522555-006
22-7
EDIT Editor
EDIT Editor
The EDIT editor is not as powerful as the TEDIT editor, but it has some useful abilities
that TEDIT either lacks or does not perform as simply. Examples of both cases are in
this explanation.
To call the EDIT editor, type its name at the TACL prompt (case is unimportant):
93> EDIT
The EDIT editor identifies itself (including version and RVU date) and prompts you with
an asterisk:
TEXT EDITOR - T9601D10 - (08JUN92)
*
To retrieve an EDIT file to work on (in this example, PAYROLS), use the GET
command:
*GET PAYROLS
CURRENT FILE IS \NODE1.$VOL3.SUBVOL2.PAYROLS
You can also call the EDIT editor with a file name:
94> EDIT PAYROLS
TEXT EDITOR - T9601D10 - (08JUN92)
CURRENT FILE IS \NODE1.$VOL3.SUBVOL2.PAYROLS
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
Caution. The EDIT editor works on your original file, not on a copy of it. If you want to provide
for the possibility of discarding an entire editing session, you must make a backup copy
yourself; that is, the EDIT editor does not automatically create a backup file. You can make the
backup copy with the EDIT command PUT.