Your Browser is not longer supported

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

{{viewport.spaceProperty.prod}}

@AUTOSAVE - Automatic saving

&pagelevel(3)&pagelevel

The @AUTOSAVE statement activates the automatic time-controlled saving of work files.

Operation

Operands

F mode / L mode

@AUTOSAVE

{ [ID=name] [ [,] TIME=n] [ ON ] | OFF}

name

Freely selectable identifier for the autosave files which is included in the
names assigned to the autosave files (default value: EDT).

n

Time interval in minutes(0..255) between a manual or automatic save and
the next automatic save (default value: 5).

If TIME=0 then a save is performed after every dialog step.

ON

OFF

Automatic saving is activated (default value).

Automatic saving is deactivated. All the autosave files are deleted.

The @AUTOSAVE statement is only effective in interactive mode, i.e. data is only saved in interactive mode. The statement is ignored in batch mode and no message is issued.

When an EDT session starts, the autosave function is deactivated.

Under certain circumstances, it may not be possible to save very long records (close to 32768). In such cases, the maximum possible length of the record in question is saved and the warning EDT2405 is issued.

A save operation is performed each time the autosave function is activated or after every dialog step, i.e. before the next prompt, if the autosave function is activated and the time defined when it was activated has elapsed since the last automatic save. All non-empty work files whose content is not already present as a disk file (either explicitly created by the user or created by the autosave function in the form of an autosave file) are saved. ISAM files opened for real processing are not saved.

The names of the autosave files are formed as follows:

S.name.yyyy-mm-dd.hhmmss.SAVEnn

The specification yyyy-mm-dd.hhmmss is the point in time at which the autosave function was activated. The specification nn is the number of the current work file.

An associated autosave file is deleted, if:

  • the work file no longer contains any records, (e.g. @DELETE)

  • the contents of the file have been explicitly saved as a file or library element. The possible statements are: @WRITE, @SAVE, @XWRITE and @CLOSE.

All the autosave files are deleted when the statement @AUTOSAVE OFF is issued, when the EDT session is terminated with one of the statements @HALT, @END, @EXEC or @LOAD or when control returns to the main program.

The save files are not deleted on abnormal termination or if EDT is exited with or the @SYSTEM statement without a return.

Note

The content and character set of an individual work file can be restored by issuing the following statement in an empty work file.

@COPY FILE=S.name.yyyy-mm-dd.hhmmss.SAVEnn,KEY=LINENUMBER