View previous topic :: View next topic |
Author |
Message |
naveen Beginner

Joined: 03 Dec 2002 Posts: 90 Topics: 31
|
Posted: Sun Dec 10, 2006 9:43 am Post subject: Changing the key of KSDS programmatically in COBOL |
|
|
HOw can we change the already defined key of KSDS vsam file programmatically in COBOL program ? |
|
Back to top |
|
 |
dbzTHEdinosauer Supermod
Joined: 20 Oct 2006 Posts: 1411 Topics: 26 Location: germany
|
Posted: Sun Dec 10, 2006 12:55 pm Post subject: |
|
|
If there is no physical change to the record structure:- repro to a qsam
- delete the vsam
- define the vsam with the new key
- repro the qsam to the new vsam
- make appropriate changes in all programs that reference the vsam record or perform I/O on the file
If there is a physical change to the record structure:- if the file is very large
- write a conversion program
- reads old structure
- reformats record
- writes new structure
- define new vsam file
- run conversion pgm
- if the file is small
- repro old to qsam
- write cobol to convert old qsam to new qsam
- sort new qsam
- define new vsam
- repro new qsam to new vsam
_________________ Dick Brenholtz
American living in Varel, Germany |
|
Back to top |
|
 |
dbzTHEdinosauer Supermod
Joined: 20 Oct 2006 Posts: 1411 Topics: 26 Location: germany
|
Posted: Sun Dec 10, 2006 1:00 pm Post subject: |
|
|
The of course only process the new vsam structure with the updated cobol programs. _________________ Dick Brenholtz
American living in Varel, Germany |
|
Back to top |
|
 |
jyoung Beginner
Joined: 10 Nov 2005 Posts: 36 Topics: 2 Location: Flint, MI
|
Posted: Mon Dec 11, 2006 8:07 am Post subject: |
|
|
Could you create an alternate index and then access it that way? |
|
Back to top |
|
 |
|
|