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.
Procedure
- Create the images by including some of the components that you have created
earlier.
curl -k -u zdtadmin: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/ZDTREST/zdtrs/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.
-
Optional: Try again when an error code is displayed at step 1.
curl -k -u zdtadmin: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/ZDTREST/zdtrs/appServices/zosApplicationImage'
Then, the generated information of images is returned.