Using REBUILDREVBOOT_SUB (Functions/Subroutines/Programs)
Created at 14 NOV 1996 02:12PM
When you start Advanced Revelation, the program gets its bootstrap information from a DOS file called REVBOOT. This includes the object code for the initial system programs, the network driver, the default error handler, and the text that displays while Advanced Revelation is loading.
The REVBOOT file is constructed from copies of entries in various system tables such as SYSOBJ, SYSENV, and SYSTEXT. REBUILDREVBOOT_SUB allows you to change the bootstrap information by assembling fresh copies of these entries (after you have made changes to them) and writing them out as a new copy of the REVBOOT file. The most common types of changes are:
Changing network drivers.
Changing the text of logon messages, such as Welcome to Advanced Revelation , Processing ... , the prompt text for passwords and account names, and the text of error messages that are displayed during logon.
Changing the list of programs that are permanently loaded into memory while Advanced Revelation is running (the programs in **INITIAL_LOAD**).
For example, to change the text of a logon message, you can edit the entry called RTP1*PARMS in the SYSTEXT table. After making changes, run REBUILDREVBOOT_SUB, which will recreate REVBOOT, including the text changes that you have made.
Before writing out an updated REVBOOT file, the REBUILDREVBOOT_SUB subroutine makes a copy of the existing REVBOOT file under the name REVBOOT.OLD. Note that if you run REBUILDREVBOOT_SUB repeatedly, you will overwrite REVBOOT.OLD each time.
+ Always to back up the DOS REVBOOT file before experimenting with REBUILDREVBOOT_SUB (even though the subroutine makes one copy of your existing file). If your REVBOOT file contains errors, you will not be able to log into Advanced Revelation.
You do not need to be in the SYSPROG application to run this subroutine, but you must have access to all the system tables listed in the table under location, below.
Locations
An array of information that overrides the defaults for REBUILDREVBOOT_SUB:
The location where **REBUILDREVBOOT_SUB** can find certain system information (such as the logon text).
The name of the network driver.
The name and location of the **DOS** file that the subroutine creates (the default is **REVBOOT**).
You need to pass a value in this parameter only if you want REBUILDREVBOOT_SUB to find components for the new REVBOOT file somewhere other than their default locations or if you are changing network drivers. By specifying alternative locations for the components of the REVBOOT file, you can make changes to copies of these components and preserve the originals in case you want to restore the default values at a later time.
You can also pass information in location that causes REBUILDREVBOOT_SUB to write out the bootstrap information under a different name or to a location other than the default directory. This feature is useful if you want to create one or more alternate DOS files that you can experiment with when logging on to Advanced Revelation (by copying them to REVBOOT), or if you want to rebuild the REVBOOT file belonging to a different copy of Advanced Revelation.
The location array consists of 8 fields, most of which have two values, the first for a table name and the second for the name of a row in the table. The layout of this array, the definitions of its elements, and its default values are in the table that follows. To override a default value, pass an array that is null except for any values that you want to change.
Field | Meaning | Default (@VM-delimited) |
1 | Bootstrap program | SYSOBJ, $RTP1 We do not recommend that you override the object code records for bootstrap: ($RTP1, $RTP57, $RTP27, and $STDIOERR) except to change the location from which they are read, if relevant. |
2 | Boot filing system | SYSOBJ, $RTP57 |
3 | Network driver | SYSNETWORKS, null (see Notes, below) |
4 | Program loader | SYSOBJ, $RTP27 |
5 | Default error handler | SYSOBJ, $STDIOERR |
6 | List of programs to remain memory-resident | SYSENV, INITIAL_LOAD (see Notes, below) |
7 | Text of logon messages | SYSTEXT, RTP1*PARMS (see Notes, below) |
8 | Name and location for REVBOOT file. | null (see Notes, below) |
Values returned
The return status of REBUILDREVBOOT_SUB is indicated by error values in @file.error. If there has been no error, @file.error is null. Multiple errors are delimited with record marks (@RM). The error number appears in field 1 of each @file.error "record", and additional information about the error appears in
field 2. Possible errors are:
Error | Meaning | Add'l Info. |
W351 | Unable to open a required table. | <2> name of table |
B280 | REVBOOT file exceeds 65,530 bytes. | |
B166 | Invalid row key passed in location. | <2,1> row key <2,2> table name |
B241 | Invalid network driver name passed in location or placed into DRIVERTABLE. | <2> driver name |
@file.error may also contains errors values indicating problems in creating or writing the REVBOOT file at DOS. For possible values, see OSWRITE and OSOPEN in the R/BASIC manual.
NOTES
Changing the network driver
Network drivers are different versions of the Linear Hash filing system object code ($RTP57A), one each for the different types of network operating systems that are supported in Advanced Revelation. A list of possible network drivers appears in the entry DRIVERTABLE in the table SYSNETWORKS. The layout of that entry is:
Field | Meaning |
1 | Name (clear text) of current driver. |
2 | Multivalued array of names (clear text) of all available network drivers. |
3 | Multivalued array (associated with <2>) of the names of the object code entries for the network drivers. |
You can change a network driver in two ways:
Change <1> of the **DRIVERTABLE** entry to the name of the new driver before running **REBUILDREVBOOT_SUB**.
Pass in <3, 2> of //location// the name (clear text) of the new driver.
In either case, the name that you use must match exactly (case sensitive) one of the names in field 2 of DRIVERTABLE. If you are keeping the network driver object code in a table other than SYSNETWORKS, pass the name of the alternative table in <3,1> of location.
Changing the text of logon messages
You can change the change the text of logon messages in two ways:
Modify the entry **RTP1*PARMS** in **SYSTEXT** before calling **REBUILDREVBOOT_SUB**.
Copy **RTP1*PARMS** from **SYSTEXT** to another table (and optionally, to another row key name), and pass the new table name and row key in <7,1> (table) and <7,2> (row key) when calling **REBUILDREVBOOT_SUB**.
You must not disturb the layout of the text row, because the positions in the row are associated with particular errors and tasks (for example, position 34 of the row is the text that displays underneath the logon banner).
Changing the contents of the program stack (INITIAL_LOAD)
The row INITIAL_LOAD in the SYSENV table contains a list of programs that are loaded into memory when you first log onto Advanced Revelation. A number of these programs remain memory resident at all times for speed.
+ For details about using INITIAL_LOAD, see entries R33 and R50 in the Advanced Revelation KnowledgeBase.
To change the list of programs loaded as part of INITIAL_LOAD:
Modify the entry **INITIAL_LOAD** in **SYSENV** before calling **REBUILDREVBOOT_SUB**.
Copy **INITIAL_LOAD** from **SYSENV** to another table (and optionally, to another row key name), and pass the new table name and row key in <6,1> (table) and <6,2> (row key) when calling **REBUILDREVBOOT_SUB**.
Correct use of REBUILDREVBOOT_SUB
/* an example of how to change the network driver */
location = ''
* must match a name in DRIVERTABLE<2> in SYSNETWORKS
location<3,2> = "Novell NetWare"
call rebuildrevboot_sub( location )
if @file.error then
call fsmsg()
end
stop
/* example showing how you can change logon text by copying the
existing text to a new location, changing it, and passing the
new location to REBUILDREVBOOT_SUB */
open 'SYSENV' to sysenvFile else call fsmsg() ; stop
open 'PARM_TABLE' to parmTable else call fsmsg() ; stop
read textInfo from sysenvFile then
textInfo< 2 > = "Please stand by …"
textInfo< 17 > = "Establishing a network connection …"
textInfo< 26 > = "|Employee number|" ; * user name prompt
textInfo< 22 > = "|Password|" ; * password prompt
textInfo< 34 > = "Preparing your application …"
write textInfo to parmTable, "TEXT" then
location< 7, 1 > = "PARM_TABLE"
location< 7, 2 > = "TEXT"
call rebuildrevboot_sub( location )
if @file.error then
call fsmsg()
end
end
end