

Designing Dialogs › Design Considerations › Scratch Records
Scratch Records
Scratch records are shared between tasks and saved across the transactions of a CA ADS application. Used as a temporary storage area, scratch records provide a means of passing data between tasks running on the same terminal; they are not accessible to tasks that execute on other terminals and are not saved across a system shutdown or a system crash.
Characteristics
The following characteristics are associated with scratch records:
- Scratch records are stored in the data dictionary.
- Multiple scratch areas are allowed for a task and multiple records can be maintained within a scratch area.
- Currency is maintained for each area and record, and can be passed between tasks.
- The scratch area is allocated dynamically within the storage pool. When all scratch records are deleted, the area will also be deleted.
Functions
Scratch records can be used in the following ways within an application:
- To save input acquired from two or more dialogs over the course of the application.
- To allow multiple occurrences of a record to be mapped out at one time. For example, if the names, addresses, and phone numbers of all department employees need to be mapped onto the same screen in multiples of five, the following steps could be taken:
- Walk the set of employee records, moving the required data to a work record that contains multiply-occurring fields.
- When the work record contains the data on five employees, move the contents of the work record to the scratch area with a PUT SCRATCH command so that, in effect, a screenful of data on five employees is put on each record in the scratch file.
- Walk the set of scratch records when the screens of information are to be displayed.
- To pass the contents of the record buffer when a dialog receives control with a TRANSFER command. Data acquired by the dialog issuing a TRANSFER command is not available to the dialog receiving control. However, the dialog receiving control could access buffer data that had been placed in a scratch record.
Refer to the CA ADS Reference Guide for detailed descriptions of the scratch management commands.
Copyright © 2013 CA.
All rights reserved.
 
|
|