IBM Mainframe Forum Index
 
Register
 
IBM Mainframe Forum Index Mainframe: Search Log in to check your private messages Log in
 

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: 8566
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
Use [URL] BBCode for Links
Back to top
View user's profile Send private message
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 8566
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 All times are GMT + 6 Hours
Forum Index -> COBOL Programming
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Forum Replies
No new posts JCL for replacing code in Cobol JCL & VSAM 8
No new posts COBOL VS SORT Utility for file format... COBOL Programming 6
No new posts How to find which file contains my se... DFSORT/ICETOOL 6
No new posts IGZ0035S THERE WAS AN UNSUCCESSFUL OP... COBOL Programming 3
No new posts XML Parsing in COBOL creating "h... COBOL Programming 0

Back to Top