View previous topic :: View next topic
|
Author |
Message |
Arun Raj
Moderator
Joined: 17 Oct 2006 Posts: 2481 Location: @my desk
|
|
|
|
Hi
Could anybody please tell me what is the difference between specifying the REUSE parameter at DEFINE CLUSTER and REPRO.I just want to know what is the purpose of specifying at both places instead of specifying only once.
Thanks in advance
Arun |
|
Back to top |
|
|
William Thompson
Global Moderator
Joined: 18 Nov 2006 Posts: 3156 Location: Tucson AZ
|
|
|
|
Taking your word for it (no AMS manual near) the reuse in the cluster define would indicate that the cluster can be reused and the reuse in the repro would indicate that, for this repro, the cluster is to be reused.
I.e., a cluster defined with reuse does not mean that everytime it is written to it gets reused. |
|
Back to top |
|
|
MFRASHEED
Active User
Joined: 14 Jun 2005 Posts: 186 Location: USA
|
|
|
|
This might help:
Code: |
REUSE (Abbreviation=RUS) - this keyword sets an indicator in a cluster
that it can be opened as a 'new' data set if the ACB has the
RESET indicator set. NOREUSE is the default.
NOREUSE (Abbreviation=NRUS) - this keyword sets an indicator in a
cluster that it can only be opened once as a 'new' data set,
and must be deleted and redefined each time data is to be
loaded into it. NOREUSE is the default.
|
|
|
Back to top |
|
|
Arun Raj
Moderator
Joined: 17 Oct 2006 Posts: 2481 Location: @my desk
|
|
|
|
Does it mean that if we have a cluster with some data in it and if we want to merge some new data to the existing ones, it is not possible....?
If we want to load data into a cluster which is defined as noreuse is it mandatory to delete and then redefine the cluster?
Thanks
Arun |
|
Back to top |
|
|
TizMe
New User
Joined: 05 Jan 2006 Posts: 72
|
|
|
|
arcvns wrote: |
Does it mean that if we have a cluster with some data in it and if we want to merge some new data to the existing ones, it is not possible....? |
No
Quote: |
If we want to load data into a cluster which is defined as noreuse is it mandatory to delete and then redefine the cluster? |
Yes |
|
Back to top |
|
|
William Thompson
Global Moderator
Joined: 18 Nov 2006 Posts: 3156 Location: Tucson AZ
|
|
|
|
TizMe wrote: |
arcvns wrote: |
Does it mean that if we have a cluster with some data in it and if we want to merge some new data to the existing ones, it is not possible....? |
No
|
Why not? |
|
Back to top |
|
|
MFRASHEED
Active User
Joined: 14 Jun 2005 Posts: 186 Location: USA
|
|
|
|
Quote: |
Does it mean that if we have a cluster with some data in it and if we want to merge some new data to the existing ones, it is not possible....?
|
The REUSE parameter allows clusters to be defined that may be reset to empty status without deleting and re-defining them.
Resetting the Output Cluster to Empty
The REUSE parameter may be specified to cause the output cluster to be reset to empty status before loading commences. In order for the REUSE parameter to be allowable, the output cluster must have been defined with the REUSE attribute.
So if there are already records in a VSAM file with REUSE, file will become empty on load. To add more records to existing records, records have to be merged with existing records and loaded. |
|
Back to top |
|
|
MFRASHEED
Active User
Joined: 14 Jun 2005 Posts: 186 Location: USA
|
|
Back to top |
|
|
William Thompson
Global Moderator
Joined: 18 Nov 2006 Posts: 3156 Location: Tucson AZ
|
|
|
|
arcvns wrote: |
I just want to know what is the purpose of specifying at both places instead of specifying only once. |
MFRASHEED,
I (think) I agree with you (BTW, nice EZT answer).
arcvns,
Unless I am horribly wrong (again no manual handy), a VSAM dataset defined with reuse should be capable of being extended with a disp of mod (and no reuse). |
|
Back to top |
|
|
MFRASHEED
Active User
Joined: 14 Jun 2005 Posts: 186 Location: USA
|
|
|
|
Please note these are optional parameters while trying to load. So if a CLUSTER has been defined with REUSE and a REPRO uses REPLACE, then i guess matching records will be replaced and non-matching inserted.
REPRO REPLACE -
INFILE(DDI) -
OUTFILE(DDO)
But if REPRO uses REUSE, then file will be loaded loosing all existing rows. And to keep existing records they have to merged before loading using this option.
REPRO -
INFILE(DDI) -
OUTFILE(DDO) -
REUSE
Corrections welcome. |
|
Back to top |
|
|
|