Creating images from z/OS volumes or data sets with REST APIs

Learn about the steps to create images from z/OS® volumes or data sets.

  1. Create the images by including some of the components that you have created earlier.
    curl -k -u zvdtadmin:password -X POST --header 'Content-Type: application/json' --header 'Accept: application/json' -d '{"name": "testApp1", "zSystem": {"hostname": "YOUR_Z_OS_HOST_NAME","port": 22}, "version": 1, "description": "comment", "components": [{"name": "name of component", "zSystem": { "hostname": "myzos.domain.com", "port": 22 }, "version": 1 } ], "sysResComponent": { "name": " name of the system residence volume component ", "zSystem": { "hostname": "myzos.domain.com", "port": 22 }, "version": 1 }} ' 'https://your_tools_server_host_name:9443/ZVDTREST/zvdtrs/appServices/v2/zosApplicationImage'
    If an error code is displayed, for example:
    {
      "code": 31326,
      "message": "These data sets cannot be extracted because their containing volumes cannot be found: ["SYS1.A39AAA.LPALIB , SYS1.AFOMMOD1 "]",
      "level": {
        "name": "SEVERE"
      },
      "cause": "",
      "resolution": ""
    }

    The error code '31326' means that "these data sets cannot be extracted because their containing volumes cannot be found: [dataset_names]". For more information about error code, see REST API error codes.

  2. Optional: Try again when an error code is displayed at step 1.
    curl -k -u zvdtadmin:password -X POST --header 'Content-Type: application/json' --header 'Accept: application/json' -d '{"name": "testApp1-fromLinux", "zSystem": {"hostname": "YOUR_Z_OS_HOST_NAME", "port": 22},   "ftpSystem": {"hostname": "your_storage_server_host_name"},   "components":[ {"name": "testComp-fromLinux"} ], "schedules": { "originalScheduleTime": "2018-01-06 13:01:00.0", "originalScheduleTimezoneId": "CTT" }, "concurrentExtractionNumber": 3 }' 'https://your_tools_server_host_name:9443/ZVDTREST/zvdtrs/appServices/zosApplicationImage'

    Then, the generated information of images is returned.