VBS and VB for SORT JCL.
-
- Registered Member
- Posts: 50
- Joined: Thu Jun 27, 2013 6:17 pm
VBS and VB for SORT JCL.
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.
I need to work with a file which is VBS, does VBS file treated same as VB file by SORT? Please let me know.
- Robert Sample
- Global Moderator
- Posts: 1896
- Joined: Fri Jun 28, 2013 1:22 am
- Location: Dubuque Iowa
Re: VBS and VB for SORT JCL.
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.
-
- Registered Member
- Posts: 50
- Joined: Thu Jun 27, 2013 6:17 pm
Re: VBS and VB for SORT JCL.
Hi Thanks Robert,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.
how did you get those numbers, what is the calculation?
Re: VBS and VB for SORT JCL.
What have you searched for that you did not find the answer yourself? Robert is always explaining space/blksize/lrecl calculations.
Regards
Nic
Nic
- Robert Sample
- Global Moderator
- Posts: 1896
- Joined: Fri Jun 28, 2013 1:22 am
- Location: Dubuque Iowa
Re: VBS and VB for SORT JCL.
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.
-
- Registered Member
- Posts: 50
- Joined: Thu Jun 27, 2013 6:17 pm
Re: VBS and VB for SORT JCL.
Thanks Robert. This is a great explanation, I had to re-read it multiple time to understand this.
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