View previous topic :: View next topic
|
Author |
Message |
Ed Goodman
Active Member
Joined: 08 Jun 2011 Posts: 556 Location: USA
|
|
|
|
I have a VBS file created by the IMS BTS test tool. It is LRECL=4096, BLKSIZE=0, RECFM=VBS.
I have DFSORT step that copies this file to a VB file: LRECL=4096, BLKSIZE=0, RECFM=VB. I use SORT FIELDS=COPY
I have hit a weird problem when I have an actual spanned record. What I get out from the copy step is two output records for the spanned record. The record is split where the span occurs. The first part starts correctly, then truncates at the block boundry, then the next record picks up where the previous record ended.
I can't be certain if the BTS tools is really spanning the record in the "normal" way, it won't opn in ISPF, and my other tool is FileManager. It simply stops on the last non-spanned record. The split record, and everything behind it, is not showing at all.
Does this sound like a non-standard output from BTS? If not, is there an option or something to not split those records? Or maybe a more basic utility I should use? |
|
Back to top |
|
|
Ed Goodman
Active Member
Joined: 08 Jun 2011 Posts: 556 Location: USA
|
|
|
|
Update:
I wrote a COBOL program to read the file. Here's what I found.
The "good" records not being split have an RDW of decimal 0863 x'035F0000'
The first part of the split record has 0212 with a x'00D44000' (notice the '40')
The second part of the split record has 0651 with a x'028B8000' (notice the '80')
So I guess the split indicator is in the 'zz' part of the RDW's llzz.
I made my program read those bytes and combine the records accordingly. It seems to be working OK. |
|
Back to top |
|
|
Frank Yaeger
DFSORT Developer
Joined: 15 Feb 2005 Posts: 7129 Location: San Jose, CA
|
|
Back to top |
|
|
enrico-sorichetti
Superior Member
Joined: 14 Mar 2007 Posts: 10889 Location: italy
|
|
|
|
found somewhere in my sandbox
Code: |
SDW for VBS ( Variable Blocked Spanned ) Records
The four bytes preceding the logical record is the Segment Descriptor Word.
Bytes Description
1-2 Length of the logical record (plus length of the four-byte Descriptor Word)
3 Segment Control Codes
Value Relative position of segment
00 A complete logical record
01 The first segment of a multiple segments record
02 The last segment of a multiple segments record
03 A middle segment of a multiple segments record
4 Low value, ( as usual ) reserved for future use
|
|
|
Back to top |
|
|
Ed Goodman
Active Member
Joined: 08 Jun 2011 Posts: 556 Location: USA
|
|
|
|
Thanks.
I'm just going to use my new little COBOL program to translate this file. I found the chart that enrico displayed and that's what made me go look for the extra info in the other set of bytes.
Hopefully, I won't have any segments spanning more than two blocks, since I only know for certain what a "start" and "end" flag look like.
I guess I'll burn that bridge when I get to it. |
|
Back to top |
|
|
|