## zowe › mat › profile › invoke

Invoke a MAT monitor profile to start measurement.

#### Usage

zowe mat profile invoke [options]

#### Required Options

- `--profile` (string)

  - Specifies the name of the profile in MAT that you invoke (e.g. PROFILE1). Values: 1 to 8 characters, a combination of alphanumeric and national characters (A-Z, 0-9, and @), the first character must be an alphabetic or @. The profile name must not contain characters # and $.

- `--jobname` (string)

  - Specifies the name of the job to be measured (e.g. JOB1). Values: 1 to 8 characters, alphanumeric (A-Z capitals only and 0-9), national (#, $, @), and wildcards (* or %).

- `--targsys` (string)

  - Specifies the target system in SYSPLEX. Values: a comma separated list of up to 4 values is allowed, maximum 8 characters each, a combination of alphanumeric (A-Z and 0-9) and national (@,#,$), the first character must be an alphabetic (A-Z) or a national (@, #, $) (e.g. AA31,AA32).

#### Options

- `--mondsn` (string)

  - Specifies the monitor data set name where MAT saves the measurement (e.g. DEMO.MAT.MONITOR). Values: data set name pattern, maximum 46 characters. If not specified, your default MAT monitor DSN pattern is applied.

- `--moiuuid` (string)

  - Specifies the MOI UUID. Values: maximum 61 characters, alphanumeric (A-Z and 0-9). If you use this parameter for command execution, the value cannot be blank.

- `--moitimestamp` (string)

  - Specifies the MOI timestamp. Values: maximum 12 characters, numbers only (0-9). If you use this parameter for command execution, the value cannot be blank.

- `--listing` (boolean)

  - Activates automated registration of Cobol, C/C++, and Assembler program listings through Endevor® footprints. After completion of the measurement that you invoke with the --listing parameter, the MAT Analyze plug-in for Zowe CLI automatically retrieves the program listing that is associated with the monitored job and registers the listing with MAT. A registered program listing enhances the analysis possibilities of the 'codeview histogram' command the 'codeview histogram' command and enables you to inspect the source code statements that are associated with specific modules and CSECTs.

#### MAT Profile Options

- `--protocol` | `-o` (string)

  - Specifies the protocol defined for the MAT REST API server (http or https).

    Default value: https
    Allowed values: http, https

- `--host` | `-H` (string)

  - Specifies the hostname or IP address defined for the MAT REST API server (e.g. 127.0.0.0 or localhost).

- `--port` | `-P` (number)

  - Specifies the server port (e.g. 8080).

- `--user` | `-u` (string)

  - Your mainframe username.

- `--password` | `--pw` (string)

  - Your mainframe password.

- `--base-path` | `--bp` (string)

  - The base path for your API mediation layer instance. Specify this option to prepend the base path to all resources when making REST requests. Do not specify this option if you are not using an API mediation layer.

- `--reject-unauthorized` | `--ru` (boolean)

  - Reject self-signed certificates.

    Default value: true

- `--listingDir` | `--ldir` (string)

  - Specifies the directory where you want to store the registered program listings (e.g. 'c:\listings') for your immediate source code inspection. You can use the advantage of automated listing registration with MAT and listing retrieval through Endevor® footprints for Cobol, C/C++, and Assembler programs. When a source program listing is registered with MAT, you can enhance the histogram analysis data with the program listing details that pertain to the specific CSECT and program statement. The listing is transfered to the specified directory, which enables you to navigate directly to the line of the source code in you VS Code IDE and inspect the program statement. To use the listing retrieval option through Endevor® footprints, you need to have the Endevor® Web Services installed and configured and specify the Endevor® web server details in the MAT database configuration.

#### Profile Options

- `--mat-profile` | `--mat-p` (string)

  - The name of a (mat) profile to load for this command execution.

- `--base-profile` | `--base-p` (string)

  - The name of a (base) profile to load for this command execution.

#### Base Connection Options

- `--token-type` | `--tt` (string)

  - The type of token to get and use for the API. Omit this option to use the default token type, which is provided by 'zowe auth login'.

- `--token-value` | `--tv` (string)

  - The value of the token to pass to the API.

- `--cert-file` (local file path)

  - The file path to a certificate file to use for authentication

- `--cert-key-file` (local file path)

  - The file path to a certificate key file to use for authentication

#### Examples

- Invoke the PROFILE1 monitor profile to measure job JOB1 that runs on the AA31 system :

  - `zowe mat profile invoke --profile PROFILE1 --jobname JOB1 --targsys AA31`

- Invoke the PROFILE1 monitor profile to measure job JOB1 that runs on the AA31 system and save the measurement result in the DEMO.MAT.MONITOR.PROFILE1 data set:

  - `zowe mat profile invoke --profile PROFILE1 --jobname JOB1 --targsys AA31 --mondsn DEMO.MAT.MONITOR.PROFILE1`

- Invoke the PROFILE1 monitor profile to measure job JOB1 that runs on the AA31 system and register the program listing:

  - `zowe mat profile invoke --profile PROFILE1 --jobname JOB1 --targsys AA31 --listing`

- Invoke the PROFILE1 monitor profile to measure job JOB1 that runs on the AA31 system with the specific MAT profile details defined:

  - `zowe mat profile invoke --profile PROFILE1 --jobname JOB1 --targsys AA31 --host "example.com" --port 12345 --user johndoe --password qwerty`