View previous topic :: View next topic |
Author |
Message |
Cathygomez Beginner
Joined: 04 Aug 2004 Posts: 6 Topics: 3
|
Posted: Wed Aug 04, 2004 5:22 am Post subject: VSAM - Fixed length & Variable length Definition? |
|
|
Hi
when do we say the VSAM(KSDS) file as a fixed length file or Variable length file? |
|
Back to top |
|
|
kolusu Site Admin
Joined: 26 Nov 2002 Posts: 12375 Topics: 75 Location: San Jose
|
Posted: Wed Aug 04, 2004 5:50 am Post subject: |
|
|
Cathygomez,
Can you elaborate your question?
Kolusu _________________ Kolusu
www.linkedin.com/in/kolusu |
|
Back to top |
|
|
Mike Chantrey Intermediate
Joined: 10 Sep 2003 Posts: 234 Topics: 1 Location: Wansford
|
Posted: Wed Aug 04, 2004 8:30 am Post subject: |
|
|
I guess what you want is this: If a KSDS has MAX and AVERAGE record length the same, it is regarded as fixed length. Otherwise it's variable length.
In CICS for example you typically don't need to specify record lengths for fixed length files. |
|
Back to top |
|
|
Cathygomez Beginner
Joined: 04 Aug 2004 Posts: 6 Topics: 3
|
Posted: Thu Aug 12, 2004 2:03 am Post subject: |
|
|
Kolusu,
I was trying to use a VSAM file with max=175 and averag=175 as a input in Syncsort. I was thinking that this file is a fixed lenght file hence I framed the outrec without considering the first 4 bytes which stores the lenght of the file. Sort was not working properly,
But at the same time, when i construct the outrec by considering this first 4 bytes(ie. the actual data starts from 5 bytes) the sort was working fine.
Sortmsg also saying input recfm=V!
So what is fixed length vsam file and variable length vsam file? how do we differentiate these? |
|
Back to top |
|
|
souvik_225 Beginner
Joined: 15 May 2004 Posts: 17 Topics: 2 Location: Mumbai , India
|
Posted: Thu Aug 12, 2004 5:58 am Post subject: |
|
|
As per my knowledge what Mike has said, is the way to differentiate between F and V Vsam files. Maybe u can show us the LISTCAT on the VSAM file. _________________ Thanks and Regards,
Souvik Upadhyay |
|
Back to top |
|
|
Brian Beginner
Joined: 12 Aug 2003 Posts: 95 Topics: 6
|
Posted: Thu Aug 12, 2004 6:16 am Post subject: |
|
|
I have always felt that a VSAM KSDS is a variable length dataset.
Cheers
Brian |
|
Back to top |
|
|
kolusu Site Admin
Joined: 26 Nov 2002 Posts: 12375 Topics: 75 Location: San Jose
|
Posted: Thu Aug 12, 2004 7:51 am Post subject: |
|
|
Quote: |
I have always felt that a VSAM KSDS is a variable length dataset.
|
Brian,
As far as I know you can only have a variable length cluster if the cluster is RRDS. I looked up the vsam manual and I could not find any reference to a variable length KSDS.
Mike,
Specifying the average record size and maximum record size when allocating a KSDS does not mean you are having a variable record length. I just allocated a ksds with average record size with 80 and maximum record size as 8000. I used sort to copy the cluster and this is the sysout output
Code: |
SYSIN :
SORT FIELDS=COPY
WER108I SORTIN : RECFM=F ; LRECL= 8000; CISIZE = 8192
WER110I SORTOUT : RECFM=FB ; LRECL= 8000; BLKSIZE= 8000
|
Notice the RECFM is F
Cathygomez,
Check the following links for detailed explanation of the various recfm
Fixed-Length Records (Format F)
Variable-Length Records (Format V or D)
Undefined Records (Format U)
Spanned Records (Format S)
Hope this helps...
Cheers
Kolusu _________________ Kolusu
www.linkedin.com/in/kolusu |
|
Back to top |
|
|
Brian Beginner
Joined: 12 Aug 2003 Posts: 95 Topics: 6
|
Posted: Fri Aug 13, 2004 12:03 am Post subject: |
|
|
Kolusu,
I did not mean vairable length in the actual sense. When i meant variable length i wanted to mention that records could take a length between the average and maximum specified lengths.
Cheers
Brian |
|
Back to top |
|
|
|
|