broadcom.dbm_db2.check_ddl (1.27.2) — module

Validate the syntax of input DDL and optionally verify Db2 object dependencies

| "added in version" 1.0.0 of broadcom.dbm_db2"

Authors: Rabah Beggar <rabah.beggar@broadcom.com> (@broadcom), Sergei Osadchuk <sergei.osadchuk@broadcom.com> (@broadcom)

| supported by Broadcom

This plugin has a corresponding action plugin.

Install collection

Install with ansible-galaxy collection install broadcom.dbm_db2:==1.27.2


Add to requirements.yml

  collections:
    - name: broadcom.dbm_db2
      version: 1.27.2

Description

Validate the syntax of input DDL and optionally verify Db2 object dependencies. Use this command to ensure that the syntax of the input DDL is valid. You can also optionally verify that the objects to be created do not exist on the Db2 subsystem and that the related objects that are required for successful creation of the objects exist on the Db2 subsystem or in the input DDL. You can generate input DDL using the 'zowe dbm generate ddl' command.

For details about command usage for automation, see DBM-Db2 samples at https://github.com/BroadcomMFD/dbm-db2-for-zowe-cli.

Usage examples

  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: Validate DDL statement syntax of the DDL statements in the sample.sql file on the 'TEST' Db2 subsystem
  broadcom.dbm_db2.check_ddl:
    local_input_ddl_filename: sample.sql
    target_db2: TEST
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: Validate DDL statement syntax and verify object dependencies
  broadcom.dbm_db2.check_ddl:
    local_input_ddl_filename: sample.sql
    target_db2: TEST
    verify: yes

Inputs

    
host:
    description:
    - Host name of service on the mainframe.
    required: false
    type: str

port:
    description:
    - Port number of service on the mainframe.
    required: false
    type: int

user:
    description:
    - User name to authenticate to service on the mainframe.
    required: false
    type: str

sqlid:
    description:
    - Specifies the authorization ID that is used as the value in generated SET CURRENT
      SQLID statements most of the time.
    required: false
    type: str

authid:
    description:
    - Specifies the primary Db2 authorization ID (user ID) that is used to establish a
      connection between Db2 and a process.
    required: false
    type: str

verify:
    choices:
    - 'yes'
    - 'no'
    description:
    - Specifies whether to verify that the objects to be created do not exist on the Db2
      subsystem and that the related objects that are required for successful creation
      of the objects exist on the Db2 subsystem or in the input DDL.
    - ''
    - 'Default value: no '
    required: false
    type: str

password:
    description:
    - Password to authenticate to service on the mainframe.
    required: false
    type: str

protocol:
    choices:
    - http
    - https
    description:
    - Specifies the communication protocol to use between the zowe dbm-db2 client and
      the DBM Data Service.
    required: false
    type: str

cert_file:
    description:
    - The file path to a certificate file to use for authentication.
    - ''
    - 'Note: The CLI does not support certificate files that require a password. For more
      information, search Troubleshooting PEM Certificates in Zowe Docs.'
    required: false
    type: path

job_cards:
    description:
    - Specifies a string array of z/OS JCL JOB statements.
    elements: str
    required: false
    type: list

error_file:
    description:
    - Specifies the local output error file in YAML format that contains basic execution
      information, connection details, dbm-db2 profile parameters, used arguments, and
      errors that occurred during execution of the command.
    - '      '
    - 'Default value: error.log '
    required: false
    type: str

target_db2:
    description:
    - Specifies the target Db2 subsystem or data sharing group where you want to validate
      the DDL.
    - '     '
    - 'Note: If you specify the data sharing group, the first active Db2 subsystem in
      the group is used. '
    required: true
    type: str

modification:
    description:
    - Identifies a named set of server-managed default parameter values that control the
      execution behavior of the zowe dbm-db2 commands. For example, you can use a modification
      to identify a set of default values that differ from the set of values that are
      normally used.
    - '  '
    - For more information about using the modification option, see the DBM Data Service
      documentation at https://techdocs.broadcom.com/db2mgmt .
    required: false
    type: str

cert_key_file:
    description:
    - The file path to a certificate key file to use for authentication.
    required: false
    type: path

environment_list:
    description:
    - Specifies an object of one or more values consisting of a Db2 subsystem ID and a
      DBM Data Service environment pair. The paired entry identifies the DBM Data Service
      environment to use for a subsystem that is accessible through multiple DBM Data
      Service environments. For more information about configuring the DBM Data Service,
      see the Database Management Solutions for Db2 for z/OS documentation at https://techdocs.broadcom.com/db2mgmt.
    required: false
    type: str

reject_unauthorized:
    default: true
    description:
    - Reject self-signed certificates.
    required: false
    type: bool

work_dataset_prefix:
    description:
    - Specifies the prefix that is used as the high level qualifier in z/OS work data
      set names.
    required: false
    type: str

overwrite_output_files:
    description:
    - Specifies whether to overwrite output files when they already exist.
    required: false
    type: bool

local_input_ddl_filename:
    description:
    - Specifies the local input file that contains the DDL statements for the Db2 objects
      that you want to validate on a target subsystem. Typically, this file is created
      by a 'zowe dbm generate ddl' command or retrieved from an archive. You can edit
      this file.
    required: true
    type: str

Outputs

data:
  description: Data from the module execution (a data structure). The items of this
    dict are set as individual return values on the top level as well.
  elements: dict
  returned: when returned data is a dictionary
  type: list
error:
  contains:
    additional_details:
      description: Detailed message about the failure.
      type: str
    msg:
      description: Short description of the result or failure.
      type: str
    request:
      description: HTTP method used to invoke API service request.
      returned: API request failed
      type: str
    resource:
      description: URI of the resource of the API service request.
      returned: API request failed
      type: str
  description: More details about why the action has failed. If the failure is when
    calling an API service, the response contains the connection parameters.
  returned: error
  type: complex
failed:
  description: A boolean that indicates if the task was failed or not.
  returned: always
  type: bool
list:
  description: Data from the module execution (a list of data structures).
  elements: dict
  returned: when returned data is a list
  type: list
msg:
  description: Short description of the result or failure.
  returned: sometimes
  type: str
rc:
  description: Exit code of the module, successful exit code is 0, failure is typically
    1 or higher.
  returned: always
  type: int
stderr:
  description: Details of the error.
  returned: error
  type: str
stdout:
  description: Summary of the result.
  returned: success
  type: str