IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

Why REUSE parameter is used both at DEFINE as well as REPRO?


IBM Mainframe Forums -> JCL & VSAM
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
Arun Raj

Moderator


Joined: 17 Oct 2006
Posts: 2481
Location: @my desk

PostPosted: Fri Nov 24, 2006 1:06 pm
Reply with quote

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
View user's profile Send private message
William Thompson

Global Moderator


Joined: 18 Nov 2006
Posts: 3156
Location: Tucson AZ

PostPosted: Fri Nov 24, 2006 3:10 pm
Reply with quote

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
View user's profile Send private message
MFRASHEED

Active User


Joined: 14 Jun 2005
Posts: 186
Location: USA

PostPosted: Fri Nov 24, 2006 8:27 pm
Reply with quote

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
View user's profile Send private message
Arun Raj

Moderator


Joined: 17 Oct 2006
Posts: 2481
Location: @my desk

PostPosted: Mon Nov 27, 2006 12:12 pm
Reply with 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....?
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
View user's profile Send private message
TizMe

New User


Joined: 05 Jan 2006
Posts: 72

PostPosted: Mon Nov 27, 2006 12:42 pm
Reply with quote

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
View user's profile Send private message
William Thompson

Global Moderator


Joined: 18 Nov 2006
Posts: 3156
Location: Tucson AZ

PostPosted: Mon Nov 27, 2006 3:36 pm
Reply with quote

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
View user's profile Send private message
MFRASHEED

Active User


Joined: 14 Jun 2005
Posts: 186
Location: USA

PostPosted: Tue Nov 28, 2006 3:21 am
Reply with quote

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
View user's profile Send private message
MFRASHEED

Active User


Joined: 14 Jun 2005
Posts: 186
Location: USA

PostPosted: Tue Nov 28, 2006 3:45 am
Reply with quote

Refer to Manual for details:

publibz.boulder.ibm.com/cgi-bin/bookmgr_OS390/handheld/Connected/BOOKS/dgt1v403/3.25.1.2?SHELF=&DT=19990113080956&CASE=
Back to top
View user's profile Send private message
William Thompson

Global Moderator


Joined: 18 Nov 2006
Posts: 3156
Location: Tucson AZ

PostPosted: Tue Nov 28, 2006 4:03 am
Reply with quote

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
View user's profile Send private message
MFRASHEED

Active User


Joined: 14 Jun 2005
Posts: 186
Location: USA

PostPosted: Tue Nov 28, 2006 4:41 am
Reply with quote

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
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> JCL & VSAM

 


Similar Topics
Topic Forum Replies
No new posts DTL - how to define key with stacked ... TSO/ISPF 3
No new posts Using the Jobname parameter in a Qual... ABENDS & Debugging 1
No new posts Demand with DEADLINE TIME parameter CA Products 4
No new posts Option DYNALLOC second parameter. DFSORT/ICETOOL 11
No new posts how to keep unpaired records with REPRO. JCL & VSAM 9
Search our Forums:

Back to Top