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: 8
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: 8344
Location: Dubuque, Iowa, 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: 8
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: 8344
Location: Dubuque, Iowa, 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
No new posts Need help - DB2 Dynamic SQL Program e... NikhilGuptaGaya DB2 2 Sat Jun 23, 2018 1:58 pm
No new posts To remove spaces from a VB file using... Selvarajars DFSORT/ICETOOL 5 Thu Jun 21, 2018 6:57 pm
No new posts B059 PREMATURE END OF FILE mvmadhuvenkatesh CA Products 5 Tue Jun 19, 2018 10:50 am
No new posts Formating output file Niki DFSORT/ICETOOL 3 Fri Jun 15, 2018 3:27 pm
No new posts Need help on TDQ load from file using... subratarec CICS 4 Wed Jun 13, 2018 11:32 pm

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