Generating a new user-defined report

Generating a new user-defined report

Overview

This section describes how you can use option S.2 to generate new reports. Please note that the panel-assisted creation of _beta smf reports provides support for only a basic subset of the _beta smf functions, but you can always modify the generated JCL and LGF control statements if you need to make use of more advanced functions.

In this example, we will generate a new report for the subtype 25 record (spool access) of _beta doc|z.

Procedure

To generate a new user-defined report:

  1. In the "Display Record Definitions" panel, enter line command S in front of the subtype that you want to generate the report for.

    This will display all fields of this record in a table (field names with ### instead of the subtype number indicate a record header field):

    PEB6LG35 ---------------------------------------------- Row 15 of 43
    Command ===> ________________________________________________ Scroll ===> PAGE

    Display Record Definition Page 1 of 3
    ( LEFT/RIGHT )
    Vendor : BETA Subtype : 025
    Product : B93 Title : SPOOL ACCESS RECORD

    Prim. Commands: GEN (erate) EXE (cute) RES (et) CLE (ar)
    Line Commands: S - Select F - Filter US - Undo Select UF - Undo Filter

    Sel Field Req Fmt Title
    S###SYSPLEX C SYSPLEX NAME
    S###SYSNAME C SYSTEM NAME
    S###SYSCLONE C SYSCLONE NAME
    S###SMFID C SMF ID
    S###CPUID C CPU ID
    S025USER C USER ID
    S025RQUST C REQUESTOR
    S025FORM C FORM NAME
    S025EXT C EXTENSION NAME
    S025REPORT C REPORT NAME
    S025TITLE C LIST/REPORT TITLE
    S025JOBNM C JOB NAME

  2. Scroll to the first field you want to include in your report and enter line command S in front of the field.

    This will select the field for output in your report. For certain data types of fields, you will be requested to provide formatting instructions in an additional panel before the field is selected.

  3. Repeat this for the other fields you want to select for your report. Optionally, you can also define filters for one or more fields using line command F. You will be requested to provide filtering instructions in an additional panel when defining a filter.

    Your current requests (fields selected for output (line command S) and fields used in filters (line command F)) are shown in the table in column Req. The following panel shows four fields that are selected, one of them with a filter.

    PEB6LG35 ---------------------------------------------- Row 15 of 43
    Command ===> ________________________________________________ Scroll ===> PAGE

    Display Record Definition Page 1 of 3
    ( LEFT/RIGHT )
    Vendor : BETA Subtype : 025
    Product : B93 Title : SPOOL ACCESS RECORD

    Prim. Commands: GEN (erate) EXE (cute) RES (et) CLE (ar)
    Line Commands: S - Select F - Filter US - Undo Select UF - Undo Filter

    Sel Field Req Fmt Title
    S###SYSPLEX C SYSPLEX NAME
    S###SYSNAME C SYSTEM NAME
    S###SYSCLONE C SYSCLONE NAME
    S###SMFID C SMF ID
    S###CPUID C CPU ID
    S S025USER S F C USER ID
    S025RQUST C REQUESTOR
    S S025FORM S C FORM NAME
    S S025EXT S C EXTENSION NAME
    S S025REPORT S C REPORT NAME
    S025TITLE C LIST/REPORT TITLE
    S025JOBNM C JOB NAME

  4. After you have selected all your fields and defined all your filters, enter one of the following primary commands to trigger the creation of JCL for your report:
    • GEN if you want variables to be preserved
    • EXE if you want variables to be substituted

    This will display the "Generate Report" panel.

  5. Accept or overwrite the displayed values (defaults from S.1) in this panel and press ENTER.

    This generates the JCL for your report and displays it in the ISPF editor.

    PEB6LG20 ---------------------------------------------- ------ Columns 001 072
    Command ===> ________________________________________________ Scroll ===> CSR_
    Vendor : BETA
    Save on database: DBCREate - Create LGF report Product : B93
    DBREPlace - Replace LGF report Subtype : 025
    -------------------------------------------------------------------------------
    ****** ***************************** Top of Data ******************************
    000001 &LGFJCR1
    000002 //* +----1----+----2----+----3----+----4----+----5----+----6----+----7-
    000003 //* REPORT NAME : &LGFRPNAM
    000004 //* REPORT ID : &LGFRPIDC
    000005 //* REPORT TITLE: &LGFTITLE
    000006 //* GENERATED : ON &ZDATE AT &ZTIME BY &ZUSER
    000007 //* +----1----+----2----+----3----+----4----+----5----+----6-- SEB6LG0G
    000008 //&LGFRPIDC EXEC PGM=BST16LGF,REGION=0M,PARM=(L)
    000009 //STEPLIB DD DISP=SHR,
    000010 // DSN=&LGFLLIB1
    000011 // DD DISP=SHR,
    000012 // DSN=&LGFLLIB2
    000013 //LGFLICX DD DISP=SHR,
    000014 // DSN=&LGFLICXF
    000015 //LGFINSMF DD DISP=SHR,
    000016 // DSN=&LGFINDSN,
    000017 // DCB=BUFNO=250

  6. Check and if necessary modify the JCL in the ISPF editor.
  7. Follow instructions to save your report on the database.

Saving a report

  • If you want to create a new report:
    1. Enter the primary command DBCREATE (short form: DBCRE) to display the "Create Report Definition" panel.
    2. Specify the name and ID of your report (both required) and a title (optional) in the panel and press ENTER to save the report.

      PEB6LR99 ----------------------------------------------------------------------
      Command ===> _________________________________________________________________

      Create Report Definition

      Vendor : BETA
      Product : B93
      Subtype : 025

      Report Type : CUST
      Report Name ===> MY_B93_SUBTYPE_025..............
      Report ID ===> AREJS25

      Title ===> My report for B93 subtype 25 (Spool Access)_________________


      For Non-Beta Vendor

      Record Type : ###


      Press the ENTER key to insert the definition.
      Press the END key to abort the processing.

    Result: You are returned to the "Display Record Definition" panel. The message Insert successful in the upper right corner of this panel indicates that your report has been saved. You can now continue to work with your existing field and filter requests or press PF3 to leave this panel if you are finished.

  • If you want to overwrite an existing report:
    1. Enter the primary command DBREPLACE (short form: DBREP) to display the "Replace Report Definition" panel.
    2. Type * (or another mask) in the Report Name and the Report ID field and press ENTER to display a table with your existing reports for this product/subtype combination.
    3. Enter the line command S in front of the appropriate report to select it.

      This will return you to the "Replace Report Definition" panel.

    4. Change the title of the report if necessary and press ENTER to save the report.

    Result: You are returned to the "Display Record Definition" panel. The message Update successful in the upper right corner of this panel indicates that your report has been saved. You can now continue to work with your existing field and filter requests or press PF3 to leave this panel if you are finished.

Additional output format instructions

An additional panel requesting output format instructions is displayed when you select fields of certain data types. Press ENTER to use default instructions, or type the desired value in each field and then press ENTER. If you leave the panel with F3, the field will not be selected.

If the data type of the field is D (date), specify the output format of the date value in the displayed panel:

PEB6LG98 ----------------------------------------------------------------------
 Command ===> _________________________________________________________________

 Select Record Field

 Field Name : S###DTE
 Field Format : D date

 Additional Output Format Instruction

 Date Output ===> _ blank - standard output
 W - week numberdate in format yyyy-Wnn
 D - day of the week like MON, TUE, etc.








 Press the ENTER key to execute your request.
 Press the END key to return to the previous panel.

If the data type of the field is B (binary), specify the output format of the field value in the displayed panel; type the appropriate value in the Accumulate field if you want _beta smf to accumulate the values of this field when you run your report.

PEB6LG97 ----------------------------------------------------------------------
 Command ===> _________________________________________________________________

 Select Record Field

 Field Name : S###STY
 Field Format : B binary

 Additional Output Format Instruction
 Binary Output ===> _ blank - standard output
 0 - suppress leading zeros
 Accumulate ===> _ blank - no accumulation
 + - default
 K - kilo
 M - mega
 G - giga
 T - tera




 Press the ENTER key to execute your request.
 Press the END key to return to the previous panel.

A similar panel will be displayed for the data types M and R (microseconds with and without mask), P (packed), K (1024 units) and N (100th seconds).

Additional filter instructions

An additional panel requesting filter instructions is displayed when you select fields for filtering. You can specify filters the data types binary and character and for fields with translation instructions.

If the data type of the field is B (binary), the displayed panel allows you to specify a single value or a value range as filter criterion.

PEB6LG88 ----------------------------------------------------------------------
 Command ===> _________________________________________________________________

 Select Record Field for Filtering

 Field Name : S000PAGES
 Field Format : B binary
 Field Length : 00004 Output Length : 00010

 NUMBER OF PAGES

 Field Op Value/Mask (*) operator: EQ, NE, LT, GT, LE, GE

 PAGES ge 1000................
 le 5000________________






 Press the ENTER key to execute your request.
 Press the END key to return to the previous panel.

The corresponding filter instructions in the generated JCL will look like this:

*---+----1----+----2----+----3----+----4----+
+SFILTER=PAGES +0000001000
+SFILTER=PAGES -0000005000
+ANDFILTER=SPAGES

If the data type of the field is B (binary), the displayed panel allows you to specify up to three filter criteria (OR-connection).

PEB6LG89 ----------------------------------------------------------------------
 Command ===> _________________________________________________________________

 Select Record Field for Filtering

 Field Name : S025USER
 Field Format : C character
 Field Length : 00008 Output Length : 00008

 USER ID

 Field Op Value/Mask (*) operator: EQ, NE

 USER eq b93adm1............
 eq b93adm2____________
 __ ___________________





 Press the ENTER key to execute your request.
 Press the END key to return to the previous panel.

The corresponding filter instruction in the generated JCL will look like this:

*---+----1----+----2----+----3----+----4----+
+SFILTER=USER =B93ADM1*
+SFILTER=USER =B93ADM2*

Fields with +XLAT-statements

If the database includes translation instructions for a field (+XLAT statements), the displayed panel shows a list of the translated values. Specify an operator (EQ (equal) and NE (not equal)) to selected a filter criterion from the displayed list.

PEB6LG85 ---------------------------------------------------------- Row 1 of 9
 Command ===> _________________________________________________________________

 Select Record Field for Filtering

 Field Name : S000ATTR
 Field Format : C character
 Field Length : 00001 Output Length : 00001

 ATTRIBUTE BYTE

 Press the ENTER key to execute your request.
 Press the END key to return to the previous panel.

 Field Op Value (*) operator: EQ, NE
 ATTR __ CICS
 __ EXTENDED_INPUT
 __ FFSI
 eq IMPORT
 eq AUTO_IMPORT
 __ JES
 __ RELOAD
 __ SUBSYS
 __ BETA39

The corresponding filter instructions in the generated report will look like this:

*---+----1----+----2----+----3----+----4----+
+SFILTER=ATTR =IMPORT
+SFILTER=ATTR =AUTO_IMPORT

Filtering fields with output format instructions

Filter operations are carried out as string comparisons on converted field content when you run a _beta smf report. The value of the filter instruction will be compared as a string to the final value of the field as it has been formatted/translated for output.

Please note that the assistant ignores special output format instructions like the suppression of leading zeros when you add filtering instructions. You will have to edit the generated JCL manually to make your filter work in this special case.

Controlling LGFLOG output

_beta smf writes the converted SMF data to DD LGFLOG. The values in the "Generate Report" panel control the format and destination of this output.

PEB6LG99 ----------------------------------------------------------------------
 Command ===> _________________________________________________________________

 Generate Report

 Vendor : BETA Subtype : 025
 Product : B93 Title : SPOOL ACCESS RECORD

 LGFLOG Output Format ===> XML (S)td, (C)sv, (X)ml
 UTF-8 Encoding ===> YES (Y)es, (N)o
 LGFLOG Output JCL Parameter
 Sysout Class ===> *

 Dataset Name ===> TRASH.BETA93.V6R1M0.LGFLOG____________________
 Disposition ===> SHR (S)hr, (N)ew, (M)od, (O)ld
 Space Requirement SMS Information
 Unit ===> CYL StorClass ===> ________
 Volume ===> SMS___ Primary ===> 1__ MgmtClass ===> ________
 Unit ===> ##NONE## Second. ===> 1__ DataClass ===> ________


 Press the ENTER key to confirm the data or to update them temporarily.
 Press the END key to return to the previous panel.

Accept or overwrite the values displayed in this panel:

  • LGFLOG Output Format controls the format of LGFLOG output (corresponds to _beta smf parameter +LGFLOGFMT).
  • LGFLOG output is encoded in EBCDIC by default. Specifying Yes in the UTF‑8 Encoding field causes the inclusion of a conversion step in the JCL to convert data to UTF‑8. Use binary transfer when moving a converted dataset from the z/OS mainframe to another platform.
  • Sysout Class specifies the class to be used for LGFLOG output. Leave the Sysout Class field blank if LGFLOG output is to written to a dataset, and specify the allocation attributes of the dataset in the appropriate fields.