Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

Copying VBS file to VB file

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL
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    Post subject: Copying VBS file to VB file
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    Post subject:
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 Moderator


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

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

Ed,

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

http://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

Global Moderator


Joined: 14 Mar 2007
Posts: 10231
Location: italy

PostPosted: Wed Feb 15, 2012 4:13 am    Post subject: Reply to: Copying VBS file to VB file
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    Post subject:
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    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Receive a file using PCOMM macro Harald.v.K IBM Tools 0 Thu Mar 23, 2017 6:50 pm
No new posts Export flat file data into excel sheet murali.andaluri DFSORT/ICETOOL 2 Mon Mar 20, 2017 5:39 pm
No new posts Formatting VB File Learncoholic DFSORT/ICETOOL 3 Mon Mar 20, 2017 12:29 pm
No new posts Updating a VSAM file with DISP=OLD sheersh JCL & VSAM 8 Tue Mar 14, 2017 6:14 pm
No new posts SORT VSAM file with each field one by... maxsubrat DFSORT/ICETOOL 6 Tue Mar 14, 2017 1:07 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us