You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[Enabler] [zos_copy] Add GDG/GDS support to zos_copy (#1564)
* Add use of new data set class
* Add tests for GDS source
* Add support for a GDS destination
* Add more GDS tests
* Fix name resolution when allocating a new GDS
* Fix GDS validations
* Add more type validations
* Remove unnecessary name resolution
* Add support to copy a GDG to USS
* Add copy of complete GDGs
* Add support for a GDS as backup
* Add special symbols test and fix backup ones
* Add changelog fragment
* Update docs
* Add GDG attributes for dest_data_set
* Update module RST
* Fix pep8 issue
* Fix backups without backup names
* Fix non-GDG dest dataset allocation
* Fix GDS allocation
Copy file name to clipboardExpand all lines: docs/source/modules/zos_copy.rst
+88-1Lines changed: 88 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -67,6 +67,8 @@ backup_name
67
67
68
68
If \ :literal:`dest`\ is a data set member and \ :literal:`backup\_name`\ is not provided, the data set member will be backed up to the same partitioned data set with a randomly generated member name.
69
69
70
+
If \ :emphasis:`backup\_name`\ is a generation data set (GDS), it must be a relative positive name (for example, \ :literal:`HLQ.USER.GDG(+1)`\ ).
71
+
70
72
|**required**: False
71
73
|**type**: str
72
74
@@ -105,6 +107,10 @@ dest
105
107
106
108
When \ :literal:`dest`\ is and existing VSAM (LDS), then source must be an LDS. The VSAM (LDS) will be deleted and recreated following the process outlined in the \ :literal:`volume`\ option.
107
109
110
+
\ :literal:`dest`\ can be a previously allocated generation data set (GDS) or a new GDS.
111
+
112
+
When \ :literal:`dest`\ is a generation data group (GDG), \ :literal:`src`\ must be a GDG too. The copy will allocate successive new generations in \ :literal:`dest`\ , the module will verify it has enough available generations before starting the copy operations.
113
+
108
114
When \ :literal:`dest`\ is a data set, you can override storage management rules by specifying \ :literal:`volume`\ if the storage class being used has GUARANTEED\_SPACE=YES specified, otherwise, the allocation will fail. See \ :literal:`volume`\ for more volume related processes.
109
115
110
116
|**required**: True
@@ -298,6 +304,10 @@ src
298
304
299
305
If \ :literal:`src`\ is a VSAM data set, \ :literal:`dest`\ must also be a VSAM.
300
306
307
+
If \ :literal:`src`\ is a generation data set (GDS), it must be a previously allocated one.
308
+
309
+
If \ :literal:`src`\ is a generation data group (GDG), \ :literal:`dest`\ can be another GDG or a USS directory.
310
+
301
311
Wildcards can be used to copy multiple PDS/PDSE members to another PDS/PDSE.
302
312
303
313
Required unless using \ :literal:`content`\ .
@@ -334,6 +344,8 @@ volume
334
344
dest_data_set
335
345
Data set attributes to customize a \ :literal:`dest`\ data set to be copied into.
336
346
347
+
Some attributes only apply when \ :literal:`dest`\ is a generation data group (GDG).
Sets the \ :emphasis:`limit`\ attribute for a GDG.
487
+
488
+
Specifies the maximum number, from 1 to 255(up to 999 if extended), of generations that can be associated with the GDG being defined.
489
+
490
+
\ :emphasis:`limit`\ is required when \ :emphasis:`type=gdg`\ .
491
+
492
+
|**required**: False
493
+
|**type**: int
494
+
495
+
496
+
empty
497
+
Sets the \ :emphasis:`empty`\ attribute for a GDG.
498
+
499
+
If false, removes only the oldest GDS entry when a new GDS is created that causes GDG limit to be exceeded.
500
+
501
+
If true, removes all GDS entries from a GDG base when a new GDS is created that causes the GDG limit to be exceeded.
502
+
503
+
|**required**: False
504
+
|**type**: bool
505
+
506
+
507
+
scratch
508
+
Sets the \ :emphasis:`scratch`\ attribute for a GDG.
509
+
510
+
Specifies what action is to be taken for a generation data set located on disk volumes when the data set is uncataloged from the GDG base as a result of EMPTY/NOEMPTY processing.
511
+
512
+
|**required**: False
513
+
|**type**: bool
514
+
515
+
516
+
purge
517
+
Sets the \ :emphasis:`purge`\ attribute for a GDG.
518
+
519
+
Specifies whether to override expiration dates when a generation data set (GDS) is rolled off and the \ :literal:`scratch`\ option is set.
520
+
521
+
|**required**: False
522
+
|**type**: bool
523
+
524
+
525
+
extended
526
+
Sets the \ :emphasis:`extended`\ attribute for a GDG.
527
+
528
+
If false, allow up to 255 generation data sets (GDSs) to be associated with the GDG.
529
+
530
+
If true, allow up to 999 generation data sets (GDS) to be associated with the GDG.
531
+
532
+
|**required**: False
533
+
|**type**: bool
534
+
535
+
536
+
fifo
537
+
Sets the \ :emphasis:`fifo`\ attribute for a GDG.
538
+
539
+
If false, the order is the newest GDS defined to the oldest GDS. This is the default value.
540
+
541
+
If true, the order is the oldest GDS defined to the newest GDS.
542
+
543
+
|**required**: False
544
+
|**type**: bool
545
+
546
+
473
547
474
548
use_template
475
549
Whether the module should treat \ :literal:`src`\ as a Jinja2 template and render it before continuing with the rest of the module.
@@ -794,6 +868,19 @@ Examples
794
868
dest: HLQ.PRINT.NEW
795
869
asa_text: true
796
870
871
+
- name: Copy a file to a new generation data set.
872
+
zos_copy:
873
+
src: /path/to/uss/src
874
+
dest: HLQ.TEST.GDG(+1)
875
+
remote_src: true
876
+
877
+
- name: Copy a local file and take a backup of the existing file with a GDS.
0 commit comments