VBS and VB for SORT JCL.

IBM's Sort Product, ICETOOL, ICEMAN and ICEGENER.
Post Reply
Ashish Mathew
Registered Member
Posts: 50
Joined: Thu Jun 27, 2013 6:17 pm

VBS and VB for SORT JCL.

Post by Ashish Mathew »

Hi,

I need to work with a file which is VBS, does VBS file treated same as VB file by SORT? Please let me know.
User avatar
Robert Sample
Global Moderator
Global Moderator
Posts: 1886
Joined: Fri Jun 28, 2013 1:22 am
Location: Dubuque Iowa
United States of America

Re: VBS and VB for SORT JCL.

Post by Robert Sample »

SORT should treat the VBS data set the same as a VB data set. The difference between VBS and VB is that the shortest block in a VBS will be no less than 4 bytes smaller than the block size, while a VB may have a block that is just under the LRECL shorter than the block size. For a data set defined with 10000 LRECL and 27998 BLKSIZE, the difference could be significant -- a block could be less than 18000 bytes with VB but no less than 27995 with VBS.
Ashish Mathew
Registered Member
Posts: 50
Joined: Thu Jun 27, 2013 6:17 pm

Re: VBS and VB for SORT JCL.

Post by Ashish Mathew »

Robert Sample wrote: Tue Jan 09, 2018 6:19 pmSORT should treat the VBS data set the same as a VB data set. The difference between VBS and VB is that the shortest block in a VBS will be no less than 4 bytes smaller than the block size, while a VB may have a block that is just under the LRECL shorter than the block size. For a data set defined with 10000 LRECL and 27998 BLKSIZE, the difference could be significant -- a block could be less than 18000 bytes with VB but no less than 27995 with VBS.
Hi Thanks Robert,

how did you get those numbers, what is the calculation?
nicc
Global Moderator
Global Moderator
Posts: 691
Joined: Wed Apr 23, 2014 8:45 pm

Re: VBS and VB for SORT JCL.

Post by nicc »

What have you searched for that you did not find the answer yourself? Robert is always explaining space/blksize/lrecl calculations.
Regards
Nic
User avatar
Robert Sample
Global Moderator
Global Moderator
Posts: 1886
Joined: Fri Jun 28, 2013 1:22 am
Location: Dubuque Iowa
United States of America

Re: VBS and VB for SORT JCL.

Post by Robert Sample »

When the system is filling a block before writing it out, for VBS the system will use the space as long as there are 5 bytes available in the block (4 for the segment descriptor word and 1 for data); for VB if the new record would cause the block to overflow then the write occurs and the new record starts a new block. So for a 10000-byte record, which needs 10004 bytes, a block with 17995 bytes in it would force the write and starting a new block. So no more than 4 bytes per block will be unused in a VBS data set while a VB data set block length depends upon the record lengths.
Ashish Mathew
Registered Member
Posts: 50
Joined: Thu Jun 27, 2013 6:17 pm

Re: VBS and VB for SORT JCL.

Post by Ashish Mathew »

Thanks Robert. This is a great explanation, I had to re-read it multiple time to understand this. :)
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 “IBM DFSort, ICETOOL, ICEMAN, ICEGENER.”