View previous topic :: View next topic
|
Author |
Message |
isam777
New User
Joined: 27 Jun 2007 Posts: 2 Location: Chennai
|
|
|
|
Can anyone let me know the difference between the FB and VB Record formats of datasets
Sam |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
Hello,
FB records are the same length in a file.
VB records may be different lengths in a file. |
|
Back to top |
|
|
HappySrinu
Active User
Joined: 22 Jan 2008 Posts: 194 Location: India
|
|
|
|
isam777 wrote: |
Can anyone let me know the difference between the FB and VB Record formats of datasets
Sam |
Hey Sam,
FB - > Fixed Block means the entire file is having max of fixed block record
VB - > Variable Block which you can guess by now |
|
Back to top |
|
|
superman
New User
Joined: 28 Mar 2011 Posts: 12 Location: india
|
|
|
|
Accessing data in which file is faster VB or FB? |
|
Back to top |
|
|
Bill Woodger
Moderator Emeritus
Joined: 09 Mar 2011 Posts: 7309 Location: Inside the Matrix
|
|
|
|
FB.
Edit: Yoy, when you want to ask a new question, start a new topic. What is your interest in the answer? |
|
Back to top |
|
|
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 8797 Location: Welsh Wales
|
|
|
|
superman wrote: |
Accessing data in which file is faster VB or FB? |
Huh, it's hardly like you get a choice |
|
Back to top |
|
|
Pete Wilson
Active Member
Joined: 31 Dec 2009 Posts: 580 Location: London
|
|
|
|
VB files also have 4 bytes reserved in every block for the Block Descriptor Word (BDW), and 4 bytes for each record for the Record Descriptor Record (RDW)
I've been told by programmers that VB are more efficient when you have variable length records, which makes sense because it's more likely fill a block, but that it's harder to write programs to access them.
Best source of info would be IBM's 'Managing Dataset' manual. |
|
Back to top |
|
|
Bill Woodger
Moderator Emeritus
Joined: 09 Mar 2011 Posts: 7309 Location: Inside the Matrix
|
|
|
|
expat wrote: |
Huh, it's hardly like you get a choice |
I'm with expat on this. If your dataset can contain records of different lengths, then you have to at least have V. VB is going to be more efficient than V. You can't use F or FB, unless you make all the records the same length, which could waste the odd byte or two.
What strikes me as odd is the apparent use of V/VB for records which are the same length as each other. That would have a greater overhead than F/FB, plus waste four bytes per record and a futher four bytes per block.
Is, for a programmer, one "easier" to code than the other? It does seem that more people have trouble reading V files than F files, but that is mainly because they don't find out how to do it before attempting it. I don't think that counts as "difficult".
To write a program reading a V file (or any file) I'd copy the code from another program anyway. Same for an F. Or a DB. Or whatever. Same amount of difficulty for all (asuming the code I copy works....). |
|
Back to top |
|
|
don.leahy
Active Member
Joined: 06 Jul 2010 Posts: 765 Location: Whitby, ON, Canada
|
|
|
|
Bill Woodger wrote: |
expat wrote: |
Huh, it's hardly like you get a choice |
What strikes me as odd is the apparent use of V/VB for records which are the same length as each other. That would have a greater overhead than F/FB, plus waste four bytes per record and a futher four bytes per block.
|
Odd indeed. I have been in a situation when it was necessary. We had to transfer files to another platform, and the application on that side demanded that the records be fixed length. No problem, we copied the file from VB to FB and transmitted it to them. The problem was that the file transfer utility (not FTP, I think it was NFS) "helped" us out by dropping all of the trailing blanks on each record. This was not acceptable to the receiving app, which, for some reason (it was a packaged product) could not handle what was actually a traditional line sequential file with records terminated with CRLF. It needed the CRLF to be in a fixed position for all records.
We couldn't get the file transfer process to handle it for us, so we resorted to creating the file as VB, with all of the records blank padded to the maximum lrecl. We called this "fixed variable" format (that was what we told management, our own name for it was unprintable) and did the trick because the file transfer process would respect the RDW and create the file accordingly.
Sometimes stupid things are done for a reason. |
|
Back to top |
|
|
|