Version 4.2.6 for Mainframes (Update)
 —  Operations  —

Natural Scratch-Pad File

This document provides information on purpose, use and maintenance of a Natural scratch-pad file.

The following topics are covered:


Purpose of a Natural Scratch-Pad File

What is it, what does it do?

The scratch-pad file is just another Natural system file like FNAT and FUSER, and has the same physical file layout. It enables the storage of, for example, saved screen images and other types, data which are not stored explicitly like Natural sources, objects (SAVE, CATALOG, STOW) and error messages, on a file other than the system file FNAT or FUSER.

When do I need it?

In contrast to FNAT and FUSER, a scratch-pad file is not mandatory in a Natural session.

However, if you are working with read-only access to system files (profile parameter ROSY=ON), you must define a scratch-pad file, because otherwise the above mentioned data could not be stored and a corresponding error message (NAT0106) would be issued instead. The scratch-pad file is excluded from read-only access.

Top of page

How to Define a Scratch-Pad File

Like all other system files of Software AG products, the scratch-pad file is a logical file. The logical file number of the scratch-pad file is 212.

Since there is no mnemonic for the scratch-pad file such as FNAT and FUSER or FDIC, it has to be defined:

Examples of NTLFILE and LFILE definition:

LFILE Parameter:

LFILE=(212,physical-dbid,physical-fnr,password,cipher-key)

NTLFILE Macro:

NTLFILE 212,physical-dbid,physical-fnr,password,cipher-key 

Top of page

What is Stored on the Scratch-Pad File and How to Size it

The objects that are stored on the scratch-pad file are:

As the amount of usage of the Recording Utility and the NATPAGE utility cannot be calculated beforehand, a reasonable estimate about the related storage requirements is hardly possible. However, the scratch-pad file size required at your site can be estimated with a better understanding of the types of records that are stored on it.

Recordings

The Recording Utility is activated using terminal commands as described in the Utilities documentation. Recordings are stored like Natural source programs (or other object types). The size of a recording depends on how many screen inputs have been done during a recording session. Recordings are like programs related to a library.

Currently, it is not possible to list recordings on the scratch-pad file by using the Natural LIST system command. SYSMAIN can be used, though, to list and maintain the recordings stored on the scratch-pad file. To store the recordings on the FNAT/FUSER file instead of on the scratch-pad file, set the profile parameter RFILE.

Recordings which are being stored on the system file FNAT or FUSER are affected (interrupted) by transaction backouts (BTs) which are issued in the user's application programs. This is a very common problem encountered by users of the recording facility and it can be avoided by using the scratch-pad file.

Screen Captures - NATPAGE

The screen paging utility NATPAGE can be used to store screen images (in chronological sequence of their appearance) on the scratch-pad file. NATPAGE can be activated with the terminal command %P. From the moment %P is issued, all screens presented to the end user are stored onto the scratch-pad file (if it has been defined for your session) until the terminal command %O is entered. The captured screens can be displayed using the terminal command %E.

For each screen image, the current content of the page buffer and the page attribute buffer is stored. This means that the amount of data being stored depends on the settings of the profile parameters PS/LS for the session and, of course, on the number of screen images. The number of possible screens per user session depends on the profile parameter PD (default is 50; valid values are 0-255).

The size of the page buffer can be calculated as:

PS * LS

The size of the page attribute buffer is determined dynamically.

Top of page

Scratch-Pad File Maintenance

The scratch-pad file does not need any maintenance, provided it is of sufficient size.

Space on the scratch-pad file can be reclaimed by refreshing it with Adabas utilities in times of non-activity without affecting subsequent Natural sessions which are using the scratch-pad file.

Top of page