beautypg.com

HP NonStop G-Series User Manual

Page 145

background image

GET Command

EDIT Command Summary

4–66

058061 Tandem Computers Incorporated

5.

If the current file is MAX, the commands NUMBER and GET:

*NUMBER ALL

*GET SMITH 55/66 TO 0

LAST NEW LINE IS .92 <- 66

CURRENT FILE IS $WORK.FICTION.MAX

*

renumbers lines in MAX making the first line in the file line number 1,
then copies lines 55 through 66 of SMITH into MAX starting at line
number 0 (that is, copies SMITH to the beginning of MAX).

For a specific example of renumbering the lines of a file when adding a
large number of lines with a GET command, see Section 3,
“Renumbering to Accommodate Added Lines.”

Using GET With a Nondisk Device or Non-EDIT-Format File

EDIT assumes that

filename1

contains sequential records; the number of

characters in each record is set by the INLEN option of the SET command.
(The default setting of INLEN is 132. If the setting of INLEN is not sufficient
to read an entire physical record, a file management error 21—illegal count
specified—occurs and the EDIT program terminates abnormally.) EDIT
reads records sequentially from

filename1

until it encounters the physical

end-of-file.

1.

This example illustrates using a magnetic tape unit to create a new
current file.

*SET INLEN 100

*GET $TAPE PUT BOOK

*

EDIT reads 100-byte records from the nondisk device named $TAPE (a
magnetic tape unit) until an end-of-file mark is encountered. Each
record is assigned a line number (starting with 1, in increments of 1)
and put into an EDIT- format disk file called BOOK.

This manual is related to the following products: