II. Description of the IBM AD Build Client Batch Commands

1. Create a new project in background

IBM AD Build Client can be invoked by using two parameters as follows:
IBMApplicationDiscoveryBuildClient.exe /np Full path to the .ini configuration file
Where:
  • /np is the parameter responsible for creating a new project.
  • The .ini configuration file is the file in which the details for creating a new project are defined. The full path to the .ini file must be used as a parameter.
The content of the .ini file is defined as follows:
Note: The values of the parameters that are present in the .ini configuration file, need to be identical to the ones present in the New Project window, from IBM® AD Build Client. The only exception is for the ProjectDBType parameter, where the value needs to be SQL, DB2 or DB2_LUW.
[ADNewProj]
ProjectName = "name of the project"
Path = "full path of the project including the project's name"
Environment = "zOS"
ProjectLanguages = "DT Cobol,Assembler,Cobol,Natural,PL1,Ads"
DBTypes = "Datacom,IDMS,Adabas,Relational,IMS/DB"
MapTypes = "Natural (LNM),CICS (BMS), IMS TM (MFS),ADS Map"
ProjectDBType = "SQL" or "DB2" or "DB2_LUW"
CCSEnvironment = "Environment name"
DBServerName = "DB Server Name blank space [ip/name:port]"
AttachToDB = "Y" or "N"
DBName = "dbName"
SchemaName = "schemaName"
EnableCross = "Y" or "N"
Notes®:
  1. [ADNewProj] is the section name and under any circumstances that it must not be modified.
  2. The Lines from the .ini file can be commented by adding ";" (semicolon) at the beginning of each line.
  3. The names of the following parameters must not be modified:
    • ProjectName
    • Path
    • Environment
    • ProjectLanguages
    • DBTypes
    • MapTypes
    • ProjectDBType
    • CCSEnvironment
    • DBServerName
    • AttachToDB
    • DBName
    • SchemaName
    • EnableCross
  4. The values for all the parameters must be added between double quotation marks.
  5. The Path parameter must contain as value the full path of the project (the project name included in the path).
  6. The CCSEnvironment parameter takes as value the Environment name as defined in IBM AD Configuration Server at the following location: Home Page > Configuration server name > Environments > "MyEnvironmentName".
  7. The DBServerName parameter takes as value the Relational database server name and the host name or the IP of the computer, including the port as defined in IBM AD Configuration Server. The value for the DBServerName parameter is case-sensitive and has the following format:

    "Relational Database Server Name a mandatory blank space [ip/hostname:port]"

    Where:
    • Relational Database Server Name is defined in IBM AD Configuration Server at the following location: Home Page > Configuration server name > Environments > "MyEnvironment" > Relational Database Servers.
    • [ip/hostname:port] is defined in IBM AD Configuration Server at the following location: Home Page > Configuration server name > Environments > "MyEnvironment" > Relational Database Servers > "MyRelationalDBServer". The information is present under the Host and Port entries.
    Example:
    DBServerName = "SQLPROD [SQL.PROD.HOST:1433]"
  8. The AttachToDB parameter can be set to Y or N as follows:
    • Must be set to N when you create a project on:
      • SQL Server.
      • Db2® on z/OS® or Db2 for LUW, where the project's database doesn't exist and needs to be created.
    • Must be set to Y when you use Db2 on z/OS or Db2 for LUW as a relational database server and the project you are about to create has a Database and a Schema already created.
  9. The DBName and SchemaName parameters can be configured as follows:
    • When using Db2 on z/OS as a relational database server and AttachToDB is set to Y, you must enter the corresponding values for the DBName and SchemaName parameters.
    • When using Db2 for LUW as a relational database server, it is mandatory to enter the corresponding value for the DBName parameter. The SchemaName parameter's value is hardcoded to EZSCH and it cannot be changed.
    Note: When using SQL Server as a relational database server, the AttachToDB, DBName, and SchemaName parameters do not expect any value.
  10. The EnableCross parameter can be set to Y or N as follows:
    • Must be set to N when the project is not part of the cross project analysis.
    • Must be set to Y when the project is part of the cross project analysis.
      Note: This option is not yet available for Db2 on z/OS project database type. Setting this on Y for Db2 on z/OS projects will result in error.

For a better understanding and examples, see the Use Cases and Best Practices section.

A sample for the New Project .ini file is available at the following location: <IBM AD Build Client installation folder>\Bin\Release\Samples\Background_Actions\newProjectBASample.ini.

The logs for New project in background are available at the following location: <IBM AD Build Client installation folder>\Bin\Release\NewProjInBackLog_timestamp.log.

2. Upgrade repository

IBM AD Build Client can be invoked in batch mode to upgrade the project's repository (the database's structure) using the following command:
IBMApplicationDiscoveryBuildClient.exe /ru  LOG file name  optional parameter: full path to a file that contains the list of the projects
Where:
  • /ru is the parameter responsible for upgrading the project's repositories (Upgrade Repository).
  • LOG File Name is the full path of the log file responsible to show the status and progress for the Repository Upgrade process. This log file can have any name and might be in any given path (as long as you have read/write access to that path).
  • Optional Parameter: Full path to a file that contains the list of the projects to be upgraded is the parameter that must be used only when a given number of projects must be upgraded (not all projects are upgraded). This file must contain the name of the projects (as defined in IBM AD Build Client) that get their repositories upgraded (one project per line).
    Example for how the optional parameter file looks like:
    Project1
    Project2
    Project3
    
    Note: If the optional parameter is not set, then all of the existing projects will have their repositories upgraded.

For a better understanding and examples, see the Use Cases and Best Practices section.

A sample for the Repository Upgrade optional parameter file (list of projects) is available at the following location: <IBM AD Build Client installation folder>\Bin\Release\Samples\Background_Actions\repositoryUpgradeBASample.txt.

The logs for Repository Upgrade are available in the location that is mentioned in the description of LOG File Name.

3. Build project in background

IBM AD Build Client can be invoked in batch mode to run a build (full build) by using the following command:
IBMApplicationDiscoveryBuildClient.exe /fb ProjectName
Where:
  • /fb is the parameter that is used to invoke the build action.
  • ProjectName is the name of the project where full build is triggered.
If you need to run multiple Build Client instances in parallel to speed up the processing of multiple projects, use one of the following options.
  • Run multiple IBMApplicationDiscoveryBuildClient.exe concurrently. For example, if you need to run 3 instances in parallel, run the IBMApplicationDiscoveryBuildClient.exe command in 3 .bat files concurrently.
  • Use a single .bat file that configures the build for multiple projects in parallel. For example,
    start /b "" "C:\Program Files\IBM Application Discovery and Delivery Intelligence\IBM Application Discovery Build Client\Bin\Release\IBMApplicationDiscoveryBuildClient.exe" /fb MyProject1
    TIMEOUT 1
    start /b "" "C:\Program Files\IBM Application Discovery and Delivery Intelligence\IBM Application Discovery Build Client\Bin\Release\IBMApplicationDiscoveryBuildClient.exe" /fb MyProject2
    TIMEOUT 1
    start /b "" "C:\Program Files\IBM Application Discovery and Delivery Intelligence\IBM Application Discovery Build Client\Bin\Release\IBMApplicationDiscoveryBuildClient.exe" /fb MyProject3
    TIMEOUT 1

For a better understanding and examples, see the Use Cases and Best Practices section.

The log for Build in background is similar to Build in GUI mode. The log can be found under the project's folder as project's name and timestamp. Example: MyProject1_timestamp.txt.

4. Periodic Updates for IBM AD Build Projects

IBM Application Discovery projects must be kept up-to-date in terms of the source code and the information that is stored in the repository. For such a use case, IBM AD Build Client can be invoked in batch mode by using two different commands as follows:

4.1 To keep the source code up-to-date in the projects by using the Synchronization process.
IBMApplicationDiscoveryBuildClient /umm1 ProjectName
Where:
  • /umm1 is the parameter that is used to invoke the Synchronization process.
  • ProjectName is the name of the project where the Synchronization process is triggered.
Note: It is mandatory to have the Synchronize feature enabled in IBM AD Configuration Server and the synchronization file configured. To enable the Synchronize feature, go to Home Page > Install Configurations > IBM Application Discovery Build Client > Enable Members Synchronization.

For a better understanding and examples, see the Use Cases and Best Practices section.

A sample for the Synchronization file is available at the following location: <IBM AD Build Client installation folder>\Bin\Release\Samples\Background_Actions\synchronizeBASample.txt.

The logs for Synchronize are available under: Project's Folder > Synchronize.

4.2 To keep the information stored in repository up-to-date by using the Make process.
IBMApplicationDiscoveryBuildClient /m1 ProjectName /m2 y /m3 y
Where:
  • /m1 is the parameter that is used to invoke the Make process.
  • ProjectName is the name of the project where the Make process is triggered.
  • /m2 (y/n) refers to whether the make process is forced or not as follows:
    • /m2 y means that if another AD Component is using the project in read mode, the process starts.
    • /m2 n means that if another AD Component is using the project in read mode, the process does not start until the project is released.
  • /m3 (y/n) refers to whether the status of the Make process is logged or not as follows:
    • /m3 y means that the status log file BatchMakeStatusFile_timestamp.txt is generated under the project's folder.
    • /m3 n means that the status log file is not generated.

For a better understanding and examples, see the Use Cases and Best Practices section.

The logs for the Make process in background can be found under the project's folder as BatchMakeStatusFile_timestamp.txt and Project'sName_timestamp.text.

5. Automatically check the projects for missing components in IBM AD Build Client

After adding source files to a project, you might want to know whether the project is complete in terms of dependencies. IBM AD Build Client can be invoked in batch mode to check the projects for missing components (similar to the 'Check' option that can be found in GUI Mode) by using the following command:
IBMApplicationDiscoveryBuildClient.exe /cp ProjectName [A,B,C,D,1,2,3,4,5,6]
Where:
  • /cp is the parameter that is used to invoke the Check project in batch mode.
  • ProjectName is the name of the project to be checked.
  • [A,B,C,D,1,2,3,4,5,6] defines the scope of the check, as follows:
    Important: If the brackets are missing, all the components beneath are checked.
    • Letters specify the referenced resources:
      • A - Programs
      • B - Maps
      • C - Programs called in jobs
      • D - ADS Dialogs
    • Digits specify the critical components:
      • 1 - Procs
      • 2 - Program Include Files
      • 3 - JCL Include Files
      • 4 - Control Files
      • 5 - Transactions
      • 6 - ADS Processes
Important: Make sure that there are no spaces between the scope elements in the command line. Each space is considered a CLI parameter delimiter. A space can break the set and it can result in having an invalid command line.

6. Update API Resolutions usage

IBM AD Build Client can be invoked in batch mode to update API Resolutions by using the following command:
IBMApplicationDiscoveryBuildClient /uar1 ProjectName
Where:
  • /uar1 is the parameter that is used to invoke the update of API Resolutions.
  • ProjectName is the name of the project where the API Resolutions process is triggered.
Note:
  • It is mandatory to have the API Extensibility feature enabled in IBM AD Build Client . To enable the API Extensibility feature, go to IBM AD Build Client > Project > Settings > Extensibility > Enable API/Macro handling by using a configuration file.
  • The Update API Resolutions must be used for the situation when the API Resolution File is modified, so the resolutions must be updated in the repository but without running a full build on the project (which might be time consuming).

The logs for the Update API Resolutions usage are available under: Project's Folder > UpdateApiResolutions_timestamp.txt.

7. Save Project Properties from command line interface

IBM AD Build Client can be invoked in batch mode by using two parameters as follows:
IBMApplicationDiscoveryBuildClient.exe /ps <ProjectName> <Full path to the corresponding .ini configuration file>
Where:
  • /ps is the parameter that is responsible for saving project properties.
  • ProjectName is the name of the project.
  • The .ini configuration file is the file in which the details for saving project properties are defined. The full path to the .ini file must be used as a parameter.
The content of the .ini file is defined as follows:
Note:
  • Sections and keys are optional, not all of them must be present in the configuration file. The end user must only choose those properties of the project that are needed to be modified.
  • The sections and keys are keywords that must not be modified.
  • Some of the values that are shown as follow are also keywords.
;project settings
[Project]
    ;SearchPaths
    CobolInclude = <full path1>,<full path2>,...
    NaturalInclude = <full path1>,<full path2>,...
    PL1Include = <full path1>,<full path2>,...
    JCLInclude = <full path1>,<full path2>,...
    JCLControlFiles = <full path1>,<full path2>,...
    JCLProcs = <full path1>,<full path2>,...
    PSBInclude = <full path1>,<full path2>,...
    DTCobol = <full path1>,<full path2>,...
    ADSProcess = <full path1>,<full path2>,...
    AssemblerInclude = <full path1>,<full path2>,...
    AssemblerMacros = <full path1>,<full path2>,...
    ;other project related settings
    EnableLOG = Y/N
    EnableUsingEXECDLI = Y/N
    EnableCheckProjectReminder = Y/N
    EnableAPIMACRO = Y/N
    EnablePreprocessedFiles = Y/N

;folder settings
[zOS Cobol]
    IMSDBEnvironment = None/CICS DBCTL/BMP/Batch