Data Input and Output Specifications

To conserve keystrokes and disk file space, D3 has the capability to modify the value and attribute before saving the item. There also is a method to read the data and reformat it before it displays. These data input and output processes are defined by processing codes, also called conversions and correlatives.

For example:

Input data as:

102003

D3 stores it as:

13077

Displayed as:

20-Oct-2003

Lists

D3 uses the list to make it possible to view a portion of a file when the entire file content is not needed.

Select Lists

To retrieve a subset of a file, the required data items are specified with the select command.

: select invoices with inv.total < “100.00”

> sort invoice by customer.name customer.name inv.no inv.date inv.total

When a list is selected, the system builds a list of item-IDs in the order specified in the select statement. After the list has been selected, a TCL command can be issued to operate on that list, or the list can be saved with the save-list command.

Saved Lists

Select lists can be temporary or can be saved for later reference using the save-list command. The list contains only references to items that are in the database at the time the selection is executed. The items could easily change between the time the list is saved and the time the list is used. Lists can be saved in any file. The default is the pointer file. Lists are records containing one item-ID per selected record, each in an attribute.

The get-list command is used to retrieve a copy of a saved list. Use the edit-list command to modify items in the list and the delete-list command to delete a list.

Active Lists

Once a list has been selected or retrieved using the get-list command, the list is called an active list. The TCL prompt character changes from : to > when a list is active. After a TCL command is executed, the prompt reverts back to the : prompt.

See Also

Accessing Files and Items

File Control Block

File-Defining Item or D-pointer

Internal Structure of an Item