# update-md command

The update-md BASIC program updates
command definitions in a specified account master dictionary, or in
a list of master dictionaries. Any conflicts found are logged in the clashes file, with a new data section added for each account.

**Synonyms:** update-account, update-accounts

The account is checked in this manner:

- If an item is in newac but not the master dictionary, then it is copied to the master dictionary.

- If an item is in both newac and the master dictionary, and is a file-defining item in the master dictionary, the file-defining item is retained.

- If an item is in both newac and the master dictionary and is not a file-defining item, the newac item is overwritten with the item in the master dictionary and the master dictionary item is written into the dm,clashes, file.

- If an item is a Proc in the master dictionary and there is no corresponding item in newac, the Proc is retained.

- If an item is a cataloged FlashBASIC program in the master dictionary and there is no corresponding item in newac nor in the dm master dictionary, the format of the item is updated to the D3 format.

All other items are retained.

## Syntax

```
update-md {account.name}
```

## Parameter(s)

| options | i | Allows choosing the implementation whose entries will be used to update the md instead of defaulting to the current implementation. |
| --- | --- | --- |
| n | Skips prompts | |

## Description

The update-md command checks for illegal command definitions and converts *old* catalog pointer items to D3 format. Additionally, the update-md command converts system privilege values of sys3
to sys2 for compatibility.

An *active list* (consisting
of account names) can be used prior to running update-md to update several accounts at once.

If no account name is
specified, and no list is active, the system requests the account
name.

The process prompts with these messages:

```
Create user-ID from each account name (y, <n>)?
```
This prompt allows the automatic creation of user-IDs
corresponding to any account updated. Valid responses are y, n, or Enter, which defaults
to n.

```
Enter md file name:
```
This is where the *new* account name is entered.
Pressing ENTER at this prompt terminates the process.

The clashes file holds *invalid* items removed from
the master dictionary by the update-md program.
Each account updated gets its own data section in the clashes file.
The command, lf dm,clashes, displays these data
sections.

 The update-md command logs information about its run to the
 updatemd.log file (which it creates if it doesn't already exist). It
 populates the dictionary with attribute-defining-items (ADIs) to assist in generating reports.
 After successfully running update-md on an account, run `ld dm,updatemd.log,` to see the ADIs. For example, to see which user ran
 update-md on which accounts and when, run `sort dm,updatemd.log, *date* *time**who_user* *account_target*`.

## Example(s)

```
update-md
Create user-ID from each account name (y, <n>)? n
Enter md file name: production
```

## See also

- [account-restore command](https://d3codex.com/tcl/account-restore-command/)
- [clashes file](https://d3codex.com/systemfiles/clashes-file/)
- [Master dictionary file](https://d3codex.com/systemfiles/master-dictionary-file/)
- [newac file](https://d3codex.com/systemfiles/newac-file/)

---
Source: https://d3codex.com/tcl/update-md-command/ - part of the D3Codex reference.
