QUSRBRM.ADD_ENTERPRISE_REPORT_DEFINITION Procedure

The QUSRBRM.ADD_ENTERPRISE_REPORT_DEFINITION procedure adds a report definition to BRMS enterprise.

Parameters

QUSRBRM.ADD_ENTERPRISE_REPORT_DEFINITION (REPORT_DEFINITION=> report-definition, SYSTEM_NAME=> system-name, GENERATION_TIME=> generation-time, COMMAND=> command, NUMBER_REPORTS=> number-reports, SEND_ERROR_EMAIL=> send-error-email, SEND_REPORT_EMAIL=> send-report-email, FREQUENCY_INTERVAL=> frequency-interval, WEEK_DAYS=> week-days, WAIT_DAYS=> wait-days,  DESCRIPTION=> description)

report-definition (required)

Specifies the unique report definition name. Possible values are:

report-definition

Specifies the unique report definition name. The report definition is not case-sensitive and must be 1 to 10 characters long.

 

system-name (required)

Specifies the system name associated with the report definition. Possible values are:

*ALLNODES

Specifies to run this report definition on all nodes in the enterprise network.

system-name

Specifies the system name where the report definition will be run.

The system format is nnnnnnnn.ssssssss where nnnnnnnn is the network identifier and ssssssss is the local location name. 

 

generation_time (required)

Specifies the time of day to run the report definition. Possible values are:

generation-time

Specifies the time to run the report definition. The valid time format is a six characters 'hhmmss'.

 

command (required)

Specifies the report command to run. Possible values are:

command

Specifies the full command with its associated parameters to run. The command can be up to 7000 character long.

The supported BRMS report commands are:

  • DSPLOGBRM

  • PRTMOVBRM

  • PRTRPTBRM

  • STRRCYBRM

  • STRMNTBRM

 

number-reports (optional)

Specifies the number of previously generated reports to keep. Possible values are:

number-reports

Specifies the number of previously generated reports to keep. Valid range: 0 to 99,999

 

send-error-email (optional)

Specifies if an email notification should be sent if errors occur running the report. Possible values are:

NO

Specifies to not send an email notification. This is the default if the value is not specified.

YES

Specifies to send an email notification.

 

send-report-email (optional)

Specifies if an email notification should be sent with the generated report output. Possible values are:

NO

Specifies to not send an email notification. This is the default if the value is not specified.

YES

Specifies to send an email notification.

 

frequency-interval (optional)

Specifies the report frequency of when the report definition will run. Possible values are:

DAYS

Specifies to generate the report using a number of days to wait before running the report again. This is the default if the value is not specified.

WEEKLY

Specifies to run the report weekly on specified days of the week.

 

week-days (optional)

Specifies the days of the week when the report definition will run when the frequency-interval is set to WEEKLY. Possible values are:

NULL

The optional value has not been specified.

week-days

Specifies which day of the week to run the report definition. This supports a list of blank separated values which identify which day of the week to run the report. If a day of the week is not listed, the report will not run on that day.

 Valid list values:

  • *ALL (all days of the week)

  • MON

  • TUE

  • WED

  • THU

  • FRI

  • SAT

  • SUN

 

wait-days (optional)

Specifies the number days to wait before running the report definition when the frequency-interval is set to DAYS. Possible values are:

NULL

The optional value has not been specified.

wait-days

Specifies the number of days to wait before running the report definition. Valid range: 0 to 999  

 

description (optional)

Specifies a text description for the report definition. Possible values are:

NULL

The optional value has not been specified.

description

Specifies a description for the report definition. The description can be up to 128 characters long.

 

Authorization: The privileges held by the authorization ID of the statement must include the following:

  • *EXECUTE SQL privilege on this procedure

The BRMS Network feature is required. The schema is QUSRBRM.                       

Examples:

To add a new report definition named WEEKLY to run the STRRCYBRM command every Monday at 10AM on all systems in the enterprise network and sending the generated reports to the system contact and keeping reports for the last 31 days.

call QUSRBRM.ADD_ENTERPRISE_REPORT_DEFINITION(

       REPORT_DEFINITION=> 'Weekly',

       SYSTEM_NAME=> '*ALLNODES',

       GENERATION_TIME=> '100000',

       COMMAND=> 'QSYS/STRRCYBRM OPTION(*SYSTEM) ACTION(*REPORT) USESAVF(*NO) SHWDLTLIB(*NO)',

       FREQUENCY_INTERVAL=> 'WEEKLY',

       WEEK_DAYS=>'MON',

       NUMBER_REPORTS=> '31',

       SEND_REPORT_EMAIL=> 'YES')

call QUSRBRM.ADD_ENTERPRISE_REPORT_DEFINITION(

       REPORT_DEFINITION=> 'Weekly',

       SYSTEM_NAME=> '*ALLNODES',

       GENERATION_TIME=> '100000',

       COMMAND=> 'QSYS/STRRCYBRM OPTION(*SYSTEM) ACTION(*REPORT) USESAVF(*NO) SHWDLTLIB(*NO)',

       FREQUENCY_INTERVAL=> 'WEEKLY',

       WEEK_DAYS=>'MON',

       NUMBER_REPORTS=> '31',

       SEND_REPORT_EMAIL=> 'YES')

To add a new report definition named DAILY to run the STRMNTBRM command every day at 5AM on systems APPN.SYSTEM1 notifying contacts of errors:

call QUSRBRM.ADD_ENTERPRISE_REPORT_DEFINITION(

      REPORT_DEFINITION=>'Daily',

      SYSTEM_NAME=>'APPN.SYSTEM1',

      GENERATION_TIME=> '050000',

      COMMAND=> 'QSYS/STRMNTBRM',

      FREQUENCY_INTERVAL=> 'WEEKLY',

      WEEK_DAYS=>'*ALL',

      SEND_ERROR_EMAIL=> 'YES')

call QUSRBRM.ADD_ENTERPRISE_REPORT_DEFINITION(

      REPORT_DEFINITION=>'Daily',

      SYSTEM_NAME=>'APPN.SYSTEM1',

      GENERATION_TIME=> '050000',

      COMMAND=> 'QSYS/STRMNTBRM',

      FREQUENCY_INTERVAL=> 'WEEKLY',

      WEEK_DAYS=>'*ALL',

      SEND_ERROR_EMAIL=> 'YES')

Error Messages

The following error SQLSTATEs may be returned by this procedure.

U0001

Report Definition name is not valid.

U0002

Server is not valid.

U0003

Server is not an enterprise node.

U0004

Report Definition already exists for the specified system.

U0006

Generation Time is required.

U0007

Generation Time is invalid.

U0008

Command is required.

U0009

Command syntax error.

U0010

Command not allowed. Must be DSPLOGBRM, PRTMOVBRM, PRTRPTBRM, STRMNTBRM, or STRRCYBRM.

U0011

Number of reports to keep not valid. Must be 0 - 99999.

U0012

Send error email not valid. Must be NO or YES.

U0013

Send report email not valid. Must be NO or YES.

U0014

Frequency interval not valid. Must be DAYS or WEEKLY.

U0015

Week days only allowed when frequency interval is WEEKLY.

U0016

Week days not valid.

U0017

Must select at least 1 week day when frequency interval is WEEKLY.

U0018

Wait days only allowed when frequency interval is DAYS.

U0019

Wait days not valid. Must be 0 - 999.

U0021

Unable to add Report Definition.

U0024

*ALLNODES not allowed when the Report Definition already exists for a node.

U0025

Report Definition already exists for *ALLNODES. Report Definition not added.

U9997

Functional authority to BRMS Enterprise QIBM_Q1A_ENT required.

U9998

BRMS Network and Advanced Functions features required.

U9999

Illegal execution.

Privacy Policy | Cookie Policy | Impressum
From time to time, this website may contain technical inaccuracies and we do not warrant the accuracy of any posted information.
Copyright © Fortra, LLC and its group of companies. All trademarks and registered trademarks are the property of their respective owners.