HPlogo Using HP 3000 MPE/iX: Fundamental Skills Tutorial: HP 3000 MPE/iX Computer Systems > Chapter 2 Communicating with Your Computer

Lesson 4 Mistakes and Corrections

» 

Technical documentation

Complete book in PDF
» Feedback

 » Table of Contents

 » Glossary

 » Index

Lesson 4 presents error messages and correcting command errors.

  • mistakes and error messages

  • correcting errors

    • reenter the command

    • use backspace to edit the command

    • use the REDO command to edit the command

Mistakes

Are you still logged on? If you are not, log on again (HELLO your logon identity Return).

What if you make a mistake while entering a command?

Make a mistake. Enter:

   SHOWHOBReturn

Your screen looks like this:

   :SHOWHOB

   UNKNOWN COMMAND NAME.  (CIERR 975)

   :_

Error messages

This mistake is just a typing error. The computer does not recognize the command, so it displays an error message that shows the following:

  • a brief explanation of the problem (UNKNOWN COMMAND NAME)

  • a code that identifies the error message (command interpreter error 975)

Correcting an error

There are various ways of correcting errors. Choose the method that is most convenient.

Reenter the command

You may choose to reenter the command correctly.

Enter:

   SHOWJOBReturn

to send the correct command to the computer. If you enter the command correctly, it executes, and you see the results.

Backspace over the error

Another way to correct an error is to use the backspace key to go back to the character where you made the first mistake and reenter the remainder of the command.

NOTE: This method only works if you have not yet pressed the Return key.

Type SHOWHOB again. DO NOT PRESS RETURN YET.

  • Press the backspace key three times (or as many times as it takes to place the cursor directly on the second letter "H.")

    HOB may still appear on the screen, but it has been erased from your terminal's memory. The letters "H," "O," and "B" would not be sent to the computer if you were to press Return. In effect, you have reduced the entry to SHOW.

  • When the cursor is on H, type JOB.

  • Press Return.

These two methods are best used for short commands. Notice that you have to reenter the command from the first mistake all the way to the end. As you become a more experienced MPE/iX user, reentering lengthy commands using these methods could become tedious.

The REDO command

The REDO command allows you to edit commands and then reexecute them. When the command line becomes long and complex — and some do — REDO is the easier solution.

Enter:

   COWEMReturn

You should see this on the screen:

   :COWEM

   UNKNOWN COMMAND NAME.  (CIERR 975)

   :_

Now enter:

   REDOReturn

You should see this on the screen:

   :REDO

   COWEM

   _

Read ahead before doing anything more at your terminal.

REDO subcommands

REDOReturn retrieves the most recent command entered on the computer and gives it back to you for editing. The REDO command allows you to make the editing changes on the line below the retrieved command. Notice that there is no system prompt (:), just the cursor.

Four simple and useful subcommands of REDO are DELETE, INSERT, REPLACE, and UNDO:

D

Deletes the character above it.

I

Inserts character(s), starting at the character above it.

R

Replaces character(s), starting at the character above it.

U

Cancels the effect of the previous D, I, or R subcommand.

These subcommands can be entered in uppercase or lowercase letters.

Use the spacebar and backspace (←) to place the cursor exactly under the place where you want to start your corrections.

Correcting commands with REDO

Correcting with REDO follows a pattern of steps:

STEP 1.

Make one correction on the line.

STEP 2.

Press Return.

Pressing Return once displays the line again for another correction.

STEP 3.

If the line is now correct, press Return again.

Pressing Return twice in a row signals the end of your corrections and sends the command line to the computer for execution.

If the line is still not correct, go to STEP 4.

If you wish to cancel your previous correction(s), go to STEP 5.

STEP 4.

Make another correction on the line. Go to STEP 3.

STEP 5.

Type U and press Return. This cancels the effect of the previous D, I, or R subcommand.

Entering a UReturn, then another UReturn cancels all previous REDO subcommands and restores the command being corrected to it original form.

Now correct your last command entered, COWEM

First, use the subcommand R to replace the C with an S.

You must place the subcommand letter R directly under the letter to be changed. For this first correction, be sure that the cursor is already under C.

Enter:

   RSReturn

Your screen should look like this:

  :REDO

   COWEM

   RS

   SOWEM

   _

Each time you make a correction, the computer shows you the command with the new edits that you made and waits for more edits.

NOTE: The mark is used here to represent pressing the spacebar one time.

Insert H between S and O this way:

    IHReturn

Now your screen should show the following:

  :REDO

   COWEM

   RS

   SOWEM

   IH

   SHOWEM

   _

Now replace EM with ME this way:

       RMEReturn

At this point your screen should show:

  :REDO



   COWEM

   RS

   SOWEM

    IH

   SHOWEM


       RME

   SHOWME

   _

The word SHOWME should be on the screen, properly spelled.

Now that the command is correct, press the return key again:

   Return

This concludes the editing and sends the command to the computer for execution. You should now see the SHOWME display.

As mentioned earlier, the U subcommand lets you cancel or undo, the effects of a D, R, or I subcommand.

To see how this works, execute the SHOWTIME command and make the following corrections using the REDO command.

Replace TIME with JOB this way:

       ddddJOBReturn

Next, replace JOB with ME this way:

       dddiMEReturn

Delete SHOW as follows:

   ddddReturn

Now, enter:

   UReturn

Notice that the previous edit, deleting SHOW, has been undone and SHOWME reappears on the screen.

At this point, you have one of three choices:

  1. Continue to edit with D, R, or I, or

  2. Press Return once to execute the SHOWME, or

  3. Press UReturn again.

Perform the third choice now by entering:

   UReturn

SHOWTIME returns to the screen canceling all of the previous REDO subcommands.

Press Return to execute SHOWTIME.

Your screen should show something like this:

   :REDO

   SHOWTIME

   ddddJOB

   SHOWJOB

   dddiME

   SHOWME

   dddd

   ME

   U

   SHOWME

   U

   SHOWTIME

   

  :SHOWTIME

   FRI, JUN 29, 1990 4:35 PM

   :_

Lesson 4 Exercises

  1. The following error message appears on your screen:

    UNKNOWN COMMAND NAME. (CIERR 975)
    

    Choose from the list below the meaning of this message (more than one answer may apply):

    1. The HP 3000 does not identify what has been entered.

    2. Your logon is not identified by the HP 3000.

    3. You may have misspelled a command name.

    4. Your keyboard is locked.

  2. Given the following pairs of command lines and using the I, D, and R subcommands of the REDO command (or any combination thereof), correct the first command line so that it will execute the command in the second line.

    1. SHOWMW

      SHOWME

    2. SOWTIME

      SHOWTIME

    3. SHOWTIME

      SHOWME

    4. SHJOB

      SHOWJOB

  3. Study the following screen example:

       :REDO
    
       SHOWTIME
    
       dd
    
       SHOWME
    
       iTY
    
       SHOWTYME
    

    What would you type next to:

    1. cancel only the effects of the "iTY" subcommand correction?

    2. cancel all previous corrections and restore the SHOWTIME command to its original form?

Feedback to webmaster