HPlogo ALLBASE/ISQL Reference Manual: HP 9000 Computer Systems > Chapter 4 ISQL Commands

REDO

» 

Technical documentation

Complete book in PDF
» Feedback

 » Table of Contents

 » Index

The REDO command lets you edit any of the commands in the command history buffer and optionally execute the edited command. The original command in the command history buffer is left unchanged.

Scope

ISQL only.

ISQL Syntax

RED[O] [ CommandNumber CommandString ]

Parameters

CommandNumber

identifies one of the commands in the command history buffer. The command history buffer holds the fifty most recently submitted commands, numbered 1 through 50. The CommandNumber of the most recently submitted command is 1.

CommandString

identifies the most recent command in the command history buffer that begins with the CommandString.

Description

  • You can use the LIST HISTORY @ command to identify the CommandNumber associated with each command currently in the command history buffer.

  • If no parameter is specified, the most recently submitted command is assumed.

  • REDO cannot be used from a command file or the command buffer.

  • Once the REDO command is submitted, you are placed in edit mode, and the first line of the command is displayed. You enter the following editing subcommands on the line beneath the displayed line, referred to as the current edit line. You can use either uppercase or lowercase for the alphabetic subcommands listed here:

    B

    breaks the line being edited by moving the character above the B and all subsequent characters on the line to the next line, which becomes the current edit line.

    D

    deletes the character above the D. You can delete multiple characters by entering the D below the first and the last character to be deleted, leaving blanks between them. You can delete, then insert, characters by using one or more Ds followed by an I.

    E

    exits the REDO command without executing the edited command.

    H

    lists all the valid editing subcommands, then redisplays your current edit line.

    I

    inserts one or more characters starting at the location of the I. You can delete, then insert, characters by using one or more Ds followed by an I.

    L

    lists the complete command as it is currently edited, then redisplays the current edit line.

    R

    replaces one or more characters in the line being edited. Characters are replaced beginning with the character above the R one for one with any characters you enter following the R. The R can be omitted unless one of the other edit subcommands is the first replacement character.

    X

    executes the edited version of the command.

    +[n]

    makes the nth line forward in the command being edited available for editing; n is 1 by default. If you enter a number greater than the number of lines remaining in the command, the last line in the command is made available for editing.

    -[n]

    makes the nth line back in the command being edited available for editing; n is 1 by default. If you enter a number greater than the number of lines earlier in the command, the first line in the command is made available for editing.

    Return

    makes the next line of the command being edited available for editing. If the current edit line is the last line, the edited command is executed.

  • Any characters other than those listed above are interpreted as replacement characters; they replace the characters above them in the current edit line.

  • Use the space bar, not the arrow keys to move forward on the line to be edited.

  • The edit line cannot exceed 72 characters. If inserting additional characters will cause the line to exceed 72 characters, use the B subcommand to break the line before inserting.

Example

 

   isql=> SELECT PartName, SalesPrice

   > FROM PurchDB.Prts

   > WHERE PartName IS NUL;



   SELECT PartName, SalesPrice FROM PurchDB.Prts WHERE PartName IS NUL;

                                                                |

   Syntax error.  (DBERR 1001)

   isql=> REDO;

   SELECT PartName, SalesPrice FROM PurchDB.Prts WHERE PartName IS NUL;

                   B

   SalesPrice FROM PurchDB.Prts WHERE PartName IS NUL;

   -1

   SELECT PartName,

                   IPartNumber,

   SELECT PartName, PartNumber,

   +

   SalesPrice FROM PurchDB.Prts WHERE PartName IS NUL;

                            a

   SalesPrice FROM PurchDB.Pats WHERE PartName IS NUL;

   H

   Valid commands are:  B, D, E, H, I, L, R, X, +n, -n

   SalesPrice FROM PurchDB.Pats WHERE PartName IS NUL;

                          ir

   SalesPrice FROM PurchDB.Parts WHERE PartName IS NUL;

                                                      RL;

   SalesPrice FROM PurchDB.Parts WHERE PartName IS NULL;

   L



    1. SELECT PartName, PartNumber,

    2. SalesPrice FROM PurchDB.Parts WHERE PartName IS NULL;



   SalesPrice FROM PurchDB.Parts WHERE PartName IS NULL;

    Return 



   Edited command is executed.



   isql=> 



   isql=> REDO SEL;



   The most recent command in the command buffer beginning with the    string

   "SEL" is displayed in edit mode.



   SELECT PartName, PartNumber, SalesPrice FROM PurchDB.Parts WHERE



   PartName IS NULL;

    Return 



   The command is executed.
Feedback to webmaster