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-*, CR-*, CX-*, RE-CLIST, RE-GLIST or RE-KLIST.

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.

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

The REGEN ALL process happens in two steps. In the first step the sources of the display programs will be generated and saved in library SYSREVDB. In the second step the sources will be cataloged using the Natural CATALL command.

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.

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.

It is possible to generate sources without cataloging them using the option SAVE. Natural cataloging errors in the generated programs will be handled by the CATALL command. To display the result of a REGEN ALL run immediately, use the option REPORT. Detailed progress information can be displayed using the option SCROLL.

During the generation step the Natural text member RE-GLIST will be generated. RE-GLIST serves as input for the CATALL command and contains all display programs, which will be cataloged. When the REPORT option is not specified, the CATALL command keeps a text member, which contains information about errors during the catalog process.

Special Considerations

Starting from Natural Version 8.2.6 with update NA826I6 or Natural Version 8.2.7, the CATALL command contains two fixes, which allow for a smooth run of the REGEN ALL command:

  1. In case of an error, the CATALL command does no longer clear the whole Natural stack. This ensures the SYSREVDB utility can be re-started after the REGEN ALL.

  2. The text member containing the errors found during the catalog process may be displayed in a formatted way by entering CATALL and ENTR. In previous Natural versions the text member 0CATALL in SYSREVDB may be listed using the Natural LIST function.

Example

Issuing the command

REGEN ALL [REPORT]

would result in the following output:

+--------------------------------------------------+
| Display program source is now being generated    |
|                                                  |
| Report Name:  SUMMARY REPORT BY FILE             |
| Program Name: SR-00001                           |
|                                                  |
| <<<  DO NOT PRESS ANY KEYS  >>>                  |
|                                                  |
+--------------------------------------------------+

Without option REPORT

+--------------------------------------------------+
| Display programs will now be cataloged.          |
| This may take a while.                           |
|                                                  |
| For error log enter CATALL/<ENTR> on NEXT prompt |
| in library SYSREVDB (or list member 0CATALL).    |
| <<<  DO NOT PRESS ANY KEYS  >>>                  |
|                                                  |
+--------------------------------------------------+

Or with option REPORT

+--------------------------------------------------+
| Display programs will now be cataloged.          |
| This may take a while.                           |
|                                                  |
| Error log will be displayed after CATALL is      |
| finished.                                        |
| <<<  DO NOT PRESS ANY KEYS  >>>                  |
|                                                  |
+--------------------------------------------------+

For a description of the syntax of the REGEN ALL command, refer to REGEN or RG Command in the section Command Reference.

Recataloging All Display Programs

The RECAT command uses the Natural CATALL command to catalog display programs without re-generating them.

The RECAT command checks display programs and catalogs them when source and object exist and the GDA timestamp does not match. With the option ALL, display programs will also be cataloged, if only the source exits.

Natural cataloging errors in the generated programs will be handled by the CATALL command. To display the result for a RECAT run immediately, use the option REPORT. Detailed progress information can be displayed using the option SCROLL.

The Natural text member RE-CLIST will be generated. RE-CLIST serves as input for the CATALL command and contains all display programs, which will be cataloged. When the REPORT option is not specified, the CATALL command keeps a text member, which contains information about errors during the catalog process.

Special Considerations

Starting from Natural Version 8.2.6 with update NA826I6 or Natural Version 8.2.7, the CATALL command contains two fixes, which allow for a smooth run of the RECAT ALL command:

  1. In case of an error, the CATALL command does no longer clear the whole Natural stack. This ensures the SYSREVDB utility can be re-started after the RECAT ALL.

  2. The text member containing the errors found during the catalog process may be displayed in a formatted way by entering CATALL and ENTR. In previous Natural versions the text member 0CATALL in SYSREVDB may be listed using the Natural LIST function.

For a description of the syntax of the RECAT command, refer to RECAT Command in the section Command Reference.

Check All Display Programs

The CHECK command determines all display programs defined for an existing report definition. It checks if source and the object exist and if there is a GDA timestamp conflict. The Natural text member RE-KLIST containing the results will be generated and a message will be returned.

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 or enter CP <report name> in the command line.

    A popup window appears.

  2. Enter the name of the new display program 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.