Customizing System Listings in Advanced Revelation 2.0
Published By | Date | Version | Knowledge Level | Keywords |
---|---|---|---|---|
Revelation Technologies | 02 APR 1990 | 2.X | INTERMEDIATE | @LPTR, G-TYPE, LISTDICT, LISTFILES, LISTVOL, LISTMEDIA, LISTVOLUMES, SYSTEM |
With the release of Advanced Revelation 2.0, the display of various system listings has been altered. The reports that have changed are ones that provide you with listings of currently available files, volumes, and fields:
LISTDICT LISTFILES LISTVOL (LISTMEDIA) LISTVOLUMES
Note: LISTINDEX is also a system list command, but it has not been changed for Version 2.0 of Advanced Revelation. The information provided here is therefore not applicable to LISTINDEX.
This technical bulletin provides you with some information on how the reports are generated so that you can customize them to your requirements.
Changes Made to System Listings
Three changes were made to the system listings for Version 2.0 of Advanced Revelation:
- Popups used for screen display were updated to reflect new vocabulary conventions in the product and to provide more useful information. As with many items in Version 2.0, these changes were made with an eye to Environmental Bonding.
- In addition, the hard-coded display used for printer output was dispensed with. Instead, the commands simply execute an R/LIST statement. The fields that display for these reports are listed in G-type dictionary items. This change allows greater flexibility in the formatting of output. By changing the G-type field used for the display, you can alter the output of the command to suit your requirements and tailor it in size to accommodate the capacity of your printer.
- Finally, the screen output of these commands was made considerably faster.
Customizing System Listings
There are several ways in which you can alter the system list reports. Three methods are described here:
- Changing the popup used to display to the screen
- Changing the fields that are displayed to the printer
- Restoring older versions of the system list reports
Changing the Screen Display
When you display a system list report to the screen (the default), the display appears in a display-only popup. The templates for these popups are available to you in the SYS.POPUPS file for customization.
The popups for all system listings are R-type (record) popups. The program that displays the data builds a pseudo-record of all the popup elements. Each field of this pseudo-record contains the data for that row of the popup, with each column of the popup a value in this row.
Because the data for the popup is not read directly from a file, but is instead read from an intermediate record, you can customize these popups only to a limited extent. However, there are three aspects of the popup you can change easily:
- Delete columns. For example, you may decide that your users will simply be confused by the T or Mstr columns in the LISTDICT popup.
- Reorder columns. As an example, you might want to swap the locations of the Account and File Type columns in the LISTFILES popup.
- Resize or reformat columns. For example, you might decide that the File Name prompt of the LISTFILES popup is too narrow.
Note that you can neither add columns to the popups nor substitute columns that are not already being displayed.
Of course, you can also change the title or any other attribute of the popup with the exception of the mode or selection process. If you change the location of the popup, be sure to change the column widths accordingly.
To edit the popup for any system listing, use the Makepopup window. The file for the popups is SYS.POPUPS. Each popup is named after its command, so the LISTVOLUMES command uses the LISTVOLUMES popup, for example.
Delete, reorder, or reformat columns by altering the contents of the prompts under the Column Formats label. Removing an entry removes that column from the popup. Changing the Justification or Width prompts affects the display of that column. Finally, reordering the rows changes the order (left-to-right) in which the columns appear in the popup. To reorder the rows, you will have to delete a row and then re-enter it at another location.
Note: If you reorder the rows, note carefully the number that appears under Position. The numbers here do not reflect true field numbers for the data being displayed. Instead, they are positions within the pseudo-record being built by the listing program. For example, in the LISTDICT popup, the information for accounts is in position 4. This means that the LISTDICT verb (V45) loads account information into the fourth field of its pseudo-record before calling the popup and will look to the fourth field for account information.
Changing Printer Output
Printer output for all system listings is a straight R/LIST report instead of a popup. The fields that display are defined in a G-type dictionary item. The G-type item simply contains a list of the information that is displayed when the report is sent to the printer.
For example, if you send the LISTVOLUMES command to the printer, it will generate a command like this one:
LIST VOLUMES (P)
The fields displayed by this report are those that appear in the field @LPTR in the dictionary of the VOLUMES file. The exception is LISTDICT, which uses not @LPTR but the special G-type record LISTDICT.REP.
Note: The Read This First document that describes changes between Versions 1.1 and 2.0 incorrectly states that LISTDICT uses the G-type field LISTDICT.
To customize the printer output for a file, change the contents of the dictionary item @LPTR (LISTDICT.REP for LISTDICT) in the appropriate dictionary:
Command | Dictionary |
---|---|
LISTDICT | VOC |
LISTFILES | FILES |
LISTVOL | REVMEDIA |
LISTVOLUMES | VOLUMES |
You can add any field to the G-type record that is defined in the appropriate dictionary. For instance, to customize the printer output for LISTFILES, you can add or substitute any field from the dictionary of the FILES file into the @LPTR record of that dictionary.
The LISTDICT command is a little harder to customize because of the wealth of fields available in the dictionary of the VOC file. Figure 1 lists good candidates for inclusion in the LISTDICT printer output. You can see from this table that if you want LISTDICT to display formulas, add the field FORMULA or LONG.FORMULA to the LISTDICT.REP record in the dictionary of the VOC file.
In addition to simply swapping fields in the @LPTR records, you can change the definition of any of the fields being displayed. For example, if you change the justification and width of the ACCOUNT field in the dictionary of the REVMEDIA file, you will alter the way it is displayed when you send a LISTVOL report to the printer. Be careful, though you may affect the display of other commands or programs in the system or in your applications. If this is a concern for you, you may want instead to add a JUSTLEN modifier in @LPTR for the field you want to modify.
Finally, you can add new fields to the appropriate dictionary, and include the new field in the @LPTR records. For example, you can write a symbolic dictionary record that formats dictionary formulas to your liking, and add this to the LISTDICT.REP record.
Restoring Old Versions of the System Listings
If none of these customization options suits your requirements, you can simply copy over an old version of the system listing. If you still have access to your 1.x version of Advanced Revelation, copy the appropriate system program from the VERBS file of your old system into your new system. A table of the system verb names appears in Figure 2.
Shown below is an example of how to copy the old version of LISTDICT to your new system. The technique is similar for all system listings only the verb name is different. (If you are handy with Qfiles, you can also use the SETFILE command to create a Qfile and copy records directly from your old to your new system.)
You can copy the old verb into your VERBS file if you like but be sure to change the name of the program as you copy it in. Be aware that anything you keep in the VERBS file is subject to being overwritten when you next upgrade your system.
Alternatively, you can keep the old version of the system listing in your own file somewhere. If you choose this technique, keep the program in a global file so that all accounts will have access to it.
The example here assumes that you will be copying into the VERBS file. If you are not, change the file name in the commands accordingly.
- Log into the 1.x system, and then copy the program to a DOS file. The command to copy the LISTDICT verb (V45) is:
RECORDCOPY VERBS $V45 TO: (DOS A:$V45
This command copies the program to a DOS file on the A drive. You can then copy this DOS file back into your new 2.0 system.
- Log out of your old system and into your new system.
- Use this command after you have logged into 2.0:
RECORDCOPY DOS A:$V45 TO: (VERBS $V45.OLD
Note that the program in your 2.0 system is called $V45.OLD rather than $V45. The new LISTDICT command is called $V45 in the VERBS file, and it would not be a good idea for you to overwrite it.
- Once the old version is in place, create a VOC record for it. Again, the easiest way to do this is to copy the old version to a new name. Use this command, for example, to create a command LDICT that will execute your old version of LISTDICT:
RECORDCOPY VOC LISTDICT TO: LDICT
- Edit the record (EDIT VOC LDICT) and change the fourth field to read V45.OLD instead of V45. From then on, you can execute LDICT to get the old listing, and LISTDICT to get the new one.
You will need to change the VOC file for each of your accounts. If you intend to create new accounts and want to include this command for all of them, edit the record NEW.ACCOUNT.VOC.LIST in the SYSTEM file (you must be in SYSPROG to do this) and add the LDICT command to it.
Examples
Figure 1
Field Name in DICT of VOC | Position | Description |
---|---|---|
TYPE | 1 | Field type (F, S, G) |
FMC | 2 | Position (Field Mark Count) |
DISPLAY | 3 | Column heading for R/LIST reports |
SM | 4 | Single/multivalued |
PART | 6 | Key part |
CONV | 7 | Output format/conversion |
FORMULA | 8 | Formula for symbolic fields |
LONG.FORMULA | 8 | Same as FORMULA, but formatted wider |
JUST | 9 | Justification |
LEN | 10 | Length |
PATRN | 11 | Input validation patterns |
GENERIC.TYPE | 12 | Generic data type |
FOREIGN.TYPE | 15 | Data type for the foreign environment (Environmental Bonding) |
MASTER.FLAG | 28 | Master (not a synonym) (Environmental Bonding) |
USER1-5 | 41-45 | User-definable fields in the dictionary |
Figure 2
Command | Verb |
---|---|
LISTDICT | $V45 |
LISTFILES | $V25 |
LISTVOL | $V61 |
LISTVOLUMES | $V24 |