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

VBS and VB, COBOL syntax is the same for writing output file


IBM Mainframe Forums -> COBOL Programming
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
natt.sut

New User


Joined: 01 Nov 2017
Posts: 8
Location: Thailand

PostPosted: Sun Nov 12, 2017 6:36 am
Reply with quote

I take a look some Program_A, and this program written file into VBS format (In JCL).

Can I just change format from RECFM=VBS to VB in JCL. Or Do I need to change something in COBOL program.

FYI
My environment is Mainframe/COBOL
If I remember correctly, Program_A declared about RDW. Not see SDW syntax

Thank you very much.
Back to top
View user's profile Send private message
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 8569
Location: Dubuque, Iowa, USA

PostPosted: Sun Nov 12, 2017 8:23 am
Reply with quote

You do not have to change anything in COBOL if your JCL changes from VBS to VB. The difference between a VBS and a VB data set is how records are added to the end of the block. VBS puts a partial record into the end of the block (as long as there are at least 5 bytes available -- 4 for the RDW and 1 for the data) while VB won't split records. Hence a VBS data set record length will be very close to the BLKSIZE, while a VB data set record length could be as short as BLKSIZE - LRECL + 1 (without considering the RDW).

The only difference between an SDW and RDW is that the second two bytes are always X'00' for the RDW whereas the SDW will have other values (IIRC, X'01' indicates the record starts in this block but does not end, X'02 indicates the record ends in this block but did not start in it, and X'03' indicates the record did not start nor end in this block, and X'00' indicates the record begins and ends in this block).
Back to top
View user's profile Send private message
natt.sut

New User


Joined: 01 Nov 2017
Posts: 8
Location: Thailand

PostPosted: Sun Nov 12, 2017 8:46 am
Reply with quote

Robert Sample wrote:
You do not have to change anything in COBOL if your JCL changes from VBS to VB. The difference between a VBS and a VB data set is how records are added to the end of the block. VBS puts a partial record into the end of the block (as long as there are at least 5 bytes available -- 4 for the RDW and 1 for the data) while VB won't split records. Hence a VBS data set record length will be very close to the BLKSIZE, while a VB data set record length could be as short as BLKSIZE - LRECL + 1 (without considering the RDW).

The only difference between an SDW and RDW is that the second two bytes are always X'00' for the RDW whereas the SDW will have other values (IIRC, X'01' indicates the record starts in this block but does not end, X'02 indicates the record ends in this block but did not start in it, and X'03' indicates the record did not start nor end in this block, and X'00' indicates the record begins and ends in this block).


Thank you for quick response,
one other question > the third party receive ISO format from us.
They told me that they accept variable length format. not accept fix length.

In general, they are OK with VBS or not?
When we say variable format, it should include

V/VA/VB/VM/VS/VBA/VBM/VBS/VSA/VSM/VBSA/VBSM

reference from
www.ibm.com/support/knowledgecenter/en/SSB27U_6.4.0/com.ibm.zos.r12.cbcpx01/cbcpg1b017.htm
Back to top
View user's profile Send private message
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 8569
Location: Dubuque, Iowa, USA

PostPosted: Sun Nov 12, 2017 9:09 am
Reply with quote

You can experiment but I suspect you will find that even if they can handle variable blocked, they may not be able to handle variable blocked spanned, unless they are capable of handling segment descriptor words. VBS will (usually) be treated as VB, and that means the data record segments will NOT be combined as they should be. A lot will depend upon the transfer method between sites and whether or not the transfer method recognizes VBS.
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 -> COBOL Programming

 


Similar Topics
Topic Forum Replies
No new posts Remove additional information in SUPE... TSO/ISPF 10
This topic is locked: you cannot edit posts or make replies. Writng matched records into output fi... DFSORT/ICETOOL 11
No new posts Compare the file record count percent... DFSORT/ICETOOL 4
No new posts compare two file to find position/dat... SYNCSORT 2
No new posts Converting a file from PD to display ... SYNCSORT 4
Search our Forums:

Back to Top