COMMAND:SCCS.RESTORE
path: COMMAND:SCCS.RESTORE

SCCS

RESTORE and ROLLBACK from backup Library

Introduction

The SCCS.RESTORE facility enables restoring items (rollback) from the backup library.

Recommended practice

Before a restore procedure is begun, to ensure that:

  • A recent file-save exists, or,
  • A t-dump of the item to be overwritten is made, or minimally,
  • The operator be fully comfortable with the SCCS.RESTORE procedure.

WARNING Be sure that any item you wish to restore, is not checked out or in-edit.

To list items in modification:

Using SCCS.RESTORE, items are restored from the backup library: SCCS,BACKUP, to the file and item specified.

It is NOT necessary to know the date and time or version number, as you can review all items previously released before restoring a backup item.

Items can only be restored to the same account (or project) from which they were created in.

  • You will NOT be forced to restore an item.
  • You may opt out at any time.

Syntax

To Restore an item from the backup library:
SCCS.RESTORE Filename ItemID

Example

From the Nucleus shell prompt:

=SCCS.RESTORE ISUB,S SUBS.CUSTMAINT

will display a listing of the items held in the backup library from the designated file and designated item, in descending date order. You can select any item, view it, compare it to the current item, or restore it, as seen below:

You may now review any or all of the previously released versions.

Selecting an item from the list, will provide these choices:

The header bar shows Account_File_itemId_InternalDate_InternalTime

  • View, will allow you to review the item.
  • Compare, will provide a line by line comparison (to the current item in the SCCS,LIBRARY), with differences highlighted in RED.
  • 'exit' will return you to the View, Restore, Compare options.

You may still opt out at this time, by pressing 'N'. The default condition of this prompt is originally set to No. (image shown, is after Y was pressed)

To restore the item

To restore the item, you must specifically answer Y to the prompt.

If you answered Y, a message will flash quickly stating in a message box, detailing what was copied, from where, and the destination file to which it was copied.

You will then be returned to the View, Restore and Compare choices. At this point, you may 'exit', and then exit from the version list back to the Nucleus shell.

If you answered 'N' to the prompt, the restore of the selected item will end, and you will be returned to the selection listing so that you may select / review another candidate for restore if desired. Pressing 'exit' at this will allow an exit.

IMPORTANT NOTE:

If answering 'Y' the item selected has been loaded into the source code working library: SCCS,LIBRARY. The item has NOT been loaded into the original ISUB,S file. In this case, the item in the ISUB,S file still has the original version. The item in SCCS,LIBRARY, was just loaded with the version selected from the backup library.

Forcing the item live

If you are processing a Nucleus screen:

Syntax: WINMAINT ScreenName

Then, select Checkout, which will checkout the script. Nucleus will check both the working copy in WINSCREENS against the SCCS, LIBRARY copy. If there is a difference, the operator will be prompted, as:

If you are not sure, Compare

  • The item restored was placed in SCCS,LIBRARY
  • It had not yet been copied by SCCS to the working file (ISUB,S WINSCREENS etc.)

To re-assure yourself that you are doing the right thing, compare the items, before actually committing the item.

Nucleus will also check to see if the item restored to SCCS,LIBRARY is different than the item found in your working file . If there is a difference, you will see a warning screen similar to the one above, which will again allow you to choose to use the Library Copy, Program Copy, Compare, or Abort.

Restoring individual elements, found outside of a Nucleus screen

WARNING: Be sure that items you wish to restore, are not checked out / in-edit.

SCCS.RESTORE FileName ItemID
Will work on any item managed by Source Code Control.
As:

SCCS.RESTORE ISUB,SUBR SUBR.SEND.FILESAVE

Again, the item will be restored from SCCS,BACKUP to SCCS,LIBRARY After it’s restored, USC ISUB,SUBR SUBR.SEND.FILESAVE Will invoke source code control which will then check to see if there is a difference between the current version in ISUB,SUBR to the copy found in SCCS,LIBRARY. If there is a difference the operator will then have the opportunity to use the program version, library version, or Compare.

Always compare if you are unsure.

Once the item is selected:

  1. Make some small change to the item (if it keeps notes in the header), such as adding an asterisk on a single line.
  2. This will ensure that source code control understands that the item has changed.

Releasing the item from source code control, will update the SCCS,BACKUP and SCCS,LIBRARY with the current copy, and restore the status of the item to checked in.

See also