MVSFORUMS.com Forum Index MVSFORUMS.com
A Community of and for MVS Professionals
 
 FAQFAQ   SearchSearch   Quick Manuals   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

VSAM - Fixed length & Variable length Definition?

 
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Data Management
View previous topic :: View next topic  
Author Message
Cathygomez
Beginner


Joined: 04 Aug 2004
Posts: 6
Topics: 3

PostPosted: Wed Aug 04, 2004 5:22 am    Post subject: VSAM - Fixed length & Variable length Definition? Reply with quote

Hi
when do we say the VSAM(KSDS) file as a fixed length file or Variable length file?
Back to top
View user's profile Send private message
kolusu
Site Admin
Site Admin


Joined: 26 Nov 2002
Posts: 12375
Topics: 75
Location: San Jose

PostPosted: Wed Aug 04, 2004 5:50 am    Post subject: Reply with quote

Cathygomez,


Can you elaborate your question?

Kolusu
_________________
Kolusu
www.linkedin.com/in/kolusu
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Mike Chantrey
Intermediate


Joined: 10 Sep 2003
Posts: 234
Topics: 1
Location: Wansford

PostPosted: Wed Aug 04, 2004 8:30 am    Post subject: Reply with quote

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
View user's profile Send private message
Cathygomez
Beginner


Joined: 04 Aug 2004
Posts: 6
Topics: 3

PostPosted: Thu Aug 12, 2004 2:03 am    Post subject: Reply with quote

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. Laughing

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
View user's profile Send private message
souvik_225
Beginner


Joined: 15 May 2004
Posts: 17
Topics: 2
Location: Mumbai , India

PostPosted: Thu Aug 12, 2004 5:58 am    Post subject: Reply with quote

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
View user's profile Send private message Yahoo Messenger
Brian
Beginner


Joined: 12 Aug 2003
Posts: 95
Topics: 6

PostPosted: Thu Aug 12, 2004 6:16 am    Post subject: Reply with quote

I have always felt that a VSAM KSDS is a variable length dataset.

Cheers
Brian
Back to top
View user's profile Send private message
kolusu
Site Admin
Site Admin


Joined: 26 Nov 2002
Posts: 12375
Topics: 75
Location: San Jose

PostPosted: Thu Aug 12, 2004 7:51 am    Post subject: Reply with quote

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
View user's profile Send private message Send e-mail Visit poster's website
Brian
Beginner


Joined: 12 Aug 2003
Posts: 95
Topics: 6

PostPosted: Fri Aug 13, 2004 12:03 am    Post subject: Reply with quote

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
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Data Management All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


MVSFORUMS
Powered by phpBB © 2001, 2005 phpBB Group