I apologize if this has already been covered on this thread, but using LF/CRLF 
etc on a VBS file will result in problems with binary records since they could 
easily contain a line terminator.

To answer your other question (preserving SDW):  if you copy a RECFM=VBS 
dataset using DCB=RECFM=U, you will get BDWs and SDWs.

Kirk Wolf
Dovetailed Technologies

PS>  Co:Z SFTP and Co:Z Dataset Pipes have options for converting z/OS records 
like RECFM=VBS into streams of bytes with various terminators, like  cr, crlf, 
rdw, l4 (4 byte length prefix), mfrdw (Microfocus), an aribtrary hex separator, 
or no separators.   For binary records you would want to use rdw, l4, or mfrdw 
options.  You can download and use it under the terms of our free Community 
License.
https://coztoolkit.com/docs/dspipes/dsp-ref_fromdsn.html


You might also consider writing a z/OS program yourself that converts RECFM=VBS 
into a simple length prefixed stream.  If you are a little comfortable with 
Java, the com.ibm.jzos.RecordReader class makes that super simple.

On Mon, May 15, 2023, at 11:20 PM, Prashant Joshi wrote:
> Thank for your response, Paul.
> 
> I agree, CRLF irrelevant to binary files. Surprisingly, only after using CRLF 
> option, I get those binary records in proper record length.
> I tried to force it to U format but did not work for m. I will try again with 
> different methods.
> 
> I can preserve RDW and BDW. How to preserve SDW? I did not see mention of SDW 
> in these options. May be SDW is the key to maintain record length.
> 
> Thank you,
> Prashant Joshi
> Mainframe Architect
> +91 9743 440 503 (Mobile) 
> 
> 
> -----Original Message-----
> From: IBM Mainframe Discussion List <[email protected]> On Behalf Of 
> Paul Gilmartin
> Sent: Tuesday, May 16, 2023 1:38 AM
> To: [email protected]
> Subject: [EXTERNAL] Re: VBS file read in windows - end of record issue
> 
> On Mon, 15 May 2023 18:54:40 +0000, Prashant Joshi  wrote:
> >    ...
> >For some files, when I transfer using IND$FILE (option 6) using Binary and 
> >CRLF option checked, I gets record properly. But it does not work for every 
> >file. And due to different file sizes, IND$FILE may not be option for me.
> >
> CRLF should be irrelevant for binary files.
> 
> 
> >Need your help to find, what am I missing?
> >
> Allocate your data set overriding to RECFM=U.  Tne BDWs and SDWs should 
> appear ad data.
> 
> Transfer the file with a method that preserves those BDWs and SDWs.  (I don't 
> recommend
> IND$FILE.)
> 
> Decode the SDWs and translate to UTF-8  with your Python.
> 
> I hate EBCDIC!
> 
> --
> gil
> 
> ----------------------------------------------------------------------
> For IBM-MAIN subscribe / signoff / archive access instructions, send email to 
> [email protected] with the message: INFO IBM-MAIN
> 
> ----------------------------------------------------------------------
> For IBM-MAIN subscribe / signoff / archive access instructions,
> send email to [email protected] with the message: INFO IBM-MAIN
> 

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [email protected] with the message: INFO IBM-MAIN

Reply via email to