HP 3000 Manuals

REDO [ QUERY/V Reference Manual ] MPE/iX 5.0 Documentation


QUERY/V Reference Manual

REDO 

Edits and executes a command in the command history buffer.

Syntax 

       [m     ]
RED[O] [-n    ]
       [string]

Parameters 

m                      displays the command that has this absolute
                       number.  Absolute numbers are positive numbers
                       beginning with the first (least recent) command in
                       the command history buffer.  For example, 1 is the
                       first command in the buffer.  (This is the number
                       displayed by the LISTREDO command with the ABS
                       option or with the default of absolute numbering.)

-n                     displays the command that has this relative
                       number.  Relative numbers are negative numbers
                       beginning with the last (most recent) command in
                       the command history buffer.  For example, -1 is
                       the last command in the buffer.  (This is the
                       number displayed by the LISTREDO command with the
                       REL option.)  -n must be from -1 to -20.

string                 displays the most recent command that begins with
                       the specified string.  The string can only contain
                       alphanumeric characters.  It cannot contain blanks
                       or special characters such as ; , ( ) = .

Discussion 

When the REDO command is issued, you are placed into an "edit mode" to
modify the specified command.  The subcommands discussed next can then be
used to change the displayed command.  You type the subcommands on the
line below the line you are currently editing.  You can type the
subcommands in either upper or lowercase characters.  Any characters
other than the subcommands are interpreted as replacement characters.

The REDO command is not recorded in the command history buffer.  In
addition, the REDO command cannot be used in a command file.

The command history buffer contains the last 20 commands issued during
the current QUERY session.  You can use the LISTREDO command to display
the contents of the command history buffer with the number of each
command.

Subcommands 

B or S                 breaks the current line by moving the character
                       above the B (or S) and all subsequent characters
                       on the line to the next line.  The second half of
                       the line becomes the current line.

D                      deletes the character above the D. You can delete
                       multiple characters by typing a D below the first
                       character to be deleted and another D below the
                       last character to be deleted.  You can also type
                       D's consecutively under each character to be
                       deleted.  The D subcommand can be followed by the
                       I subcommand.

H                      lists all the valid editing subcommands, then
                       redisplays the line you are currently editing.

I                      inserts one or more characters preceding the
                       character above the I. Type I followed by the
                       characters to be inserted.

L                      displays the complete command in its current
                       state, then redisplays the line you are currently
                       editing.

R                      replaces one or more characters beginning with the
                       character above the R. Type R followed by the
                       replacement characters.

U                      undoes any changes to the current command and
                       executes the original command.  Type U anywhere
                       under the current line.

X                      executes the edited version of the command.  You
                       can type X at any time.

+[n]                   displays the nth line forward in the current
                       command for editing.  By default, n is 1.
                       Therefore, + and +1 have the same effect.

-[n]                   displays the nth line backward in the current
                       command for editing.  By default, n is 1.
                       Therefore, - and -1 have the same effect.

RETURN                 displays the next line for editing.  If the
                       current line is the last line, the edited command
                       is executed.

The ampersand (&) continuation character is not used to continue a
command that is being edited.

Examples 

Example 1 

In the example below, the LISTREDO command is first used to display the
number of the command to be edited.  The REDO command is issued with the
number previously displayed by the LISTREDO command.  Next, the
subcommands are used to edit and execute the command.

     >LISTREDO -3 
         47) DEFINE
         48) LIST LAST-NAME, STREET-ADDRESS, CITY, STATE FOR CUSTOMER.LAST-NAME
             IB A,N AND STATE <> "NEW YORK" OR ACCOUNT GT 55555555
         49) LISTREDO
     >REDO 48 
     LIST LAST-NAME, STREET-ADDRESS, CITY, STATE FOR CUSTOMER.LAST-NAME
                                         D     D 
     LIST LAST-NAME, STREET-ADDRESS, CITY FOR CUSTOMER.LAST-NAME
     RETURN 
     IB A,N AND STATE <> "NEW YORK" OR ACCOUNT GT 55555555
                                                  R66666666 
     IB A,N AND STATE <> "NEW YORK" OR ACCOUNT GT 66666666
     X 
                     .
                     .
                     .
     edited LIST command is executed 

Example 2 

In the next example, the string parameter is used to specify the command
to be edited.  First, five commands in the buffer are displayed with the
LISTREDO command.  When the REDO command is executed, the most recent
command that begins with FIND is displayed.

     >LISTREDO ,5
          1) DEFINE
          2) FIND ALL CUSTOMER.ACCOUNT
          3) MULTIDB
          4) FIND PROCF5
          5) LISTREDO ,5
     >REDO FIND 
     FIND PROCF5
               I2 
     FIND PROCF25
     RETURN 
          .
          .
          .
     edited FIND command is executed 



MPE/iX 5.0 Documentation