View previous topic :: View next topic
|
Author |
Message |
morpheus007
New User
Joined: 27 Dec 2005 Posts: 58
|
|
|
|
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 |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
Hello,
What is the SELECT/ASSIGN?
How is the file OPENed? |
|
Back to top |
|
|
morpheus007
New User
Joined: 27 Dec 2005 Posts: 58
|
|
|
|
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 |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
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 |
|
|
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 8797 Location: Welsh Wales
|
|
|
|
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 |
|
|
|