VBS and VB for SORT JCL.

IBM's Sort Product, ICETOOL, ICEMAN and ICEGENER.
Previous topicNext topic

Topic Author
Ashish Mathew
Registered Member
Posts: 50
Joined: Thu Jun 27, 2013 6:17 pm
Zodiac: Scorpio

VBS and VB for SORT JCL.

Post by Ashish Mathew » Tue Jan 09, 2018 3:31 pm

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: 1379
Joined: Fri Jun 28, 2013 1:22 am
Location: Dubuque Iowa
Zodiac: Virgo

Re: VBS and VB for SORT JCL.

Post by Robert Sample » Tue Jan 09, 2018 6:19 pm

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.




Topic Author
Ashish Mathew
Registered Member
Posts: 50
Joined: Thu Jun 27, 2013 6:17 pm
Zodiac: Scorpio

Re: VBS and VB for SORT JCL.

Post by Ashish Mathew » Thu Feb 15, 2018 2:03 pm

Robert Sample wrote:
Tue Jan 09, 2018 6:19 pm
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.
Hi Thanks Robert,

how did you get those numbers, what is the calculation?




nicc
Global Moderator
Global Moderator
Posts: 597
Joined: Wed Apr 23, 2014 8:45 pm

Re: VBS and VB for SORT JCL.

Post by nicc » Thu Feb 15, 2018 4:21 pm

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: 1379
Joined: Fri Jun 28, 2013 1:22 am
Location: Dubuque Iowa
Zodiac: Virgo

Re: VBS and VB for SORT JCL.

Post by Robert Sample » Thu Feb 15, 2018 6:12 pm

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.




Topic Author
Ashish Mathew
Registered Member
Posts: 50
Joined: Thu Jun 27, 2013 6:17 pm
Zodiac: Scorpio

Re: VBS and VB for SORT JCL.

Post by Ashish Mathew » Tue Feb 20, 2018 6:46 pm

Thanks Robert. This is a great explanation, I had to re-read it multiple time to understand this. :)



Previous topicNext topic

Return to “IBM DFSort, ICETOOL, ICEMAN, ICEGENER.”