| Previous | Contents | Index |
When you need to view or print the record layout/definition you have several options.
Enter SETUP and select the structure to be viewed. See Section 16.3.1, Data Field Definitions for details on how to enter SETUP.
How the data fields will be presented to you is controlled by selections in the Structure Definition window, under the Data Field Definitions heading. You have the options to sort by name, description, position and the length of what is to be shown.
| Example 16-19 Viewing Field Definitions |
|---|
|
|
Sort By: Description
Name sorts by the field names
Description sorts by the descriptions that have been entered
for the fields
Position sorts the fields in record layout by their starting
position in the record
Length Description
Short Displays field name, description, first position, length, data type
Medium Displays field name, description, first position, length, occurances,
last position, data type, print mask, semantics
Full Displays field name, description, first position, length, occurances,
last position, data type, print mask, semantics, prompt,
heading, help, screen mask, validations
|
Clicking on [Properties] will bring up the Fields window where you can see the report on screen.
Clicking on [View/Print] in the Fields window will bring the field information report up in Notepad where you can then do normal Notepad functions, including printing.
Structure security controls access levels for read, write, update and delete activities.
Enter SETUP, select the structure (see 15.1.1 Entering SETUP and 15.2 SETUP Structure Definition) and click on [Security].
| Example 16-20 Structure Security |
|---|
|
|
The following information will then be displayed on the window:
| Example 16-21 Structure Security |
|---|
|
|
The security level is a single letter in the range of A to Z. Security level A is the highest level of security. Security level Z is the lowest level of security.
The default value for the security and access levels is ‘N’, normal. You may optionally assign a different security level to the structure and then for both the definition and the dataset you can assign various security levels for read, write, update and delete accesses.
Read/ Write/ Update/ Delete Access Levels
The access level is a single letter in the range A to Z. A is the most restricted access level. Z is the least restricted. When an attempt is made to read, write, update or delete a record from this structure, SheerPower will compare the structure security level to the corresponding access level. If the access level is lower than the structure security level, the request will not be allowed.
For example:
Structure Read Access
Security Level Level Access
K R Allowed because R is > K
K E Denied because E is < K
K K Allowed because K = K
|
After you have finished defining the record layout, you will need to create the data file and define it’s characteristics.
Enter SETUP , select the structure (see 15.1.1 Entering SETUP and 15.2 SETUP Structure Definition’) and click on [Data File].
| Example 16-22 Creating the Data File |
|---|
|
|
The following will be displayed:
| Example 16-23 Creating the Data File |
|---|
|
|
The actual record size you have defined will be displayed. Sheerpower will automatically extend the record size for future use. The default record size is 25% larger than the actual length of the fields defined. You may accept the defaulted record size or modify it for additional characters. It is recommended that some additional character positions be set in the record size of new file definitions to allow for additional fields if they become necessary. This allows room for adding new fields to the record without having to expand the record size.
Sheerpower will default a value for the number of records preallocated for the file creation. This is not a limit to the number of records but for size of initial file creation. You may accept the defaulted value or modify as needed.
Select how you want your file to be organized. The options are:
INDEXED - the data file record contains one or more key fields SEQUENTIAL - the data file record contains no key fields |
If you are going to be sorting and/or extracting data from the ARS file you are creating, the indexed file organization is more efficient than the sequential organization. This is especially true if you have large files.
An indexed file contains one or more indexed key fields which allow programs to locate and access file data very quickly without having to read through the file to locate records.
A sequential file has no key fields and accessing file data can be very slow and time consuming. Locating data in a sequential file requires reading every record in the file to find all occurrences of the data.
If you select Indexed file organization, you will need to enter the key field information.
The list of fields defined is shown on the right side of the window. Click on the field that should be a key field and then click [Add].
You will be asked if duplicates should be allowed or not. If the data to be stored in the key field will be unique (only one occurrence of the data in the key field) then duplicates should not be allowed. If the data could occur many times (ie: a salesrep code) then allow duplicates (multiple occurrences of the data in the key field).
Data access works most efficiently with unique key fields.
If you want more than one key field, select the fields you want to use as key fields.
All key fields selected will be shown on the left side of the window.
In the following example three (3) keys have been selected:
CUST_ID no duplicates DATE_CUST_KEY no duplicates REP_CODE duplicates |
| Example 16-24 Key Field Information |
|---|
|
|
If you need to delete one of the fields selected as a key field, click on the field to highlight it, then click on [Delete].
After you have defined all fields and the file organization click on [Create File].
| Example 16-25 Create Data File |
|---|
|
|
When the data file has been created, a notification window will appear.
| Example 16-26 Create Data File Notification |
|---|
|
|
Click on [OK]. The Create Data File window will close and bring you back to the Field Definition window. Clicking on [FINISH] will create the structure file if it is new. If you modified an existing structure, clicking on [FINISH] will save your modifications.
| Previous | Next | Contents | Index |