This section describes how to perform the data maintenance functions available in Super Natural.
This section covers the following topics:
Data maintenance transactions are transactions which you can
use to perform the data maintenance functions Add
,
Update
and Delete
. The
type of data maintenance function you perform depends on the setting of your
data maintenance mode Report Type.
You cannot use data maintenance transactions to modify field definitions or add new fields.
Data maintenance transactions are intended for use with your user files only. Do not perform data maintenance functions on database files without asking your Super Natural administrator.
The Super Natural administrator decides whether you may perform data maintenance, on which files and at which level.
Note:
Data maintenance transactions can use primary and secondary files,
but not lookup files.
If you set the transaction mode Logging to "Y", you can write a report containing the data that has been processed in a data maintenance transaction to a printer, the Natural program editor or to Con-nect. For further information, see Defining Transaction Modes for Data Maintenance.
To obtain a list of transactions
Select the object Transactions from the Menu.
Or:
Issue the TRANSACTION
command.
The List Transactions screen appears.
The Transaction List screen functions in the same way as all object list screens in Super Natural. For general information on how to use object list screens, see Object List Screens in Starting Up.
The List Transactions screen lists both reporting and data maintenance transactions.
To add a data maintenance transaction
Enter a new transaction name in the Name column of the List Transactions screen in the input field next to the Add field.
Or:
Issue the ADD TRANSACTION
name
command.
The Add Transaction window appears.
Note:
You can use the CHECKLIST
function and
the NEXT
function to help you add and modify data
maintenance transactions. For further information, see
Using Super
Natural.
17:24 ***** Super Natural ***** 08.Jan.1998 SN1110 - Transaction List - Friday Cmd Name Descript +-------------------Add Transaction--------------------+ DATMAN_ ! ! __ ________ ! Transaction ID .... DATMAN_ ! __ ________ ! Description ....... ______________________________ ! __ ________ ! ______________________________ ! __ ________ ! ! __ ________ ! File name ......... ________________________________ ! __ ________ ! ! __ ________ ! Modify modes ...... _ ! __ ________ ! Data maintenance .. N (Y/N) ! __ ________ ! ! __ ________ +------------------------------------------------------+ |
Type a new transaction name in the Transaction ID field if no name is present.
Modify or delete the transaction description if you wish.
If you know the name of the file on which you want to perform data maintenance, enter it in the Enter File Name field.
The file you choose here is called your primary file.
If you don't know the name of the file you want to use, enter an
asterisk (*
) and the File Selection List
window appears.
Mark the Modify Modes field to invoke the Modify Data Maintenance Modes window.
You can use the Modify Data Maintenance Modes window to modify the default modes for the current transaction only. The modes govern the basic conditions under which the transaction runs. For further information on data maintenance modes, see Defining Transaction Modes for Data Maintenance.
If you don't mark the Modify Modes field, you continue to add the transaction using your default modes.
Enter Y
(Yes) in the Data
Maintenance field, to add a data maintenance transaction.
Press Enter.
17:30 ***** Super Natural ***** 08.Jan.1998 SN1110 - Transaction List - Friday Cmd Name Descript + +----------------File Selection List-----------------+ *______ ! ! File Name Access Info ! __ CONNECT Report T ! ! _ UF-SBE-EMPLOYEE-DATA F _ ! __ CONTROL control ! ! _ UF-SBE-NEW F _ ! __ DATACH (92-11-1 ! ! _ UF-SBE-SUMMARY F _ ! __ DATACH2 (92-11-1 ! ! _ UF-SBE-USER-FILE-RECORDS F _ ! __ DATACH3 Destinat ! ! _ UF-SBE-USERFILEV F _ ! __ DATA2 data mai ! ! _ UF-SBE-USERFILE1 F _ ! __ DATA3 data mai ! ! _ UF-SBE-YACHT F _ ! __ DATA4 data mai ! ! _ FINANCE D _ ! __ DATA5 data mai ! ! _ GB-PERSONNEL D _ ! __ DATA6 data mai + ! _ KEDB2 D _ ! __ DDM1 SAG ch pri ! _ KEFINANCE D _ ! __ DDM2 SAG compan ! _ KEPERS D _ ! Add datman_ ! _ MITARBEITER D _ ! ! ! Cmd(s): Modify, Execute, +More: +-------------------------------------------+ |
If you have marked the File Name field with an
asterisk (*
), the File
Selection List
window appears as in the following example:
The File Selection List window only displays
the files you can use for the transaction type specified. For example, if
transaction type DELETE is specified, only the files with access codes
D
or F
are presented for
selection.
The file access codes in the Access column indicate your
access level to each file as follows:
File Access Code | Description |
---|---|
U | Update (includes read). You can update existing records to this file. |
A | Add (includes update). You can add new records to this file. |
D | Delete (includes add). You can delete records in this file. |
* | This file is being deleted. Access is not possible. |
S | Superfile. For further information on superfiles, see Defining Files. |
F | User file. All data maintenance functions are available (read, add, update and delete). For further information on user files, see Working with User Files. |
Choose your primary file.
Mark the Information column to obtain an extended file description from the data dictionary Predict. This feature is only available at sites where Predict is installed.
No dictionary information is available for user files.
Press Enter.
What happens now is dependent on the Transaction Type specified. The four different Transaction Types for data maintenance are described in the following sections.
To add data
Add a data maintenance transaction of Transaction Type
ADD
.
The following version of the Worksheet appears:
17:33 ***** Super Natural ***** 08.Jan.1998 SN3011 - Worksheet - Friday Ref DB Field Name Seq Opt Func Def Info Del BB ________________________________ ___ ___ __ __ __ __ BC ________________________________ ___ ___ __ __ __ __ BD ________________________________ ___ ___ __ __ __ __ BE ________________________________ ___ ___ __ __ __ __ BF ________________________________ ___ ___ __ __ __ __ BG ________________________________ ___ ___ __ __ __ __ BH ________________________________ ___ ___ __ __ __ __ BI ________________________________ ___ ___ __ __ __ __ BJ ________________________________ ___ ___ __ __ __ __ BK ________________________________ ___ ___ __ __ __ __ BL ________________________________ ___ ___ __ __ __ __ BM ________________________________ ___ ___ __ __ __ __ BN ________________________________ ___ ___ __ __ __ __ BO ________________________________ ___ ___ __ __ __ __ Enter "*" in Fieldname column to select fields or enter NEXT Command ===> Enter-PF1---PF2---PF3---PF4---PF5---PF6---PF7---PF8---PF9---PF10--PF11--PF12--- Help Next Exit Incl Flip - + Sel Run Canc |
The Worksheet contains the following columns specific to Report Types
ADD
, UPDATE SINGLE
and
UPDATE MULTIPLE:
In the Sequence column number the fields to which you want to add data.
In the Option column enter one of the following codes for each field marked in the Selection column:
Code | Description |
---|---|
R | Indicates a required field. You must supply a value for a required field. |
C | Indicates
that the contents you add to this field will be copied to the next record.
(Transaction Type ADD only)
|
D | Indicates
that the field will be displayed for information only, you may not update it. If you leave this column blank, you can choose whether you want to update the field when it is displayed. (Transaction Types UPDATE SINGLE and
UPDATE MULTIPLE ) or whether you want to add a value
to it (Transaction Type ADD ).
|
The other columns function as described in the section The Worksheet earlier in this documentation.
When you have finished making entries on the Worksheet, you can specify logical conditions, calculation or file linking if you wish. You cannot specify selection criteria.
Issue the RUN
command.
The fields you have chosen in the Sequence column of the Worksheet are displayed. You can now supply your own values.
Before you supply your own value, the fields are filled with map filling characters . Map filling characters allow you to distinguish between alphanumeric and numeric fields. They also indicate field length. You can define which characters you want to use as map filling characters by changing your transaction option Map Filling Character. For further information, see Adjusting a User Profile. The recommended characters are the underscore (_) for alphanumeric and the full stop ( . ) for numeric fields.
When you add data, the occurrences of multiple-value fields and periodic groups are presented in separate records. This is called flattening records. For further information on flattening, see Transaction Options in Adjusting a User Profile.
To add data, type in a value (overtype the map filling characters).
Press Enter or PF3.
If you have assigned a value to a field in the Calculation Editor, the value you assigned does not appear but overrides any entries you make for the field here.
The following is an example of the output for an
ADD
transaction:
17:39:21 1998-01-08 IDATMAN 0 TITLE .......................... ____________________ SURNAME ........................ ____________________ FIRST-NAME-1 ................... ____________________ Enter-PF1---PF2---PF3---PF4---PF5---PF6---PF7---PF8---PF9---PF10--PF11--PF12--- Exit Add Flip Canc |
You can use two transaction types to update data: UPDATE
SINGLE
and UPDATE MULTIPLE
.
When you update data, the occurrences of multiple-value fields and periodic groups are presented in separate records. This is called flattening records. For further information on flattening, see Transaction Options in Adjusting a User Profile.
Note:
You cannot update subfields (redefined database fields defined in the
Define User Field window).
To update data displaying records singly
Add a data maintenance transaction of Transaction Type
UPDATE SINGLE
.
The version of the Worksheet specific to Report Types
ADD
, UPDATE SINGLE
and
UPDATE MULTIPLE
appears. This version of the
Worksheet is described in the section Adding Data.
Make your entries on the Worksheet.
Specify selection criteria.
Specify logical conditions or calculation, file linking and lookup if you wish.
Issue the RUN
command.
The records found are displayed consecutively. The fields for each record are displayed vertically and may cover more than one screen.
To update a record, overtype the current entries.
To display the next record, press Enter.
The following is an example of the output for an UPDATE
SINGLE
transaction:
17:46:59 SURNAME 1998-01-08 IDATMAN2 0 SURNAME ........................ HOLLY PERSON-ID ...................... 0....... SEX ............................ BIRTH-DATE ..................... 0 Enter-PF1---PF2---PF3---PF4---PF5---PF6---PF7---PF8---PF9---PF10--PF11--PF12--- Exit Updt Flip + Canc |
To update data displaying multiple records
Add a data maintenance transaction of Transaction Type
UPDATE MULTIPLE
.
This transaction type is only available for Adabas files.
You cannot number multiple-value fields and periodic group fields in the Sequence column of the Worksheet.
The main difference between this transaction type and
UPDATE SINGLE
is the way the records are presented
for updating.
The following is an example of output for an UPDATE
MULTIPLE
transaction:
18:21:47 YACHT-ID 1998-09-07 IMUSTER0 0 YACHT-ID YACHT-NAME Y ID-CH-BA ID-S-OWNE DID-DESC _ 1 ANTIGONE______________________ A 21______ 0........ ________ _ 2 EDELWEISS_____________________ A 21______ 0........ ________ _ 3 HELENA________________________ A 21______ 0........ ________ _ 4 MEDEA_________________________ A 21______ 0........ ________ _ 5 ATLANTIC OCEAN________________ A 24______ 0........ ________ _ 6 SYSTEM FUNCTION_______________ A 21______ 0........ ________ _ 7 ATHENE________________________ A 24______ 0........ ________ _ 8 PANDORA_______________________ A 21______ 0........ ________ _ 9 APHRODITE_____________________ A 21______ 0........ ________ _ 10 ANDROMEDA_____________________ A 21______ 0........ ________ _ 11 CIRCE_________________________ A 21______ 0........ ________ _ 12 PENTHESILEA___________________ A 24______ 0........ ________ _ 13 HAITI_________________________ A 25______ 0........ ________ _ 14 ATLANTIS______________________ A 21______ 0........ ________ _ 15 BREAKDANCE____________________ A 24______ 0........ ________ _ 16 JAMAIKA_______________________ A 25______ 0........ ________ Enter-PF1---PF2---PF3---PF4---PF5---PF6---PF7---PF8---PF9---PF10--PF11--PF12--- Exit Updt Flip + Cancel |
If the line length of this horizontal display is not sufficient, you
can mark records to be updated in the first column to invoke vertical display
as in transaction type UPDATE SINGLE
.
To update records, overtype the current entries.
Press PF5 to save your changes.
The records are updated and the next page is displayed.
To delete data
Add a data maintenance transaction of Transaction Type
DELETE
.
The Worksheet appears as described in the section Worksheet.
Continue to add a transaction which selects all the records you want to delete.
The fields you select to be displayed allow you to review each record before deletion.
Specify logical conditions, calculation or file linking if you wish.
Issue the RUN
command.
Each record is presented separately for review.
To continue to the next record without deleting, press Enter or PF8 (page one page forwards).
To delete a record, press PF3 (delete).
The entire record is deleted, not just the fields selected for display. Only the records displayed are deleted.
You can delete all the records in a user file using the
Delete User File Data Only
function described in the
section User Files.