Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Profile Log in to check your private messages Log in
 
VBS and VB, COBOL syntax is the same for writing output file

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> COBOL Programming
View previous topic :: :: View next topic  
Author Message
natt.sut

New User


Joined: 01 Nov 2017
Posts: 4
Location: Thailand

PostPosted: Sun Nov 12, 2017 6:36 am    Post subject: VBS and VB, COBOL syntax is the same for writing output file
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: 8187
Location: East Dubuque, Illinois, USA

PostPosted: Sun Nov 12, 2017 8:23 am    Post subject: Reply to: VBS and VB, COBOL syntax is the same for writing output file
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: 4
Location: Thailand

PostPosted: Sun Nov 12, 2017 8:46 am    Post subject: Re: Reply to: VBS and VB, COBOL syntax is the same for writing output file
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
https://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: 8187
Location: East Dubuque, Illinois, USA

PostPosted: Sun Nov 12, 2017 9:09 am    Post subject:
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    IBMMAINFRAMES.com Support Forums -> COBOL Programming All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
This topic is locked: you cannot edit posts or make replies. Cobol to fetch the content by using s... arunc55 COBOL Programming 4 Fri Nov 17, 2017 1:25 pm
No new posts Updating data from one file to other!!! Vignesh Sid SYNCSORT 1 Mon Nov 06, 2017 2:42 pm
No new posts Copy selected columns from 2 input fi... Poha Eater DFSORT/ICETOOL 3 Thu Nov 02, 2017 3:43 pm
This topic is locked: you cannot edit posts or make replies. Need help how to pass the ESP variabl... Venkichaitu JCL & VSAM 12 Thu Nov 02, 2017 3:53 am
This topic is locked: you cannot edit posts or make replies. Comparing current time with the time ... arunsoods SYNCSORT 1 Mon Oct 30, 2017 4:07 pm

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us