COBOL Manual for TNS/E Programs (H06.08+, J06.03+)

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.
TEDIT Editor
The TEDIT editor is a full-screen editor with a command line. Overall, the TEDIT editor is more
powerful than the EDIT editor. The TEDIT commands SEARCH and REPLACE have powerful
pattern-matching abilities, with single-character, multicharacter, and set-of-characters wild cards.
CAUTION: The TEDIT 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.
You can make the backup copy before editing the file, with the File Utility Program (FUP) DUP
command, or you can use the WRITE command from within the TEDIT editor to make a copy at
any time.
To call the TEDIT editor, type its name at the TACL prompt (case is unimportant):
81> TEDIT
The TEDIT editor clears the screen and displays a help screen that explains its function. At the
bottom of the help screen, it asks you for a file name:
(To EXIT press CTRL-Y) File: PAYROLS
You can also call the TEDIT editor with a file name:
82> TEDIT PAYROLS
Creating or Altering an HP COBOL Source Program 749