EnterpriseOn-premisesZ Understand and Refactor

Managing analysis projects

Use bobctl understand cli to manage Z Understand analysis projects and copy source files into the workload.

The bobctl understand cli command provides a command-line interface for managing analysis projects. It runs commands within the Z Understand pod directly from your local environment.

./bobctl understand cli
FlagDescription
-aLaunches an interactive bash shell session within the Z Understand pod.
<args>Arguments passed directly to the cli-tunnel.sh script running inside the Z Understand pod.

Common examples:

./bobctl understand cli --list-projects               # list projects
./bobctl understand cli -b MyProject                  # build a project
./bobctl understand cli -c COBOL.ini MyProject        # create a project from an initialization file
./bobctl understand cli -si -api-key <key> MyProject  # generate a semantic index
./bobctl understand cli -doc -api-key <key> MyProject # generate documentation
./bobctl understand cli -a                            # open an interactive shell

Creating a project from an ini file

The -c flag requires the .ini file to already be present in the pod's project directory. A sample .ini file is provided in the samples subdirectory.

Open an interactive shell inside the Z Understand pod:

oc exec -it <pod-name> -n <instance-namespace> -- bash

Copy the sample .ini file to the project directory:

cp "/bobz-understand/storage/IBM Application Discovery Build Client CLI/config/projects/samples/new_proj_db2.ini" \
   "/bobz-understand/IBM Application Discovery Build Client CLI/config/projects/new_proj_db2.ini"
Note:

When using Db2 as the project database, the .ini file must specify a unique DBName value. Each project requires its own distinct DBName. If an existing value is reused, project creation is blocked. Open the copied .ini file and assign a unique value to DBName before proceeding.

Note:

For SQL Server projects, the DBName parameter is not required in the .ini file. The project name is automatically used as the database name.

Exit the interactive shell:

exit

Create the project using the .ini file:

./bobctl understand project create -c <path-to-ini>

Copying source files into a project

Before building a project, copy application source files into the appropriate project directory. Each project contains source-specific subdirectories, such as:

  • Cobol
  • JCL
  • PL1
  • Assembler

To review the project structure and copy source files:

Open an interactive shell in the Z Understand pod:

./bobctl understand cli -a

Retrieve the pod name:

oc get pods \
  -n <instance-namespace> \
  -l app=ibm-bobz-understand \
  -o name

Copy individual files or directories using oc cp:

oc cp \
  /local/path/to/sources \
  <pod-name>:/bobz-understand/projects/<project-name>/<subfolder>/ \
  -n <instance-namespace>

Alternatively, use oc rsync for repeated syncs of a directory:

oc rsync \
  /local/path/to/sources/ \
  <pod-name>:/bobz-understand/projects/<project-name>/<subfolder>/ \
  -n <instance-namespace>
How is this topic?