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
 
VSAM KSDS write deletes old records

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

New User


Joined: 27 Dec 2005
Posts: 58

PostPosted: Mon May 10, 2010 9:10 pm    Post subject: VSAM KSDS write deletes old records
Reply with quote

I am trying to write to a VSAM KSDS file but after each run I am just left with only the new records written. The old records are getting wipedoff.Please let me know why this could be happening.
Back to top
View user's profile Send private message

dick scherrer

Site Director


Joined: 23 Nov 2006
Posts: 19270
Location: Inside the Matrix

PostPosted: Mon May 10, 2010 9:21 pm    Post subject:
Reply with quote

Hello,

What is the SELECT/ASSIGN?

How is the file OPENed?
Back to top
View user's profile Send private message
morpheus007

New User


Joined: 27 Dec 2005
Posts: 58

PostPosted: Mon May 10, 2010 9:34 pm    Post subject:
Reply with quote

SELECT REQUEST-MASTER-FILE ASSIGN TO VXSIREQF
ORGANIZATION IS INDEXED
ACCESS MODE IS DYNAMIC
RECORD KEY IS RQST-MAIN-KEY
ALTERNATE RECORD KEY IS RQST-ALT1-1
ALTERNATE RECORD KEY IS RQST-ALT2-1
ALTERNATE RECORD KEY IS RQST-ALT3-1
ALTERNATE RECORD KEY IS RQST-ALT4-1
FILE STATUS IS REQUEST-FILE-STATUS.


OPEN OUTPUT REQUEST-MASTER-FILE


WRITE REQUEST-MASTER-REC


KSDS FILE DEFINED WITH SHR(2,3) REUSE NOERASE.

FILE IS LOADED FROM PROD WITH ABOUT 1500 RECS AND THEN I RUN THE JOB . IF THERE ARE ABOUT 10 ADDS I END UP WITH ONLY 10 RECS INSTEAD OF ALL 1100 RECS.
Back to top
View user's profile Send private message
dick scherrer

Site Director


Joined: 23 Nov 2006
Posts: 19270
Location: Inside the Matrix

PostPosted: Mon May 10, 2010 9:41 pm    Post subject:
Reply with quote

Hello,

Because you opened the file as output?

Suggest you try to open the file as i-o instead. At the top of the page is a link to "IBM Manuals". Look in the COBOL Language Reference for complete info.
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8593
Location: Back in jolly old England

PostPosted: Tue May 11, 2010 11:42 am    Post subject:
Reply with quote

I would also look into ......................
Quote:
REUSE|NOREUSE
Specifies whether or not the cluster can be opened again and again as a reusable cluster.
If REUSE or NOREUSE is specified in the SMS data class, the value defined is used as the data set definition, unless it has been previously defined with an explicitly specified or modeled DEFINE attribute.

REUSE
Specifies that the cluster can be opened again and again as a reusable cluster. When a reusable cluster is opened, its high-used RBA is set to zero if you open it with an access control block that specifies the RESET attribute.
REUSE lets you create an entry-sequenced, key-sequenced, or relative record work file.

When you create a reusable cluster, you cannot build an alternate index to support it. Also, you cannot create a reusable cluster with key ranges (see the KEYRANGE parameter). Reusable data sets can be multivolume and can have up to 123 physical extents.

Restriction: If you select REUSE and your command also contains the keyword UNIQUE, you must remove the UNIQUE keyword or the DEFINE command will be unsuccessful.

Abbreviation: RUS

NOREUSE
Indicates that the cluster cannot be opened again as a new cluster.

Abbreviation: NRUS
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 Join records from 2 files with No Dup... Poha Eater DFSORT/ICETOOL 21 Sun Aug 27, 2017 10:35 pm
No new posts Match two files using multiple keys a... santoshks1987 SYNCSORT 11 Fri Aug 18, 2017 10:50 am
No new posts Multiple VSAM files single output fil... Mohan Kothakota DFSORT/ICETOOL 11 Wed Aug 09, 2017 7:57 pm
No new posts Read two inputs and write into output... murali.andaluri DFSORT/ICETOOL 6 Wed Jul 26, 2017 7:35 pm
No new posts Write out NODUPS but just from one file Jay Villaverde DFSORT/ICETOOL 8 Fri Jul 14, 2017 12:44 am

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