Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Profile Log in to check your private messages Log in
 
Why REUSE parameter is used both at DEFINE as well as REPRO?

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
View previous topic :: :: View next topic  
Author Message
Arun Raj

Moderator


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

PostPosted: Fri Nov 24, 2006 1:06 pm    Post subject: Why REUSE parameter is used both at DEFINE as well as REPRO?
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: 3158
Location: Tucson AZ

PostPosted: Fri Nov 24, 2006 3:10 pm    Post subject:
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    Post subject: Re: Why REUSE parameter is used both at DEFINE as well as RE
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: 2287
Location: @my desk

PostPosted: Mon Nov 27, 2006 12:12 pm    Post subject:
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    Post subject:
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: 3158
Location: Tucson AZ

PostPosted: Mon Nov 27, 2006 3:36 pm    Post subject:
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    Post subject: Re: Why REUSE parameter is used both at DEFINE as well as RE
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    Post subject: Re: Why REUSE parameter is used both at DEFINE as well as RE
Reply with quote

Refer to Manual for details:

http://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: 3158
Location: Tucson AZ

PostPosted: Tue Nov 28, 2006 4:03 am    Post subject: Re: Why REUSE parameter is used both at DEFINE as well as RE
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    Post subject: Re: Why REUSE parameter is used both at DEFINE as well as RE
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    IBMMAINFRAMES.com Support Forums -> JCL & VSAM All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts DUMMY When do I need add a DCB parameter Martylin JCL & VSAM 3 Fri Dec 08, 2017 7:20 am
No new posts Regarding time parameter shanthi gude JCL & VSAM 7 Mon Sep 04, 2017 2:31 pm
No new posts IDCAMS Allocate & Repro pahiker JCL & VSAM 9 Thu Aug 24, 2017 7:28 pm
No new posts Paasing symbolic parameter to instrea... Robert Sample JCL & VSAM 2 Thu Jul 27, 2017 1:22 pm
No new posts JTS parameter Shashank Chaubey JCL & VSAM 2 Thu Jul 13, 2017 4:15 pm

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us