HP 3000 Manuals

UNDEL [ HP RPG/XL Utilities-Part 2 RISE ] MPE/iX 5.0 Documentation


HP RPG/XL Utilities-Part 2 RISE

UNDEL 

UNDELete restores lines that were erroneously deleted.

Form 

         U[NDEL]

Purpose 

The UNDELete command restores the lines which were removed by the last
DELETE command.  It does not restore characters which were deleted while
in the MODIFY mode.

If you DELETE lines, then ADD new ones with the same numbers as those
deleted, the deletions will not be restored by the UNDEL command.  It
only restores lines when the numbers of the lines to be restored do not
already exist in the work file.  For example, if you DELETE lines 1/5,
ADD 1/3, then try to recover with the UNDEL command, RISE will not be
able to restore lines 1/3 because the lines exist due to your new
additions.  In this case, no lines will be restored unless you move 1/3
to another location, freeing those locations for full restoration.

Related Commands 

In SHOW Mode, changes are not permanent until the ENTER key is depressed,
at which time RISE changes the internal page buffer and updates the work
file with it.  If, previous to pressing the ENTER key, you made changes
which you wish to cancel, you do not use the UNDEL command.  You scroll
forward or backward to a different page, then scroll back to the page on
which the undesired changes were made.  RISE will restore that page to
its original state from the internal buffer which never changed.

 *  Execution mode:  Line or Block.

 *  Record pointer:  At last line undeleted.

 *  Control Y: Stops listing the lines that are being undeleted.

Examples 

The following are legal abbreviations which may be used with the UNDELete
command:

U                Undelete lines removed by the last delete command.

UND

In the first example, lines 1 through 5 of SIMCAL are listed and then
deleted.  An execution message appears at the terminal when the deletion
is completed (1).  The UNDEL command is then used, and the lines
previously deleted are restored as they were (2).  Lines 5 through 10 are
next deleted (3).

          >L1/5
              1       00011H
              SIMCAL
              2       00012FINPUT    IP  F       72               DISK
              3       00013FOUTPUT   O   F       72               DISK
              4       00014IINPUT    AA  01   1  CA
              5       00015I        OR   02   1  CS
          >D1/5
              1       00011H
              SIMCAL
              2       00012FINPUT    IP  F       72               DISK
              3       00013FOUTPUT   O   F       72               DISK
              4       00014IINPUT    AA  01   1  CA
              5       00015I        OR   02   1  CS
     (1)   Delete completed.
          >
          >UNDEL
              1       00011H
              SIMCAL
              2       00012FINPUT    IP  F       72               DISK
              3       00013FOUTPUT   0   F       72               DISK
              4       00014IINPUT    AA  01   1  CA
              5       00015I        OR   02   1  CS

     (2)   Undel completed.
          >
          >D 5/10
              5       00015I        OR   02   1  CS
              6       00016I        OR   03   1  CM
              7       00017I        OR   04   1  CD
              8       00018I        OR   05
              9       00019I                     3  72OPRND1
             10       00020I                     9 132OPRND2     99

     (3)    Delete completed.

In the next example, a file named RPGDOC--used previously in the JOIN
example--is JOINed to the work file beginning at line 5 (1).  The UNDEL
command is then tried and rejected by RISE. This occurs because line 5,
which was deleted in the first example, has been used again through the
JOIN command.  A message appears explaining why the UNDELete command
cannot be executed (2).  The lines containing RPGDOC are then MOVEd to a
new position, beginning at line 10.5 (3).  When this is done, line 5 no
longer exists in the file, Now the UNDELete command, which was previously
rejected, is executed by RISE (4).

          >JOIN RPGDOC TO 5
              5          H*
              5.1        H*  PROGRAM NAME:
              5.2        H*
              5.3        H*  PROGRAMMER  :
              5.4        H*  DATE WRITTEN:
              5.5        H*  PURPOSE     :
              5.6        H*
     (1)   Join completed.

     (2)  >UNDEL
              5     00015I      OR     02  1  CS
           Can't Un-delete a line, the line number exists already.
          >

     (3)  >MOVE 5/5.6 TO 10.5
             10.5        H*
             10.51       H*  PROGRAM NAME:
             10.52       H*
             10.53       H*  PROGRAMMER  :
             10.54       H*  DATE WRITTEN:
             10.55       H*  PURPOSE     :
             10.56       H*
           Move completed.

     (4)  >U
              5     00015I       OR   02   1  CS
              6     00016I       OR   03   1  CM
              7     00017I       OR   04   1  CD
              8     00018I       OR   05
              9     00019I                3 72OPRND1
             10     00020I                9 1320PRND2      99

            Undel completed.
          >



MPE/iX 5.0 Documentation