Presentation is loading. Please wait.

Presentation is loading. Please wait.

Inside Module 10 Editing TurboIMAGE Datasets Page

Similar presentations


Presentation on theme: "Inside Module 10 Editing TurboIMAGE Datasets Page"— Presentation transcript:

1 Inside Module 10 Editing TurboIMAGE Datasets Page
How can Dbedit help me with my work? 3 Accessing Dbedit 4 Finding entries with a known key 6 What if I don't know the key value? 9 Modifying data and global changes 11 Dbedit subcommands 14 Inserting and deleting data 16 MPE/iX Critical Item Update (CIU) 18 General guidelines 19

2 Editing a database with Dbedit
Dbedit uses simple commands to perform these editing operations: listing entries adding an entry modifying an entry deleting an entry applying global changes to entries It can work on chains of entries or related entries It can modify key items

3 How can Dbedit help me with my work?
Dbedit is useful in many ways Debugging programs Fixing bad data Building prototype databases

4 Accessing Dbedit Step 1: Run Suprtool
Step 2: Use the BASE command to open a database Step 3: Use the EDIT command to start Dbedit :run suprtool.pub.robelle >base store.pub >edit # {Dbedit prompt}

5 Dbedit is built into Suprtool
Dbedit is a Suprtool component that functions independently Dbedit commands: #form sets #list m-customer #modify d-sales;updatekey #add d-inventory #delete #change m-product #exit

6 Finding an entry with a known key
Use LIST setname and specify a key value at the prompt #list m-customer List in File: M-CUSTOMER CUST-ACCOUNT >10020_______ CITY = Surrey CREDIT-RATING = CUST-ACCOUNT = CUST-STATUS = 20 NAME-FIRST = Walley NAME-LAST = Nisbet STATE-CODE = BC STREET-ADDRESS = th Street (2) POSTAL-CODE = V3T4W2 CUST-ACCOUNT > Prompts for next value_________ No setname If you do not specify a setname, Dbedit defaults to the current dataset; if you do not specify a dataset in any Dbedit command, you would get an error message. Key value Dbedit automatically prompts you for a key value; by underlining the space for the key value, the system shows you how many characters are allowed in the field; disable the underline feature with the Set Underline Off command. Change dataset If you want to work on a different dataset, press the Return key then type List setname.

7 Finding a chain of entries
Use LIST setname to specify a chain of entries #list d-sales List in File: D-SALES CUST-ACCOUNT >10020____ PRODUCT-NO >_____{press return to omit}____ CUST-ACCOUNT = DELIV-DATE = PRODUCT-NO = PRODUCT-PRICE = 9831 PURCH-DATE = SALES-QTY = 2 SALES-TAX = SALES-TOTAL = 22415 CUST-ACCOUNT = DELIV-DATE = PRODUCT-NO = PRODUCT-PRICE = 14660 PURCH-DATE = SALES-QTY = 1 SALES-TAX = SALES-TOTAL = 16712 CUST-ACCOUNT >______{press return to end}___ Key fields You must provide a value for the first key, which is the primary path, but you can omit the second key by pressing Return. In our example, the sales detail dataset has two key fields. The cust-account value was specified and the product-no was omitted. Sort fields If a dataset contains sort fields, Dbedit prompts you for them. Same values Dbedit searches entries in the following order: primary key, then sort fields, then the remaining fields in their schema order. Chains If a dataset contains a chain of entries with the same value, they would all be listed.

8 How can I change the search key?
Use the KEY option to specify a different key and alter the search path #list d-sales;key = product-no List in File: D-SALES PRODUCT-NO > _ CUST-ACCOUNT >________{enter value or press return}_ CUST-ACCOUNT = DELIV-DATE = PRODUCT-NO = PRODUCT-PRICE = 14562 PURCH-DATE = SALES-QTY = 1 SALES-TAX = SALES-TOTAL = 16601 CUST-ACCOUNT = DELIV-DATE = PRODUCT-NO = PRODUCT-PRICE = 14660 PURCH-DATE = SALES-QTY = 1 SALES-TAX = SALES-TOTAL = 16712 PRODUCT-NO >_________ Options A semicolon (;) separates a Dbedit command from its options. Key option Overrides the search order of the entries; the detail dataset must have more than one search item; only the official IMAGE search items are valid keys; the system only retrieves exact matches.

9 What if I don't know the key value?
Use the ALL option to sequentially display all the entries in a dataset #list m-customer;all List ALL records in File: M-CUSTOMER CITY = Vancouver CREDIT-RATING = CUST-ACCOUNT = CUST-STATUS = 20 NAME-FIRST = Wayne NAME-LAST = Humphreys STATE-CODE = BC STREET-ADDRESS = # Comox (2) POSTAL-CODE = V5T1H6 CITY = Coquitlam CREDIT-RATING = CUST-ACCOUNT = CUST-STATUS = 20 NAME-FIRST = Elizabeth NAME-LAST = Welton STREET-ADDRESS = 2788 Oxtoby Place .....etc.... List All Displays all the entries in the dataset starting with the first entry Quit Control-Y quits the listing

10 Listing related entries from other datasets
The RELATED option with the LIST command searches for entries in the selected dataset and in related datasets If a master dataset is specified, Dbedit retrieves a master entry and then goes through the paths to detail sets #list m-customer;related If a detail dataset is specified, Dbedit retrieves a detail chain, then goes through the paths from master sets #list d-sales;related List The List command is helpful if you want to know everything about a particular inventory part. If you use the Related option to look up all the information on that part, Dbedit will search all the related datasets. Quit Control-Y Printing Use these commands to send the output to a line printer: >set lp on :file suprlist; dev=lpdevice

11 Changing a noncritical field
Use the MODIFY command to change the values of noncritical fields in a record #modify d-inventory : unit-cost Modify within File: D-INVENTORY SUPPLIER-NAME >STD Ribbons PRODUCT-NO >105391 Enter new values(or <Return> to leave as is): SUPPLIER-NAME = STD Ribbons PRODUCT-NO = UNIT-COST = _____ {enter new unit cost} Critical fields Search and sort fields Field list You can list the fields you want to modify by specifying them with the Modify command. #modify d-inventory : unit-cost, & on-hand-qty No fields listed If no fields are specified with the Modify command, Dbedit will search for the selected key values. When it finds matching records, it prompts you for new values of noncritical fields. Options The Modify command supports the All and Key options.

12 How can I modify a critical field?
Use the UPDATEKEY option to modify critical items #modify d-inventory;updatekey Modify within File: d-inventory SUPPLIER-NAME >* {no new value} PRODUCT-NO > {press Return to omit} Enter new values (or <Return> to leave as is): SUPPLIER-NAME = STD Ribbons STD Ribbon {new key value}

13 Can I make a global change to a field?
If you need to change a field value in the entire dataset, use the CHANGE command #change m-supplier Enter existing key value to find: SUPPLIER-NAME >ACME Enter new key value to replace with: SUPPLIER-NAME >ACME SUPPLY SUPPLIER-NAME = ACME CITY = Los Angeles STATE-CODE = CA STREET(1) = 100 Main STREET(2) = ZIP-CODE = 91201 OK to change this entry[no]:Y New key The new value cannot already exist in the database; Dbedit cannot merge new entries with existing entries if they have the same key values. Search order Dbedit first searches the master dataset and then each detail dataset. Speed The number of changes required affects the duration of this task; if all occurrences of a key field are linked with explicit paths (not embedded in other fields as components, or used as non-keyed attributes in some datasets), then the Change command performs much faster.

14 Subcommands in Dbedit In response to the Dbedit prompt for a field value, you can use the following subcommands: * No new value ? Display the TurboIMAGE format or field // Quit the command \\ Quit the command Ctrl-Y Quit the command [ Treat rest of line as data, not as subcommand ' Set this field to all blanks (batch use) = Execute a calculator command

15 Moving around in a field list
Try these subcommands to move to other entries in a field list: >> Go to the end of the field list << Go to the beginning of the list >3 Go three fields forward in the list <3 Go three fields back in the Go to the fieldname

16 Adding new entries to a dataset
Use the ADD command to insert a new record into a dataset #add m-supplier Add to File: M-SUPPLIER SUPPLIER-NAME >ACME CITY >Los Angeles STATE-CODE >CA STREET(1) >100 Main STREET(2) >_______ {press Return to omit} ZIP-CODE >91201 Compound field Dbedit prompts each part of a compound field. In our example, the street field is a compound item (2X20). Dbedit breaks it into two numbered parts and prompts the user for each part. Critical fields Values must be entered Noncritical fields Values may be omitted by pressing Return Order of fields Dbedit prompts for fields in the following order: primary path, sort fields, remaining fields.

17 How can I delete an entry?
It's easy to remove an entry using the DELETE command #delete m-supplier Delete from File: M-SUPPLIER SUPPLIER-NAME >ACME SUPPLIER-NAME = ACME CITY = Los Angeles STATE-CODE = CA STREET(1) = 100 Main STREET(2) = ZIP-CODE = 91201 Is this the entry to delete[no]:Y Syntax DELETE setname; LIMIT = value Delete options All, Key, Limit, and Numeric Count options only work on detail datasets; the All option allows you to review an entire detail dataset and remove any entry. Related option Only valid for master datasets.

18 MPE/iX Critical Item Update (CIU)
CIU allows programs to modify critical search and sort fields in detail datasets using DBUPDATE By default, IMAGE databases have CIU disabled Dbedit requires CIU for the CHANGE command and the UPDATEKEY option with the MODIFY command Two ways to enable CIU 1. set basename ciupdate = on 2. set basename ciupdate = allowed Set On Enables CIU to all user programs until it is disabled. Set Allowed Only enables CIU when user programs require it; this option is recommended if a program relies on IMAGE error messages to alert it when there has been an attempt to change a critical field. Use the Verify Ciupdate command to check if CIU is enabled or disabled.

19 General guidelines Dbedit works best on single entries or chains of entries Dbedit uses keyed access, but serial access can be specified with the LIST ALL command All Dbedit commands support the asterisk (*) subcommand All commands support a restrictive field list A semicolon (;) separates a command from its options

20 Summary Like a text editor for dataset entries
ADD, CHANGE, DELETE, LIST, MODIFY Updating key values

21


Download ppt "Inside Module 10 Editing TurboIMAGE Datasets Page"

Similar presentations


Ads by Google