SAVERECOVERYNAME (SRN)
Syntax
![]()
Command
Mandatory parameter Optional parameter Mandatory keyword Optional keyword |
SAVERECOVERYNAME ([<Time>][, FREEOUTPUT | NOFREEOUTPUT])
Description
Creates a save point during the running of a report in the following way:
- A database commit is performed
- All files so far created are saved
- All the print outputs so far created by the report are saved.
- The variable set in the Report option 'Recovery name def.' is saved.
When a report crashes the AMT runtime environment automatically restarts the
report for recovery.
Note: When an Abort is used in
combination with a Saverecoveryname but without the 'Restart' keyword, a manual restart is needed.
Diagram
Returned value type
None
Parameters
Parameter | Description |
<Time> | Number of seconds to suspend execution. |
FREEOUTPUT| NOFREEOUTPUT |
FREEOUTPUT will release the printed output at recovery time, NOFREEOUTPUT will suppress the printed
output at recovery time. When in the Application Options in the field 'Application Origin' Unix is specified, the command will default to NOFREEOUTPUT. For all other operating systems the default is FREEOUTPUT. |
Remarks
Saverecoveryname can only be used in the Main routine of a Report and may not be used inside table queries, cursor queries, stored procedures, for loops and foreach loops. It can however be used in simple loops, while loops and if statements.
The automatic restarts of the reports goes up to a maximum of five restarts of the same report.
In the restart process the system item SI-RECOVER is set to True. The report then starts at the save point of the last database commit that was successful. The files and prints are also recovered.
The query variables are not automatically restored, so any records from table that are assumed to be currently available in memory need to be explicitly re-read by the report.
The usage of the option NOFREEOUTPUT is only allowed in Text Reports.
When 'Application Origin' is set to Unix the adding of the option FREEOUTPUT in Graphical Reports is mandatory
Examples
srn (1)
saverecoveryname (10, nofreeoutput)