Thank you for your response, Michael,

1. FTP -> what options did you use? -- I use Binary and QUOTE SITE RDW

2. Terse & XMIT and then ? how did it get to windows? -- I used WWUNTERSE 
(>From Watson & Walker) for TERSE and XMIT manager (from CBT tape) for XMIT 

3. IND$FILE which you decided isn't really a candidate due to file sizes. -- 
That's correct

Which python: python 2 or python 3? -- Python 3

Did you specify binary mode on the python open call? -- Yes. And I can read the 
data. Its just that I don't get proper end of record. Hence every time I read 
record, I get random record length (multiple records/half records combined)

Thanks,
Prashant

-----Original Message-----
From: IBM Mainframe Discussion List <IBM-MAIN@LISTSERV.UA.EDU> On Behalf Of 
Michael Stein
Sent: Tuesday, May 16, 2023 1:37 AM
To: IBM-MAIN@LISTSERV.UA.EDU
Subject: [EXTERNAL] Re: VBS file read in windows - end of record issue

On Mon, May 15, 2023 at 06:54:40PM +0000, Prashant Joshi wrote:
> I am trying to read VB & VBS binary file in windows using python. I 
> tried FTPing file directly, then using Terse and then XMIT but every 
> time when I read the file in windows, I get random new line (CR/LF) 
> inserted in record. I am not able to read complete record.

Let's see if I understand the problem, here's a summary I see:

You tried 3 transfer mechanisms for the z/OS to your windows machine (I'm 
assuming it's from z/OS since this is the mainframe list).

1. FTP -> what options did you use?

2. Terse & XMIT and then ? how did it get to windows?

   What do you have on windows which can process this combination
   of format?

3. IND$FILE which you decided isn't really a candidate due to file sizes.

On the windows machine you are trying to read the resulting file with python.

Which python: python 2 or python 3?

Did you specify binary mode on the python open call?

The raw VB & VBS files sound relatively easy to read with python by reading in 
binary mode and using the BDW/RDW information to separate the records.  

I'm not sure how you would deal with undoing the XMIT and Terse on windows once 
you got an intact file there.

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions, send email to 
lists...@listserv.ua.edu with the message: INFO IBM-MAIN

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN

Reply via email to