zimport

Import members from multiple partitioned data sets (PDS) into z/OS® source control.

Before you begin

Before you can import z/OS PDS members to an Engineering Workflow Management zComponent project, the following conditions must be met:
  • You must already have created an Engineering Workflow Management project area. If you prefer, after you create the project area, you can also create a stream within that project area to be the default flow target for the repository workspace that the mass import command creates, although this is not a required step. You can also create language definitions to associate with your imported z/OS members, although this is not a required step either.
  • The Jazz™ Team Server must be running when you begin a z/OS mass import.
  • The user whose authentication information is specified to the zimport command must have permission to save data set definitions. Permissions for language definitions are not required because the zimport command does not create those, it just associates zFiles to existing language definitions.

About this task

Performance consideration

The zimport command applies the rules defined in the mapping file across all the PDS and members specified by the --hlq option. All the PDS under the specified HLQ are scanned to apply the rules and find the matches.

Therefore, the choice of the HLQ is important to the performance of the zimport process. To improve the zimport performance, you need to specify an HLQ that contains only the PDS that you want to import.

It is not always possible to reorganize the PDS so that you can specify an HLQ that contains only what you want to import. In this case, you can use the alias support of zimport. To do this, define an empty HLQ and define aliases that refer to the PDS you want to import in this HLQ. In this way, the HLQ contains only the scope of PDS that you want to import.

For example, you want to import members from PROD.SOURCES.ALL.COBOL. To do this, first create an alias IMPORT.SCOPE.SOURCE which targets PROD.SOURCES.ALL.COBOL. Run the zimport command and specify IMPORT.SCOPE in the --hlq option. In addition, the mapping file you choose may contain the P (project) and C (component) to import the content.
P:SOURCE.*=CobolProject
C:CobolProject=SourceComponent

Procedure

  1. Enter the zimport command, which is a subcommand of scm or lscm. Enter a command similar to one of the following examples, all on one line:
    scm zimport --hlq SMITH --mapfile /u/smith/mapping.txt --projectarea TestProjectArea -s MyStream -r https://localhost:9443/ccm -u username -P password
    lscm zimport --hlq SMITH --mapfile /u/smith/mapping.txt --projectarea TestProjectArea -s MyStream -r https://localhost:9443/ccm -u username -P password
    Tips:
    • For more information about how to use the zimport command, run the scm help zimport command or lscm help zimport command.
    • If you want to see what the results of the zimport command would be without actually executing a mass import, specify either the -n or --dry-run zimport option to scm or lscm, like these examples (on one line):
      scm zimport -n --hlq SMITH --mapfile /u/smith/mapping.txt --projectarea TestProjectArea -s MyStream -r https://localhost:9443/ccm -u username -P password
      lscm zimport -n --hlq SMITH --mapfile /u/smith/mapping.txt --projectarea TestProjectArea -s MyStream -r https://localhost:9443/ccm -u username -P password
  2. Specify the -r option to indicate which repository to import the PDS members to.
  3. Specify the -u option to indicate a user name for the repository.
  4. Specify the -P option to indicate a password for the repository.
  5. Specify the --hlq option to indicate the high-level qualifier of the partitioned data sets whose members you want to import.
  6. Specify the --mapfile option to indicate the location of the mapping file the mass import tool should use.
  7. Specify the --projectarea option to indicate the name of the project area where you want to store the data set definitions.
    Note: If you enter DBCS characters for --projectarea, the zimport command fails. Use either English ASCII characters or the UUID of a project area.
  8. Specify the --binary option to import members into a repository in binary mode. Code is not converted, and the line-delimiter of all imported members is set to none.
  9. Specify the --workspace option to import files into a specified repository workspace instead of creating a new one, so that you can build a source code version history when you want to migrate only specific code versions or changes to z/OS source control.
    Note: You must already have created this repository workspace before you can use the --workspace option.
    1. Use zimport to import the oldest version of source code that you want to maintain.
    2. At a later date, import another version of source code that you want to maintain.
    3. Specify the same repository workspace that you indicated previously. You have now established and defined a z/OS source code version history that is derived from the version history on your previous source control manager.
    This process repeats until you import the newest level of source code.
  10. Optional: Specify the -s option (or --stream) to indicate the name, alias, or universal unique identifier (UUID) of the stream to set as the default flow target for the repository workspace that the zimport command creates.
  11. Optional: Specify the -q option to display only minimal console output.
  12. Optional: Specify the -v option to increase the verbosity of the output.
    Note: If you specify both -q and -v, -q overrides -v.
  13. Optional: Specify the --finddeletions option. Use this option in conjunction with either the --stream or the --workspace option to delete a member from your repository workspace.

What to do next

After the zimport process is complete, a new repository workspace exists, which contains components that contain zComponent projects, which themselves contain zFolders and zFiles that correspond to the imported PDS and its members. If you specify the -s option, your new workspace will use that default flow target. You should also see new data set definitions in the Team Artifacts view.
Tip: You might have to refresh the list before these new data set definitions display.
The zimport command creates a data set definition for each PDS you import, and the corresponding zFolder is associated with that data set definition. By default, the zimport command creates a data set definition with a data set type of PDSE, rather than the data set type of the source. After the data set definition is created, you can change the data set type to PDS if you prefer it. If you specified any language definition mappings, the zFiles should also be associated with those specified language definitions.
Note: Database reorg and runstats

zimport potentially creates multiple artifacts in the CCM repository. Database maintenance operations such as reorg or runstats need to be considered after zimport.reorg and runstats , which are normal database administration tasks to be completed by a DBA. Whenever a large amount of data is added to a database, a reorg needs to be run and statistics (runstats) needs to be executed against the database tables. Running these commands (in Db2) ensures optimal performance to be realized when accessing the database. Refer to the product supported DBMS (such as Oracle and SQL Server) user manuals for using equivalent commands.


video icon Video

Jazz.net channel
Software Education channel

learn icon Courses

IoT Academy
Skills Gateway

ask icon Community

Jazz.net
Jazz.net forums
Jazz.net library

support icon Support

IBM Support Community
Deployment wiki