View previous topic :: View next topic |
Author |
Message |
vijay Beginner
Joined: 09 May 2003 Posts: 131 Topics: 64
|
Posted: Sat Feb 28, 2004 10:46 am Post subject: IDCAMS REPRO Output file DCB |
|
|
hi,
I want to copy a vsam file to flat file,make some changes in the flat file and copy the records back to vsam.What should be the dcb properties of the file -- recln and rectype.I know rectype and length depend on maxsize and avgsize of record in vsam file.But not sure exactly what it should be ?
vijay |
|
Back to top |
|
 |
[bond] Beginner

Joined: 31 Dec 2002 Posts: 28 Topics: 6
|
Posted: Sun Feb 29, 2004 10:46 pm Post subject: |
|
|
is it an esds/ksds/rrds ? what sort of changes are you doing ? why not do directly on the vsam file instead of copying to a flat file and then copying it back to VSAM ? are you playing around with the key if it is ksds ? |
|
Back to top |
|
 |
vijay Beginner
Joined: 09 May 2003 Posts: 131 Topics: 64
|
Posted: Mon Mar 01, 2004 9:26 am Post subject: |
|
|
All files are KSDS.Yes,I'm deleting the old record and creating new records with a different key with all other record contents being the same.
I use EZT to delete the record and copy the record to a flat file with the key changed and finally I repro back the flat file.I can use VSAM also.Just out of curiosity I'm asking -- how to calculate the DCB of the flat file when we repro from vsam to flat file for any kind of vsam in general ?
Thanks,
Vijay |
|
Back to top |
|
 |
kolusu Site Admin

Joined: 26 Nov 2002 Posts: 12378 Topics: 75 Location: San Jose
|
Posted: Mon Mar 01, 2004 2:12 pm Post subject: |
|
|
vijay,
Use a sort utility to copy the VSAM file to a flat file. Sort products automatically calcualate the LRECL, BLKSIZE from the input file unless you are modifying the records using inrec or outrec.
Hope this helps...
Cheers
Kolusu _________________ Kolusu
www.linkedin.com/in/kolusu |
|
Back to top |
|
 |
Mike Chantrey Intermediate
Joined: 10 Sep 2003 Posts: 234 Topics: 1 Location: Wansford
|
Posted: Tue Mar 02, 2004 8:38 am Post subject: |
|
|
If you want to do it manually, the rules I use are quite simple:
IF the VSAM file MAX and AVG record lengths are the same, copy to a fixed blocked sequential file with the same record length as the MAX and AVG values.
If the VSAM file AVG reclen is less than the MAX, copy to a variable blocked sequential file with record length = MAX vsam reclen + 4 |
|
Back to top |
|
 |
|
|