<<< Back Home >>>

UNDELETE 5R3B -- Program to Reestablish Deleted Element


Go to Table of Contents


1. Introduction

UNDELETE is a program used to reestablish a deleted symbolic, procedure, absolute, relocatable, or omnibus element in a program file. It does this by modifying the program file's table of contents. For a specified element name, the selected deleted copy of that element is marked as undeleted, thus reestablishing it as the current copy. Also, the current undeleted copy (if any) is marked as deleted.

Updating a source element with a processor like ED or IPF causes deletion of the previous copy of that element. Until the file is @PACKed, UNDELETE can be used to get back any one of the deleted copies.

Unlike FURPUR or other undelete-capable utilities, UNDELETE does not attempt to update the file's pointer tables; this will be done by the next @PACK of the file.

UNDELETE is based on the source of the SORTOC utility. As such, it can support any type of program file: standard, LPF, or LEPF.


2. Invoking UNDELETE -- Interactive Call
[Top][Contents]

UNDELETE is called as a processor. Format:

@UNDELETE,options file.elt

Options:

A,O,R,S - The type of element being named. Default: S.

C - Reduce display lines to 68 characters, suitable for ST CONSOLE run.

N - Suppress full-screen mode if it normally defaults to on. This may be desired if, for instance, the user has a terminal printer turned on.

HELP - Display a HELP screen showing how to call UNDELETE. The N option may be included.

file.elt - the name of a program file element in standard notation. If the filename is omitted, TPF$ is assumed.


3. Sequence Numbers
[Top][Contents]

Elements are uniquely referenced in a program file table of contents by their sequence number. The sequence number is the sequential position of the element's directory information in the table of contents.

When UNDELETE is executed, it will list the sequence number and date and time created for every copy of the specified element in the table of contents. The display also indicates which of those copies are deleted and which is not. (This information is a subset of that shown by @PRT,TL and similar to the display produced by the utility SORTOC. UNDELETE will honor the flag bits in the SORTOC scratch file's initial reserve to display date format 2 (YYYY/MMDD) or sector address instead of cycle information.)

Once the sequence number information is displayed, the user will be prompted for the sequence number of the element to be reestablished:

---> ENTER SEQUENCE NUMBER TO UNDELETE, OR 0 OR @ TO CANCEL

If one of the sequence numbers for a deleted copy (according to the display) is entered, UNDELETE will print out the following confirmation message:

--- ELEMENT x REESTABLISHED. ELEMENT y DELETED.

where x is the sequence number of the element you wanted reestablished, and y is the sequence number of the active element that became deleted as a result.

The above message may be supplemented depending on the type of element:

For a procedure element, UNDELETE will remind the user that the reestablished element must be processed with @PDP in order to reintroduce that element's procedures into the procedure table. This is especially important because UNDELETE does not alter procedure table entries; so there could be undeleted procedure entries pointing to a deleted element, and vice-versa.

For a relocatable element, if the file previously had an entry point table, UNDELETE will clobber it and remind the user that the file must be @PREPped in order to register the entry point of the reestablished relocatable.

For an object module, if the file previously had a prepped object module entry point table, UNDELETE will clobber it and remind the user that the file must be @PREPped in order to reestablish it. At this point only unprepped entry points are available.

If a 0, @, or any ECL statement is entered for the sequence number prompt, no changes will be made to the file.


4. Invoking UNDELETE -- Non-Interactive Call
[Top][Contents]

UNDELETE can also be called non-interactively to reestablish a specific element. Format:

@UNDELETE,option file.elt,seq|yymmddhhmmss/-seq

Options:

A,O,R,S - The type of element being named. Default: S.

file.elt - the name of a program file element in standard notation. If the filename is omitted, TPF$ is assumed.

seq - The absolute sequence number of the element to undelete, or the relative sequence number (-0,-1,...) with respect to all deleted occurrences of the named element.

yymmddhhmmss/-seq - The exact date and time of the element to be undeleted. A relative sequence number is required in case more than one deleted copy of the element has the same timestamp.


Table of Contents

(Go to Top)

1. Introduction
2. Invoking UNDELETE -- Interactive Call
3. Sequence Numbers
4. Invoking UNDELETE -- Non-Interactive Call