VB file, what will be there in the last byte?

All sort of Mainframes Interview Questions.
Post Reply
Dark Fantasy
New Member
Posts: 8
Joined: Sun Dec 08, 2013 12:54 am

VB file, what will be there in the last byte?

Post by Dark Fantasy »

Hi,Every one

The interviewer asked that, "what will be present at the end of record in case of VB record. Assuming VB record's maximum length is 100 byte and first record is 100 bytes long while the second record is 60 bytes. At 61 positon will there be any delimter ?

I could nto answer this question. Can someone please help.
William Collins
Global Moderator
Global Moderator
Posts: 490
Joined: Sun Aug 25, 2013 7:24 pm

Re: VB file, what will be there in the last byte?

Post by William Collins »

The last byte of the record will contain the last byte of your data. There is no byte after the last byte of data. There's an end-of-file marker, but you'll never see it.
User avatar
Robert Sample
Global Moderator
Global Moderator
Posts: 1895
Joined: Fri Jun 28, 2013 1:22 am
Location: Dubuque Iowa
United States of America

Re: VB file, what will be there in the last byte?

Post by Robert Sample »

VB records have a 4-byte PREFIX (called the Record Descriptor Word or RDW) which has 2 bytes for the length and X'0000' for the other 2 bytes. There is nothing special about the last byte of a record. For your example, the data set would contain a 4-byte BDW (Block Descriptor Word), a 4-byte RDW, 100 bytes of data, another 4-byte RDW, and 60 bytes of data (assuming the block size is big enough to hold 2 or more records).
Post Reply

Create an account or sign in to join the discussion

You need to be a member in order to post a reply

Create an account

Not a member? register to join our community
Members can start their own topics & subscribe to topics
It’s free and only takes a minute

Register

Sign in

Return to “Interview Questions.”