IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

Copying VBS file to VB file


IBM Mainframe Forums -> DFSORT/ICETOOL
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
Ed Goodman

Active Member


Joined: 08 Jun 2011
Posts: 556
Location: USA

PostPosted: Wed Feb 15, 2012 2:19 am
Reply with quote

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
View user's profile Send private message
Ed Goodman

Active Member


Joined: 08 Jun 2011
Posts: 556
Location: USA

PostPosted: Wed Feb 15, 2012 3:34 am
Reply with quote

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
View user's profile Send private message
Frank Yaeger

DFSORT Developer


Joined: 15 Feb 2005
Posts: 7129
Location: San Jose, CA

PostPosted: Wed Feb 15, 2012 4:11 am
Reply with quote

Ed,

VBS records have an SDW instead of an RDW, as described here:

publib.boulder.ibm.com/infocenter/zos/v1r11/index.jsp?topic=/com.ibm.zos.r11.idad400/d4363.htm

DFSORT knows how to process/combine properly written VBS segments to create complete VB records.

It appears the spanned records you are dealing with are NOT standard in terms of the flags used to indicate the segment type so DFSORT doesn't recognize them as spanned.
Back to top
View user's profile Send private message
enrico-sorichetti

Superior Member


Joined: 14 Mar 2007
Posts: 10873
Location: italy

PostPosted: Wed Feb 15, 2012 4:13 am
Reply with quote

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
View user's profile Send private message
Ed Goodman

Active Member


Joined: 08 Jun 2011
Posts: 556
Location: USA

PostPosted: Wed Feb 15, 2012 8:07 pm
Reply with quote

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
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> DFSORT/ICETOOL

 


Similar Topics
Topic Forum Replies
No new posts Compare 2 files and retrive records f... DFSORT/ICETOOL 3
No new posts FTP VB File from Mainframe retaining ... JCL & VSAM 8
No new posts Extract the file name from another fi... DFSORT/ICETOOL 6
No new posts How to split large record length file... DFSORT/ICETOOL 10
No new posts Extracting Variable decimal numbers f... DFSORT/ICETOOL 17
Search our Forums:

Back to Top