Your Browser is not longer supported

Please use Google Chrome, Mozilla Firefox or Microsoft Edge to view the page correctly
Loading...

{{viewport.spaceProperty.prod}}

edt - screen-oriented editor EDT (BS2000)

&pagelevel(4)&pagelevel

edt calls the BS2000 file editor EDT, see the “EDT (BS2000) Statements" [7] manual.

EDT V17.0 and higher is called in compatibility mode. edt is the editor for block-mode terminals. The edtu command is available to call EDT in Unicode mode. If you are working with character-mode terminals, you can use ex or vi for example. You can use this command and the EDT functions to copy files from the POSIX file system to the BS2000 and vice versa.


Syntax


edt[ -k][ -i index] file

-k

Prior to editing, the file contents are converted from ASCII to EBCDIC code. Before being written back to the file, the contents are recoded to ASCII. You can use this option if you wish to use edt to process an ASCII-coded file.

-i index

This option is required if files containing more than 9999 lines have to be read. The product <index> * 0.0001 gives the number of the first line and the step size used between line numbers. If there is no <index> specification then <index>=10000, i.e. the number of the first line and the step size value are both 1. Within EDT itself, the EDT statement renumber can be used to perform renumbering.

file

File name of the POSIX file. You may specify one file only. If the specified file does not yet exist, the empty work file 0 is opened.

Hint

EDT can create, read in, copy, write back and close POSIX files. The @XOPEN, @XCOPY, @XWRITE and @CLOSE statements are available for this purpose (see the "EDT (BS2000) Statements" [7] manual).

To write the opened POSIX file back to the BS2000 file system, use the EDT statement @write’<filename>’ when in EDT level 0.

You can terminate EDT with @HALT (write the opened POSIX file back to the POSIX file system in interactive mode) or @RETURN (unconditionally write the opened POSIX file back to the POSIX file system in interactive mode). Use @WRITE at EDT level 0 to write an opened UFS file back (to UFS).

Blank lines in the file are displayed as lines with a length of 1 (the character X'0D'). They are subsequently converted back to blank lines on saving the file.

The tab character ('\t') is not expanded to the corresponding number of spaces.

The edt command cannot be used in a pipe.

Error

edt cannot be used within a pipe

The edt command was incorrectly used in a pipe.


edt cannot be used within a forked process

The edt command was entered in a subshell. This is not allowed.


edt: file file open for read failed

You do not possess read permission for file.


*** read only *** in the edt message line

The file which you wish to edit is write-protected.


edt: file file open for write failed, permission denied

You do not have write permission. The following messages are then displayed:

edt: edited file(s) not saved!

edt: terminate edt? reply (y=yes; n=no)?


edt: file file open for write failed, no such file or directory

The path does not exist. The following messages are then displayed:

edt: edited file(s) not saved!

edt: terminate edt? reply (y=yes; n=no)?


edt: file file write: UFS file system failed, no space

Not enough space in the POSIX file system to write the file. The following messages are then displayed:

edt: edited file(s) not saved!

edt: terminate edt? reply (y=yes; n=no)?


If, for the reasons above, the file cannot be written, the user may stay in EDT and take the necessary action to save the file, for example change the write permission or use @WRITE’file to save the file.

Example

The POSIX file /usr/home/file.pos is to be saved in the BS2000 file system as the BS2000 file file.bs2.

$ edt /usr/home/file.pos

.....

@WRITE 'file.bs2'   (EDT statement)

.....