• Aucun résultat trouvé

Changing the Journal Process

Dans le document PDP–11 Keypad Editor User’s Guide (Page 93-98)

Using Journal Files to Protect Work Sessions

9.4 Changing the Journal Process

When you begin your work session as described in Section 9.1, KED counts and stores the text you type and the changes you make in a journal buffer that can

the count reaches a certain number of modifications (the default is 10) or when the journal buffer becomes full, KED moves the contents of that buffer to the journal file. Later, when you end your work session with an EXIT or QUIT command, KED deletes the journal file.

The following sections tell you how to:

• Change the modification count that determines when the contents of the journal buffer will be moved to the journal file.

• Move the contents of the journal buffer to the journal file without waiting for the modification count to be reached.

• Save the journal file when you end your work session with an EXIT or QUIT command.

9.4.1 Changing the Modification Count

To change the modification count that determines when the contents of the journal buffer will be moved to the journal file:

1. Press GOLD and COMMAND. 2. Type:

SET FREQUENCY number

numberis the new modification count you want KED to use in determining when the contents of the journal buffer will be moved to the journal file. The highest number allowed is 511. Low numbers can affect system performance, depending on the device you specified for the journal file.

3. Press ENTER.

KED changes the modification count to the number you specified.

In other words:

GOLD COMMAND SET FREQUENCY number ENTER

9.4.2 Moving the Contents of the Journal Buffer to the Journal File

To move the contents of the journal buffer to the journal file without waiting for the modification count to be reached:

1. Press GOLD and COMMAND. 2. Type:

WRITE JOURNAL 3. Press ENTER.

KED moves the contents of the journal buffer to the journal file you specified when you began your work session.

In other words:

GOLD COMMAND WRITE JOURNAL ENTER

9.4.3 Saving the Journal File

If you terminate your work session normally (if you end your work session with an EXIT or QUIT command), KED does not save the journal file.

To save the journal file when you plan to end your work session with an EXIT or QUIT command:

1. Press GOLD and COMMAND. 2. Type:

SET JOURNAL SAVE 3. Press ENTER.

KED will save the journal file you specified when you began your work session, after you enter an EXIT or QUIT command.

In other words:

GOLD COMMAND SET JOURNAL SAVE ENTER

If you do not use the SET JOURNAL SAVE command to save the journal file, you can still save it by using one of the following commands to end your work session.

To save the journal file when you decide to end your work session with an EXIT command:

1. Press GOLD and COMMAND. 2. Type:

EXIT SAVE 3. Press ENTER.

KED saves the output file and the journal file you specified when you began your work session.

In other words:

GOLD COMMAND EXIT SAVE ENTER

To save the journal file when you decide to end your work session with a QUIT command:

1. Press GOLD and COMMAND. 2. Type:

QUIT SAVE 3. Press ENTER.

KED does not save the output file, but it saves the journal file you specified when you began your work session.

In other words:

9.5 Restrictions

The following operations are invalid.

• Using the /JOURNAL or /RECOVER command option with the /INSPECT file specification option

• Using the @ or LOAD command to execute a journal file

• Copying a journal file with the COPY/ASCII command

In addition, any commands that change the journal process must be placed at the end of an initialization file. Any such commands cause all subsequent commands in the file to be skipped unless the file was executed by an EDIT command with the /JOURNAL option.

9.6 Example

This section summarizes most of the information in this chapter by providing an example of the steps necessary for recovering all the work you performed before a system crash or similar malfunction.

Each step has two parts.

1. An instruction to complete

2. The keys you must type to complete the instruction

The keys you must type are presented in a horizontal line, and the strings of letters and numbers you must type are not enclosed by boxes.

1. Begin your work session to edit file WEEK.TXT.

.EDIT/JOURNAL WEEK.TXT RET KED displays:

Monday was cold and rainy.

On Tuesday, it snowed.

Wednesday was sunny and hot.

On Thursday, the lilacs bloomed.

2. You add a line of text at the bottom of the file.

Friday was just like Monday, cold and rainy. RET

3. You decide to decrease the modification count, thereby increasing the number of times that KED moves the contents of the journal buffer to the journal file.

GOLD COMMAND SET FREQUENCY 5 ENTER

4. You add another line of text at the bottom of the file.

On Saturday, it snowed again and the wind was very strong. RET

5. Anticipating a system malfunction, you decide to move the contents of the journal buffer to the journal file without waiting for the new modification count to be reached.

GOLD COMMAND WRITE JOURNAL ENTER

6. The malfunction occurs. Simulate it by typing:

GOLD COMMAND QUIT SAVE ENTER

7. After resolving the simulated problem, you restart your system and then recover all the work you performed.

.EDIT/RECOVER WEEK.TXT RET KED displays:

Monday was cold and rainy.

On Tuesday, it snowed.

Wednesday was sunny and hot.

On Thursday, the lilacs bloomed.

Friday was just like Monday, cold and rainy.

On Saturday, it snowed again and the wind was very strong.

8. Finally, you add another line of text at the bottom of the file and then end your work session.

On Sunday, we decided to leave New England. RET

GOLD COMMAND EXIT ENTER

Chapter 10

Dans le document PDP–11 Keypad Editor User’s Guide (Page 93-98)