%% and %. - Interrupt Current Operation

%%

%.

These terminal commands can be used to interrupt the current operation.

This document covers the following topics:

Note:
The terminal commands %% and %. will be ignored if the profile parameter ESCAPE is set to OFF.


%% in Online Mode

If you enter %% in any field on the screen, the currently active Natural program will be terminated immediately and Natural will return to command input mode. If you enter %% in command input mode, the Natural session will terminated.

%% has the following effects:

  • The contents of the Natural stack will be deleted.

  • Any logical database transaction currently being processed is backed out.

  • The source program currently in the work area of the editor will not be affected.

Note:
If you have specified a special character other than the percent sign (%) with the Natural profile and session parameter CF, you may also enter the specified character two times consecutively.

%% in Batch Mode

In batch mode, %% may be used to set restart points in the input files and thus ensure the synchronisation of the input files in the case of an error.

Influence of Profile Parameter CC

Command Function
CC=ON If the Natural profile parameter CC is set and an error occurs during the compilation/execution of a Natural program in batch mode, the input data stream for the SYNIN and OBJIN input files will be flushed until a line containing %% in the first two positions is encountered (if no %% is encountered, it will be flushed until the end-of-file is reached). In addition, the contents of the Natural stack will be deleted.

If more data are available in the input stream, Natural resumes processing with the line after %%.

CC=OFF Any %% in the input data will be ignored.

%. in Online Mode

Online, %. is the same as %%, except that the Natural stack is not deleted.

%. in Batch Mode

In batch mode, %. causes reading of input values for the current INPUT statement to be terminated.