File-Specific Maintenance

#### Search Results

Search

# File-Specific Maintenance

Maintenance functions applying to file objects are called from the File Maintenance menu. This menu is called with the command `MAINTAIN file` or with function code M and object code FI in a Predict main menu. The screen is shown in File Maintenance Menu .

Standard maintenance functions applying to files as well as to most other types of Predict Objects are described in the section Maintenance in the Predict Reference documentation.

File-specific maintenance functions and aspects of standard maintenance functions specific to files are described below.

- Purge File - Code P

- Rename File - Code N

- Edit List of Fields - Code L

- Force Standard - Code F

- Push Backward - Code B

- Modify Adabas Attributes - Code J

- Modify Vista elements - Code K

- Edit Subquery of a File - Code Y

## Purge File - Code P

The following files cannot be purged with the Purge File function.

- all SAG-owned file objects

- Files of type I (IMS segment). Files of type I can be purged by scratching the IMS database (type I) containing the file.

Two lists are displayed before a file is purged:

- A list of objects and generated code which will not be deleted because they are used in some other object which will not be deleted.

- A list of objects and generated code that will be deleted.

The delete operation is then requested. A list of all deleted objects will be displayed after the delete operation has been executed.

### DELETE

The following objects are purged if you confirm this function:

- the file and all its userviews

- all fields of the file and its userviews

- generated code of the file and userview

- all links to databases

- all links from the file to children/from parents

- all links from/to objects that are also purged with this function.

In addition,

- all file relations using this file are set to D (documented).

When an Adabas file is purged, all Adabas attributes and Vista elements of the file are also deleted.

Note
A file cannot be deleted if a DDM for the file exists or the file is implemented.

## Rename File - Code N

This function is used to change one or several of the following in a single transaction:

- File ID
  The ID will be changed in all objects that are linked to the file via an association and in all file Relations. Predict checks that the ID of the file is still unique.

- Logical File number
  Predict checks if all logical file numbers in the database are still unique (except for conceptual databases).

- File type
  The field list is loaded into the Predict list editor and is checked. It can then be corrected and has to be cataloged. This is especially important if files of type C are changed to another type. The following rules apply:

  - If a standard file (File type Z) is changed to another file type, all connections to other files are deleted.

  - It is not possible to change the type of a master file if related userviews for this file exist. First connect the userviews to another master file, then change the master file.

- Master File
  The new related master file can be specified for files of type J, K, L Q, R, U and W.

  If a userview is connected to another real file, its field list is loaded into the Predict list editor and is checked. It can then be corrected and has to be cataloged.

- Logical distribution type
  Only applicable to Adabas files (File type A).

- Adabas SQL usage
  Only applicable to Adabas files (File type A). If set to Y, the file is accessible via Adabas SQL Server.

## Edit List of Fields - Code L

The field list editor can be invoked in one of the following ways:

- With Y in the field Associations in the bottom line of every Add/Copy/Modify screen.

- With the function Link children (code L) and child type EL.

- With the function Edit list of Fields (code E). This function is not indicated in the File Maintenance menu.

- With the command LINK FILE ELEMENT.

Some additional line and editor commands can be used in the list editor:

Line Commands
.E | Skips to the Add or Modify Field screen for the field on the current line.
.E(n) | Skips to the Add or Modify Field screen for the next n fields in the list.
Editor Commands
ADA | Generate two-character field short names for fields that do not already have a short name.
FLIP C | Enables you to enter field IDs with a length of up to 32 characters.
FLIP T | Enables you to enter field IDs and Table/View IDs with a length of up to 32 characters.
FLIP | The default entry fields are displayed.
NU[LL] |
Predict automatically sets suppression/null value options for Fields that are added to the dictionary. The value depends on the type of file
Parameter | File Types
--- | ---
All SQL Types * except X | X | Other File Types
Unique option = Unique or Desc. type = Primary or Field format = serial | R | R | N
Others | U | blank | N
Note SQL file types include files of type A with parameter Adabas SQL usage set to Y.
READA | Delete any existing field short names and generate new ones for all fields. This command is only available when editing the field list of a real file or a standard file (not a userview). It is not applicable to field list of SQL files.
SORT ADA | Sort the fields alphabetically by two-character field short name. Fields not on level 1 are not sorted, so group structures are not changed.
SORT | Sort the fields alphabetically by field ID. Fields not on level 1 are not sorted, so group structures are not changed.
SET ADA [ON] | Apply future SCAN commands to two-character field short names instead of field IDs.
SET ADA OFF | Cancel the above setting.

Note
All general commands are described under Link Editor of section Editors in Predict in the Predict Reference documentation.

#### Comment Lines

When editing field lists of files you can enter comment lines containing descriptive information at any point in the list. The following rules apply:

- Comment lines start with ** or /* in the column Ty.

- Comment lines longer than 32 characters are truncated when files are transferred to Natural LightStorm.

- Comment lines are included in generated DDMs if parameter General comments of function Generate DDM is set to Y.

- Comment lines are ignored for all other generation functions.

## Force Standard - Code F

This function compares the connected attributes of all fields defined in the specified standard file with the attributes of the connected fields in other files. If attributes of connected fields are different (and these fields are not marked as non-standard), they are changed to match the standard file if possible. Otherwise, they are marked as non-standard.

Command: `FORCE FILE`

## Push Backward - Code B

This function connects fields in a master file or conceptual file to fields in a standard file. The file must not be a userview or a standard file.

The concepts of this function are described in the section Rippling .

Command: `PUSH FILE <master-file-id>`

        10:30:50              *****  P R E D I C T  *****             2007-05-31
                                    - Push Backward File -

        File ID .......... EMPLOYEES

                            Function

                            A   Push back all fields of the file
                            S   Push back selected fields

        Function ........

        Standard File ..*
        Field ID ........                                  with Adabas name .. N (Y/N)
        with owner ID ...
        with keyword ....

        Enter-PF1---PF2---PF3---PF4---PF5---PF6---PF7---PF8---PF9---PF10--PF11--PF12---
              Help  Next  Stop  Last  LnkEl Flip  Print Impl  AdmFi SelFi Prof  Main

Parameters
File ID | ID of the file to be pushed backward. This value is entered in the File Maintenance Menu and cannot be overwritten here.
Function |
A | Push back all fields of the file. All fields in the master file are coupled with fields in the standard file.
S | Push back selected fields. Fields in the master file are displayed for selection. Selected fields are coupled with fields in the standard file.
Standard file | Standard file containing the standard fields to be coupled with the master fields. Use asterisk notation to display a list of standard files for selection.
Field ID | Enter a unique field ID to couple a single field, or display a list of fields for selection by leaving this field blank or using asterisk notation.
with owner ID | The list of master fields for selection can be restricted to fields with the specified owner. Use asterisk notation to specify a range of owners.
with keyword | The list of master fields for selection can be restricted to fields with the specified keyword. Use asterisk notation to specify a range of keywords.
with Adabas name |
Y | Field attribute Short name is copied from master field to standard field.

### Functional Scope

The following rules apply to both options, A and S.

- Fields already connected to a standard field are not processed.

- If a field with the same ID is already present in the standard file but no link exists, a link is established. The field is marked as non-standard if one of the field attributes does not match.

- If a field is not found in the standard file, it is copied to the standard file and a connection is established.

#### Push Back all Fields of the File

All fields in the master file that meet the selection criteria are coupled to fields in the standard file.

#### Push Back selected Fields of the File

Fields in the master file that meet the selection criteria are displayed for selection. Selected fields are coupled to fields in the standard file. This is a two-step process.

1. A list of all fields in the master file which meet the selection criteria is displayed. Fields that are not yet coupled to a field in the standard file are marked will be added (see screen below).

2. Mark fields to be coupled to fields in the standard file with any non-blank character and press ENTER. Marked fields are coupled immediately and are marked is connected to ... in the column Remarks.

        13:52:09            *****  P R E D I C T  *****             2007-05-31
                             - Push backward Field selection -

        From File ID .... FILE13
        To   File ID .... STANDARD_FILE

        M T  L Field name                       F  Length   Remarks
        _    1 Field1                           A     20.0    is connected to FILE12
        _    1 Field2                           A     30.0    is connected to FILE12
        _ HY 1 Field3                           A     12.0    will be added

## Modify Adabas Attributes - Code J

Displays the Modify Adabas attributes screen for specifying the physical implementation of an Adabas file. See Modifying Adabas Attributes for a description.

Command: `MODIFY ADA-ATTR`

## Modify Vista elements - Code K

Displays the Modify Vista elements screen (see Modifying Vista elements ).

Command: `MODIFY VISTA-FI`

## Edit Subquery of a File - Code Y

Invokes the expression editor (see Editing the Subquery of an SQL View ). Only applies to SQL views.

Command: `EDIT FILE SUBQUERY`

### On this page

- Purge File - Code P
- Rename File - Code N
- Edit List of Fields - Code L
- Force Standard - Code F
- Push Backward - Code B
- Modify Adabas Attributes - Code J
- Modify Vista elements - Code K
- Edit Subquery of a File - Code Y