Maintaining Display Programs

When a report is saved, Adabas Review automatically generates a Natural program that is used to display the data collected by the report. When you have set DISPLAY=BASIC, a program for the traditional display mode will be generated, starting with RD, SR or CR. When you have set DISPLAY=EDITOR, a program using the Software AG editor will be generated, starting with RX, SX or CX. When you issue the VW (for the traditional module) or the VX (for the Editor module) command for a history report or a report that has been started, the generated display program is executed and the data is displayed on your terminal screen.

Note:
We recommend that you save display programs with names unique to your environment, especially if you have edited the display program. However, be sure that the unique names do not begin with SR-*, SX-*, RD-*, RX-* or CR-*, CX-*. Using unique names for your display programs ensures that your display programs are not overwritten when migrating from release to release of Adabas Review.

This part of the documentation discusses the commands that enable you to process the Natural display program corresponding to a report definition. It covers the following topics:


Copy the Report and Generate a Display Program

One way to create new reports is to use the Copy Report Definition (CR) command from the List Report Definitions (LR) function. The CR command is issued from the Report Definitions screen. The command allows you to copy a report definition either to another Adabas Review repository, or to the current Adabas Review repository under a new name.

After the report definition is copied, the Display Program Name on the screen will display the message "Need RG". This indicates that the display program must be generated before the new report may be displayed.

Start of instruction setTo generate a display program:

  1. Enter RG on the selection line preceding the new report name;

    Or:
    Edit the report using the Edit Report (ER) function; then save it.

    Adabas Review automatically generates a new display program reflecting the changes. See the section Regenerating a Display Program (RG) for other reasons to use the RG command.

Editing the Display Program

You may edit a display program from any of the report list function screens (LR, LS, and LH). The EP command invokes the Natural program editor, enabling you to make changes to the display program in the same way that you would edit any other Natural program. Depending on the DISPLAY=BASIC/EDITOR mode, a traditional or a Software AG Editor module will be edited.

Note:
We recommend that you save display programs with names unique to your environment, especially if you have edited the display program. However, be sure that the unique names do not begin with SR-*, SX-*, RD-*, RX-*, CR-*, CX-*, CS*,PU-* or BUFFERPOOL. Using unique names for your display programs ensures that your display programs are not overwritten when migrating from release to release of Adabas Review and that a SAVE or REGENERATE will not automatically overwrite the user-defined display program.

To execute the user-defined display program when viewing the report, you need to change to a different display program. See the section Changing to a Different Display Program.

Using the EP command, you can customize the appearance of your report displays. Note, that a change to the display program only affects the way the collected data is presented on the screen; it does not change the data collected by the report.

If, for example, you add a display field that does not correspond to the field information collected by the report, no information will be collected for that field and it will appear blank when the display program is executed.

However, if you use the ER function to make changes to a report definition and save the changes, Adabas Review automatically generates a new display program reflecting the changes unless the display program has been changed to a user-defined display program.

Start of instruction setTo edit the display program:

  1. Enter the EP command on the selection line preceding the specified report name.

    The Natural editor is invoked and the display program is ready to be edited.

  2. Issue either the SAVE or STOW commands to save changes, as you would when editing any other Natural program.

  3. Issue the QUIT command to return to Adabas Review.

Regenerating a Display Program

If you wish to restore an edited display program to its original format, you may issue the RG command from the Report Definitions screen (LR function). Adabas Review then regenerates the display program. Depending on the DISPLAY=BASIC/EDITOR mode, a traditional or a Software AG Editor module will be generated.

Start of instruction setTo regenerate a display program:

  1. Enter the RG command on the selection line preceding the report name.

  2. Enter the direct command REGEN report-name.

    A message is displayed when the regeneration is completed.

Note:
It will be checked if the used display program has been renamed to a name which does not begin with SR-*, SX-*, RD-*, RX-*, CR-*, CX-*, CS*,PU-* or BUFFERPOOL. For such a user-defined display program the REGENERATE will not change anything. If you like to change the display program use the RU command. See Regenerating a User-Defined Display Program below.

Regenerating a User-Defined Display Program

If you wish to restore an edited user-defined display program to its original format, you may issue the RU command from the Report Definitions screen (LR function). Adabas Review then regenerates the display program with a new standard display program with an RD-* or RX-* name (depending on the setting of DISPLAY) and this will be used. Your user-defined program will still exist, but it will not be used or displayed. If you like to use your user-defined program again you need to change the display program name again.

See Changing to a Different Display Program.

Start of instruction setTo regenerate a display program:

  1. Enter the RU command on the selection line preceding the report name.

  2. Enter the direct command REGEN report-name,USER-PROGRAMS=Y.

    A message is displayed when the regeneration is completed.

Regenerating All Display Programs

You can regenerate the display programs for all reports by entering REGEN ALL or RG ALL on the command line of any SYSREVDB screen. Depending on the DISPLAY=BASIC/EDITOR mode, a traditional or a Software AG Editor module will be generated. A window will open that displays the name of each report as it is regenerated (see below). Do not press any keys during this process, as it will interrupt the process.

This process will not change any user-defined display programs. To change the user-defined display programs as well and generate standard report definitions enter either REGEN ALL,USER-PROGRAMS=Y or RG ALL,USER-PROGRAMS=Y.

+-----------------------------------------------------------+
|              Display program is now being generated       |
|                                                           |
|         Report Name:  FILE USAGE                          |
|          Program Name: SR-00031                           |
|                                                           |
|         <<<  DO NOT PRESS ANY KEYS  >>>                   |
|                                                           |
+-----------------------------------------------------------+

Changing to a Different Display Program

If desired, you may use a display program that is different from the one that was generated for the report by Adabas Review.

You may change the display program from the Report Definitions screen (LR function).

You cannot change the name of a display program for a PULSE report.

Start of instruction setTo change display programs:

  1. Enter the command CP on the selection line preceding the report name.

    The cursor moves to the display program name.

  2. Type the name of the new display program over the existing name and press ENTER.

    A message appears, indicating that the display program has been changed.

Note:
We recommend that you change the display program with names unique to your environment, especially if you have edited the display program. However, be sure that the unique names do not begin with SR-*, SX-*, RD-*, RX-*, CR-*, CX-*, CS*,PU-* or BUFFERPOOL. Using unique names for your display programs ensures that your display programs are not overwritten when migrating from release to release of Adabas Review and that a SAVE or REGENERATE will not automatically overwrite the user-defined display program.