Display Programs Using Software AG Editor

In parallel to the traditional display programs, another mode to generate display programs is available. In this mode, the display programs use the Software AG Editor. Both, the traditional display programs as well as the display programs using the Software AG Editor, use the same live or history data.

The Software AG Editor is part of the Natural installation. To be able to use it, an editor buffer pool must be allocated either as a Natural work file or by setting the EDPSIZE. For more information see chapter Software AG Editor in the Editors section of the Natural for Mainframes documentation, especially the topic Operating the Software AG Editor.

The mode uses the Software AG Editor, because the editor offers an extensive number of browsing functions. The editor supplies standard browsing functions like down, bottom, up, top, left or right. It is possible to fix a number of columns starting with column 1 in the display when scrolling right. Sorting of rows is possible according to specified column and row ranges. All data in the editor may be displayed in hexadecimal format too. For operating on SYSREVDB data, a subset of editor functions is enabled. See the online help when displaying SYSREVDB data for a list of these functions.

15:41:59              ***** Review Adabas Tools *****               2016-07-28
                        Help System -Editor Data Display                       
                                                                               
The Editor Data Display allows you to browse live or history reports.         
                                                                               
You can save live reports on the Natural system file for later use.            
                                                                               
                                                                               
                                                                               
                                                                               
                          Code Topic                                           
                          ---- ----------------------                          
                           1   Editor Data Display                             
                           2   SAG Editor commands                             
                           .   Exit Help                                       
                          ---- ----------------------                          
                   Code .. _                                                   
                                                                               
                                                                               
                                                                               
                                                                               
Enter-PF1---PF2---PF3---PF4---PF5---PF6---PF7---PF8---PF9---PF10--PF11--PF12---
                  Exit                                                  Canc

To differentiate between the modes, there is the new DISPLAY parameter in the CONFIGDB file. The DISPLAY parameter may also be set online using the DISPLAY command. With DISPLAY=BASIC, display programs will be generated in the traditional way, in reporting mode. The names start with RD* (user reports), SR* (delivered system reports) or CR (client reports). With DISPLAY=EDITOR, display programs will be generated using the Software AG Editor and in structured mode. The names start with RX*, SX* or CX.

Like the REGEN (RG) command, other commands that affect the generated programs depend on the setting of the DISPLAY parameter. These are the PRINT (HC), DOWNLOAD (DL), EP (Edit Generated Program) and the PR (Purge Report Definition) command. For viewing report data the commands VIEW (VW) for traditional display programs and VIEWX (VX) for display programs using the Software AG Editor exist in parallel.

This is a sample output of the APPLICATION FILE FIELD USAGE system report, using the Software AG Editor, generated by program SX-00030:

15:39:36                 APPLICATION FILE FIELD USAGE               2016-07-28
                   2016-07-28 15:39:32 - 2016-07-28 15:39:35    Columns 010 072
=====>                                                        Scroll ===>  PAGE
 ***** ****************************** top of data *****************************
 00001 -------- ----- -------- ------------ ------------- ------------------- -
 00002                                Total         Total               Total  
 00003 NAT-Appl  File Fld-Name   Num-of-IOs      Commands            CMD-Resp  
 00004 -------- ----- -------- ------------ ------------- ------------------- -
 00005 SYSREVDB     0                     0            10            0.128500  
 00006             37 O1                  0             2            0.010750  
 00007 ******** ***** ********            0            12            0.139250  
 00008 UKRPE        0                     0             7            0.001750  
 00009              7 LJ                  0             6            0.009750  
 00010 ******** ***** ********            0            13            0.011500  
 00011 ******** ***** ********            0            25            0.150750  
 ***** **************************** bottom of data ****************************
                                                                               

                                                                               
                                                                               
Enter-PF1---PF2---PF3---PF4---PF5---PF6---PF7---PF8---PF9---PF10--PF11--PF12---
      Help  RVSrt Exit  Updat Rfind       -     +           <===  ===>  Canc
15:40:08                 APPLICATION FILE FIELD USAGE               2016-07-28
                   2016-07-28 15:39:32 - 2016-07-28 15:39:35    Columns 025 087
=====>                                                        Scroll ===>  PAGE
 ***** ****************************** top of data *****************************
 00001 -------- ------------ ------------- ------------------- --------------- 
 00002                 Total         Total               Total           Total 
 00003 NAT-Appl   Num-of-IOs      Commands            CMD-Resp         ADA-Dur 
 00004 -------- ------------ ------------- ------------------- --------------- 
 00005 SYSREVDB            0            10            0.128500        0.000047 
 00006                     0             2            0.010750        0.000619 
 00007 ********            0            12            0.139250        0.000666 
 00008 UKRPE               0             7            0.001750        0.000133 
 00009                     0             6            0.009750        0.000790 
 00010 ********            0            13            0.011500        0.000923 
 00011 ********            0            25            0.150750        0.001589 
 ***** **************************** bottom of data ****************************
                                                                               
 
                                                                               
                                                                               
Enter-PF1---PF2---PF3---PF4---PF5---PF6---PF7---PF8---PF9---PF10--PF11--PF12---
      Help  RVSrt Exit  Updat Rfind       -     +           <===  ===>  Canc

Note:
In a new display program one line of max. 4000 byte will be redefined according to the fields in the report definition. The generated order depends on the report definition. For program SX-00030 (APPLICATION FILE FIELD USAGE) we have the base fields NATAPPL (#NAT-LOGON), FILE (#ADABAS-FILE), FBFIELDS (#FB-FIELDS) and the sum of IOS (#NUM-IOS-SUM), COMMANDS (#COMMANDS-PER-ACCT-SUM), CMDRESP (#CMD-RESP-SUM) and ADADURA (#ADA-DURATION-SUM).

Since the line defined as #FORMAT-OUT will be put into the editor buffer, you may change the redefinition (order) of the fields. The headers change accordingly without further changes to the program. However, the first field (#OUT-1, here #NAT-LOGON) must stay at the first place, because output groups will be built according to the value of this field. See a sample below:

graphics/disp_progs_sag_edit.png

After changing the order of the fields in SX-00030 like in the above sample, the output of the APPLICATION FILE FIELD USAGE report is as follows:

11:32:25                 APPLICATION FILE FIELD USAGE               2016-07-29
                   2016-07-29 11:32:19 - 2016-07-29 11:32:24    Columns 010 072
=====>                                                        Scroll ===>  PAGE
 ***** ****************************** top of data *****************************
 00001 -------- --------------- ------------------- ------------- ------------ 
 00002                    Total               Total         Total        Total 
 00003 NAT-Appl         ADA-Dur            CMD-Resp      Commands   Num-of-IOs 
 00004 -------- --------------- ------------------- ------------- ------------ 
 00005 SYSREVDB        0.000144            0.128500            10            0 
 00006                 0.000973            0.010750             2            0 
 00007 ********        0.001117            0.139250            12            0 
 00008 ********        0.001117            0.139250            12            0 
 ***** **************************** bottom of data ****************************







Enter-PF1---PF2---PF3---PF4---PF5---PF6---PF7---PF8---PF9---PF10--PF11--PF12---
       Help  RVSrt Exit  Updat Rfind       -     +           <===  ===>  Canc
11:34:14                 APPLICATION FILE FIELD USAGE               2016-07-29
                   2016-07-29 11:32:19 - 2016-07-29 11:32:24    Columns 025 087
=====>                                                        Scroll ===>  PAGE
 ***** ****************************** top of data *****************************
 00001 --------  ------------------- ------------- ------------ -------- ----- 
 00002                         Total         Total        Total                
 00003 NAT-Appl             CMD-Resp      Commands   Num-of-IOs Fld-Name  File 
 00004 --------  ------------------- ------------- ------------ -------- ----- 
 00005 SYSREVDB             0.128500            10            0              0 
 00006                      0.010750             2            0 O1          37 
 00007 ********             0.139250            12            0 ******** ***** 
 00008 ********             0.139250            12            0 ******** ***** 
 ***** **************************** bottom of data ****************************



                                                                               
 
                                                                               
                                                                               
Enter-PF1---PF2---PF3---PF4---PF5---PF6---PF7---PF8---PF9---PF10--PF11--PF12---
      Help  RVSrt Exit  Updat Rfind       -     +           <===  ===>  Canc

Furthermore, it is possible for the user to define the output format of fields in a report, for example to reduce the output length for a clearly arranged output according to the user's needs. Also fields may be enlarged to avoid overflow.

For this purpose the Natural text member REDEFS in library SYSREVDB, if existing, will be read to obtain user defined formats.

REDEFS may be generated with the latest field definitions using the stand-alone Natural program GENREDEF in library SYSREVDB. To execute GENREDEF, stop SYSREVDB if running, so that you are at the Natural NEXT prompt in library SYSREVDB. Enter GENREDEF in the NEXT or Command line and press Enter. It will generate the Natural Text member REDEFvrs in library SYSREVDB. To activate the just generated REDEFvrs file, rename or copy it to REDEFS. If a Natural Text member with the name REDEFS already exits and you what to keep it, make a backup copy by renaming it or copy it to another library.

Redefinitions may be specified in the section of this file, starting with <FIELDS-REDEF-START> and ending with <FIELD-REDEF-END>. This section will be read when a display program will be (re-)generated. Valid field names with valid format definitions and headers within this section will overwrite the default values. See the documentation at the top of text member REDEFvrs for the format of such an entry. Also, the REDEFvrs file contains the latest SYSREVDB field definitions as comments.

The format of a variable (A, B, N) may not be changed. Keep in mind, that the minimum column width is the size of the header. Some output columns may be reduced in width just by a shortened header.

User defined fields may not be redefined here.

The fields of APPLICATION FILE FIELD USAGE may be redefined like this:

<FIELDS-REDEF-START>
NATAPPL  A8     NAT-Appl         /* A8     NAT-Appl
FILE     N5     File             /* N5     File
FBFIELDS A2     FB               /* A2     Fld-Name
IOS      N8     NumOfIOs         /* N12    Num-of-IOs
COMMANDS N8     Commands         /* N13    Commands
CMDRESP  N4.4   CMD-Resp         /* N12.6  CMD-Resp
ADADURA  N2.4   ADA-Dur          /* N8.6   ADA-Dur
<FIELDS-REDEF-END>

The above output example would then easily fit on one page.

  12:54:22                 APPLICATION FILE FIELD USAGE               2017-09-28
                    2017-09-28 12:53:31 - 2017-09-28 12:54:22    Columns 010 054
 =====>                                                        Scroll ===>  PAGE
  ***** ********************* top of data ********************                 
  00001 -------- ----- -- -------- -------- --------- -------                  
  00002                      Total    Total     Total   Total                  
  00003 NAT-Appl  File FB NumOfIOs Commands  CMD-Resp ADA-Dur                  
  00004 -------- ----- -- -------- -------- --------- -------                  
  00005 SYSREVDB     0           0       29    0.4640  0.0000                  
  00006 ******** ***** **        0       29    0.4640  0.0000                  
  00007 ******** ***** **        0       29    0.4640  0.0000                  
  ***** ******************* bottom of data *******************                 
                                                                               
                                                                               
 Enter-PF1---PF2---
       Help  RVSrt Exit  Updat Rfind       -     +                       Canc

For customizing the output, there are further parameters in the CONFIGDB file.

  • HDR-LINE-COUNT: specifies after how many data lines header lines will be inserted (default: one header per page).

  • FIXED-CHARS: specifies the number of fixed bytes in the editor area when scrolling left/right (default: fix length of first column).

  • MAX-NO-OF-LINES: specifies the maximum number of lines loaded into the editor buffer pool (default: 3000).

See also Modifying Configuration Parameters in the Installations and Operations for z/OS documentation.

In contrast to the traditional display programs, those using the Software AG Editor read all selected data (live or history) into an editor session, before the data will be displayed. For live data from the LS screen, the data will be updated with PF4 (Updat). The traditional display programs updated the live data with every ENTER. Since all data is available in an editor session, the Redisplay function becomes obsolete. Furthermore, for the DOWNLOAD and the PRINT function and in batch, the data will be loaded into an editor session first. From there the data will be read for output.

It is also possible to save live data on the Natural system file. Special Review data files will be created. These files can be read, listed and purged from within an editor session. They cannot be accessed with other Natural functions for Natural members. To keep live data, alternatively use the DOWNLOAD function. Creating history data is possible too.

  16:13:34              ***** Review Adabas Tools *****               2016-07-28
                                  Select Member                                 
                                                                                
        C      Member      Type         User        Date        Time            
        -      --------    -----------  --------    ----------  --------        
        _      ABS         REV-RESULT   GGS         2016-06-21  12:38:33        
        _      RATED1      REV-RESULT   GGS         2016-06-21  11:09:53        
        _      RETED3      REV-RESULT   GGS         2016-06-24  12:17:23        
        _      XYZ         REV-RESULT   GGS         2016-03-16  15:54:56        
                                                                                
                                                                                
                                                                                
                                                                                
                                                                                
 Enter-PF1---PF2---PF3---PF4---PF5---PF6---PF7---PF8---PF9---PF10--PF11--PF12---
       Help        Exit

Since the output of data is handled with a Software AG Editor interface and no longer with one WRITE/DISPLAY statement per line, the line size limit was increased from 250 to 4000 for display programs using the Software AG Editor. Both, the traditional display programs as well as the display programs using the Software AG Editor, access the same report definitions, the same live data from the Adabas Review nucleus and the same history data on the Adabas Review system file.

Note:
Segments of Adabas buffer fields (e.g. IBSEG01) are not displayed in hexadecimal format. To see this data in hexadecimal format use the HEX ON|OFF editor command.


Traditional Display Programs vs. Display Programs Using Software AG Editor

Feature Traditional Display Programs Display Programs Using Software AG Editor
DISPLAY BASIC EDITOR
Natural Programming Mode Reporting Mode Structured Mode
Names of Display Programs RD-*, SR-*, CR-* RX-*, SX-*, CX-*
Command to Display Data VIEW, VW VIEWX, VX
Other Commands REGEN ALL (RG), DOWNLOAD (DL), PRINT (HC), EP, PR with DISPLAY=BASIC REGEN ALL (RG), DOWNLOAD (DL), PRINT (HC), EP, PR with DISPLAY=EDITOR
Sorting Report Results ("Display By" report option) PF2 (Sort) or SORT command PF2 (RVSrt)
Sorting Report Rows -/- SORT Editor command
Download Columns without delimiter Variable delimiter, prompted in a popup window
Browsing Data Top (--), Down (+), Redisplay, Left, Right Top (--), Bottom (++), Up (-, -n), Down (+, +n), Left, Right, etc.
Manually change data No Yes, for example to prepare data for download or print
Save Live Data on Natural System File No Yes
Variable Printer Name No Printer name prompted, processed by the Natural statement DEFINE PRINTER (1) OUTPUT <printer-id>.
Variable Column Order According to Report Definition According to Report Definition. Variable Redefinition in Natural Display Program may be changed
Resizing of output columns No Yes
Live Data Updated with every ENTER Updated with PF4 (Updat)