_update Utility - Update Library


call "_update"{,libraryname}


The _update utility updates program files with common subroutines found in a library file. It prompts for the name of a library file where subroutines can be found and requests a list of program files that require updating, using _flist.utl. Once the filelist is obtained, _update catalogues the library file and displays a list of subroutines found in the library for selection.

Select the subroutines that have been modified and replace those in the program file just listed. To make a selection, use the edit keys on your terminal (if available), or ^J (down), ^K (up), ^L (right), and ^H (left). These keys move the cursor to various items in the list. Enter S to select the item, D to deselect the item, C to deselect all the items, or E to exit when done.

When an item is selected, the utility searches the selected subroutine in the library for references it may have to other subroutines. If references are found, those subroutines are automatically selected as well. Further, each additional subroutine selected is also searched for references. The process continues until there are no longer deselected, referenced subroutines.

After exiting the subroutine selection menu, two windows are displayed on the screen side-by-side. The left window shows the activity of the current file with respect to which subroutines are being updated. The right window displays the subroutines found in the current file being updated. Only those subroutines that are referenced in the subroutine list and found in a program file are updated.

Program File Format

The library file is a PRO/5 program file with special REM verbs that identify where a subroutine begins and a previous subroutine ends. These REM statements are referred to as signatures with the following format:

9000 REM 0 - [end_util]

This signature indicates that at line 9000 the subroutine end_util begins. end_util continues until either the next signature in the file is encountered or the end of the program file is found. The subroutine name can have up to 24 characters (any printable character is legal), and up to 60 subroutines per program file (library) can be defined.

The update process recognizes subroutines in user programs by searching for modified signatures. These signatures have a form similar to:

9000 REM 0 - (end_util) 9000-9040

The modified signature above says that the program file uses a subroutine with a name of end_util and consists of line numbers 9000 through 9040. The update process removes the old lines and merges in the updated subroutine from the library specified. The modified signature format is consistent between the _merge utility and the _update utility. That is, whenever a subroutine is placed into a user program file, the signature format conforms to this modified type (see _merge ).

Related Files/Programs











See Also

Alphabetical Utilities

Functional Listing of Utilities