VB file in Sort



IBM's flagship sort product DFSORT for sorting, merging, copying, data manipulation and reporting. Includes ICETOOL and ICEGENER

VB file in Sort

Postby karthikchn » Thu Apr 29, 2010 6:16 pm

Hi,
Is it true that when I use a VB file in Sort, I have to add 4 bytes to the starting position in the fields= ?
I mean offset the position by 4 bytes?
Eg: if my field starts from position 1 in the actual file, i have to mention from comumn 5?

Thanks,
Karthikeyan.
karthikchn
 
Posts: 5
Joined: Thu Apr 29, 2010 6:02 pm
Has thanked: 0 time
Been thanked: 0 time

Re: VB file in Sort

Postby William Thompson » Thu Apr 29, 2010 7:17 pm

Absolutly yes.
William Thompson
 
Posts: 81
Joined: Sat Jun 09, 2007 4:24 am
Location: Tucson AZ
Has thanked: 0 time
Been thanked: 1 time

Re: VB file in Sort

Postby Robert Sample » Thu Apr 29, 2010 7:45 pm

Only if you want the sort to work correctly -- if you put position 1 for a variable blocked file, it'll sort by record length.
Robert Sample
Global moderator
 
Posts: 3719
Joined: Sat Dec 19, 2009 8:32 pm
Location: Dubuque, Iowa, USA
Has thanked: 1 time
Been thanked: 279 times

Re: VB file in Sort

Postby Frank Yaeger » Thu Apr 29, 2010 10:15 pm

Karthikeyan,

See the following for more information on this:

http://publibz.boulder.ibm.com/cgi-bin/ ... 0519162426
Frank Yaeger - DFSORT Development Team (IBM) - yaeger@us.ibm.com
Specialties: JOINKEYS, FINDREP, WHEN=GROUP, ICETOOL, Symbols, Migration
=> DFSORT/MVS is on the Web at http://www.ibm.com/storage/dfsort
User avatar
Frank Yaeger
Global moderator
 
Posts: 1079
Joined: Sat Jun 09, 2007 8:44 pm
Has thanked: 0 time
Been thanked: 15 times

Re: VB file in Sort

Postby karthikchn » Fri Apr 30, 2010 9:01 am

Thanks for the replies.
But in Cobol we do not declare the first 4 bytes as some Record Descriptor. We start from column 1 only?
Can some one explain this?

Like this for other Record formats(VBA, V, etc..) what are the special points to be noted in sort, etc.

Karthikeyan.
karthikchn
 
Posts: 5
Joined: Thu Apr 29, 2010 6:02 pm
Has thanked: 0 time
Been thanked: 0 time

Re: VB file in Sort

Postby dick scherrer » Fri Apr 30, 2010 9:48 am

Hello,

Simply said, you need to allow for the RDW (Record Descriptor Word) when specifying variable length data and using the sort.

You do not allow for the RDW in a cobol FD - it is handled by the system.
Hope this helps,
d.sch.
User avatar
dick scherrer
Global moderator
 
Posts: 6268
Joined: Sat Jun 09, 2007 8:58 am
Has thanked: 3 times
Been thanked: 93 times

Re: VB file in Sort

Postby William Thompson » Fri Apr 30, 2010 10:05 am

But in Cobol we do not declare the first 4 bytes as some Record Descriptor.
Yes, and VSAM keys beginning in the first byte are defined as zero followed by length. Assembler too defines data at an address, the first byte is +0.

But Sort, like COBOL, deals with the first byte of data as position one, it just that sort allows a view or the length attributes of a variable length record, leaving it to you to account that extra four bytes.

V and VB are the same , LLBB (block length and two unused bytes) followed by llbb (record length and two unused bytes). Sort gives you the power to access the record length (also known as the RDW or Record Descripter Word).

COBOL protects you from that minor programming problem, as does browsing the file records under TSO.

As far as I know, the only difference between V and VB is that the LLBB for the V file is always the same as the llbb (pluse four bytes) . Be aware that in the case of a short last block on a VB file (only one record long) the LLBB will be the same as the llbb (pluse four bytes).

The A on VBA and FBA means that the first data byte is a printer cariage control character, as in 'skip to channal one' or 'double space'. Sort and COBOL both let you access this character.
William Thompson
 
Posts: 81
Joined: Sat Jun 09, 2007 4:24 am
Location: Tucson AZ
Has thanked: 0 time
Been thanked: 1 time


Return to DFSORT/ICETOOL/ICEGENER

 


  • Related topics
    Replies
    Views
    Last post