View previous topic :: View next topic |
Author |
Message |
suma Beginner
Joined: 23 Jan 2006 Posts: 65 Topics: 29
|
Posted: Thu Nov 29, 2007 3:43 am Post subject: VSAM error code 21 |
|
|
I am getting VSAM error code of 21 when I am trying to append the records to the existing VSAM file.
"21----- Sequentially accessed files only. Indicates a sequence error. The ascending key requirements of successive record key values has been violated, or, the prime record key value has been changed by a COBOL program between successful execution of a READ statement and execution of the next REWRITE statement for that file. "
Is there any method to append records into the VSAM file....when there exists records in the file?
thanks
Suma |
|
Back to top |
|
|
vivek1983 Intermediate
Joined: 20 Apr 2006 Posts: 222 Topics: 24
|
Posted: Thu Nov 29, 2007 4:28 am Post subject: |
|
|
suma,
Quote: |
am getting VSAM error code of 21 when I am trying to append the records to the existing VSAM file.
|
Can you show us how are u trying to append the records to the VSAM file? ALso show us how u have specified the access method for the same.
You need to specify ACCESS IS SEQUENTIAL for the VSAM file and you need to open the VSAM in OUTPUT mode. Having done this, a simple WRITE statement will append the rows to the already existing records.
Hope I am not missing something. _________________ Vivek G
--------------------------------------
A dream is just a dream. A goal is a dream with a plan and a deadline. (Harvey Mackay) |
|
Back to top |
|
|
Terry_Heinze Supermod
Joined: 31 May 2004 Posts: 391 Topics: 4 Location: Richfield, MN, USA
|
Posted: Thu Nov 29, 2007 4:11 pm Post subject: |
|
|
Is your VSAM file a KSDS, ESDS, or RRDS file? Please show a listcat. _________________ ....Terry |
|
Back to top |
|
|
|
|