Re: VBS file read in windows - end of record issue

2023-05-18 Thread Paul Gilmartin
On Thu, 18 May 2023 11:37:18 -0500, Kirk Wolf wrote: > >To answer your other question (preserving SDW): if you copy a RECFM=VBS >dataset using DCB=RECFM=U, you will get BDWs and SDWs. > Yes. I did that with REXX in an era when REXX supported nether VBS nor U. I first used a utility (REPRO,

Re: VBS file read in windows - end of record issue

2023-05-18 Thread Kirk Wolf
lmartin > Sent: Tuesday, May 16, 2023 1:38 AM > To: IBM-MAIN@LISTSERV.UA.EDU > Subject: [EXTERNAL] Re: VBS file read in windows - end of record issue > > On Mon, 15 May 2023 18:54:40 +, Prashant Joshi wrote: > >... > >For some files, when I transfer using IND$FILE (option 6)

Re: VBS file read in windows - end of record issue

2023-05-18 Thread Michael Oujesky
Discussion List On Behalf Of Radoslaw Skorupka Sent: 18 May 2023 10:36 To: IBM-MAIN@LISTSERV.UA.EDU Subject: Re: VBS file read in windows - end of record issue Well, can you show me a JCL job to allocate such dataset? My experience say that any attempt to create PS dataset with LRECL > ~32kB e

Re: VBS file read in windows - end of record issue

2023-05-18 Thread Michael Oujesky
See the references on XLRI. This should be a good start - Processing Records Longer than 32 760 Bytes - IBM Documentation This also might help -

Re: VBS file read in windows - end of record issue

2023-05-18 Thread Lennie Dymoke-Bradshaw
like no one is watching. Encrypt like everyone is.’ -Original Message- From: IBM Mainframe Discussion List On Behalf Of Radoslaw Skorupka Sent: 18 May 2023 10:36 To: IBM-MAIN@LISTSERV.UA.EDU Subject: Re: VBS file read in windows - end of record issue Well, can you show me a JCL job

Re: VBS file read in windows - end of record issue

2023-05-18 Thread Radoslaw Skorupka
Well, can you show me a JCL job to allocate such dataset? My experience say that any attempt to create PS dataset with LRECL > ~32kB ends with JCL error and IEF638I JCL Reference clearly say that for non-VSAM dataset the maximum is 32760. For VSAM it is 32761. "Additional Syntax" says it is

Re: VBS file read in windows - end of record issue

2023-05-17 Thread Michael Oujesky
Having read and written records longer than three MB, it is not "cheating". Especially with RMF 74.5 records with 59 "broken" (split) records to reassemble into one very long record. See the SMF manual on RMF record reassembly area. JCL allows LRECL=16384K. And SMS compressed files write

Re: VBS file read in windows - end of record issue

2023-05-17 Thread Steve Thompson
Not sure this is correct (VBS sizing). If I remember correctly VBS was handling telemetry data which could be quite long and was also variable in size per record. Steve Thompson On 5/17/2023 2:20 PM, Radoslaw Skorupka wrote: Well, not really. There is LRECL=X, but besides we have not very

Re: VBS file read in windows - end of record issue

2023-05-17 Thread Paul Gilmartin
On Wed, 17 May 2023 20:20:24 +0200, Radoslaw Skorupka wrote: >... >BTW: The purpose of VBS was not veeery long record, but records up >to 32k, even on DASD with shorter track. Hint: the track is natural >limit of BLKSIZE. It is no longer important since 3380 (80's), because >track size

Re: VBS file read in windows - end of record issue

2023-05-17 Thread Radoslaw Skorupka
Well, not really. There is LRECL=X, but besides we have not very strict limitation of LRECL. It is 32760 or 32767. First value is limited by JCL syntax, but the second is available when allocation PS using LIKE= keyword. Of course one may automagically write segments with custom-created SDWs,

Re: VBS file read in windows - end of record issue

2023-05-17 Thread David Crayford
> On 17 May 2023, at 2:53 am, Paul Gilmartin > <042bfe9c879d-dmarc-requ...@listserv.ua.edu> wrote: > > On Tue, 16 May 2023 11:26:06 -0700, Michael Stein wrote: >> >> read can be supplied with an operand saying the maximum amount to >> read: read(4) to read 4 bytes. It might read less

Re: VBS file read in windows - end of record issue

2023-05-16 Thread Farley, Peter
y 16, 2023 2:54 PM To: IBM-MAIN@LISTSERV.UA.EDU Subject: Re: VBS file read in windows - end of record issue On Tue, 16 May 2023 11:26:06 -0700, Michael Stein wrote: > >read can be supplied with an operand saying the maximum amount to >read: read(4) to read 4 bytes. It might read less

Re: VBS file read in windows - end of record issue

2023-05-16 Thread Paul Gilmartin
On Tue, 16 May 2023 11:26:06 -0700, Michael Stein wrote: > >read can be supplied with an operand saying the maximum amount to >read: read(4) to read 4 bytes. It might read less either because > So: "read_data = f.read( ntohs( SDW ) - 4 )" >it reached the end of the input file or because the

Re: VBS file read in windows - end of record issue

2023-05-16 Thread Michael Stein
On Tue, May 16, 2023 at 11:23:46AM -0500, Paul Gilmartin wrote: > On Tue, 16 May 2023 11:06:59 -0500, John McKown wrote: > > >In one of my C programs, I first read the RDW, did a ntohs() to convert > >from mainframe to Intel integer, subtracted 4, then read that number of > >bytes into a

Re: VBS file read in windows - end of record issue

2023-05-16 Thread Michael Oujesky
Just another tidbit, but when combining the record segments, while the VBS architecture does not specify a maximum record length, you can expect the full records to be up to 16,777,215 (16384K - 1) bytes in length. Realizing that the RDW is actually a SDW. Michael At 01:26 AM 5/16/2023,

Re: VBS file read in windows - end of record issue

2023-05-16 Thread Seymour J Metz
__ From: IBM Mainframe Discussion List on behalf of Paul Gilmartin <042bfe9c879d-dmarc-requ...@listserv.ua.edu> Sent: Tuesday, May 16, 2023 12:23 PM To: IBM-MAIN@LISTSERV.UA.EDU Subject: Re: VBS file read in windows - end of record issue On Tue, 16 May 2023 11:06:59 -0500, John Mc

Re: VBS file read in windows - end of record issue

2023-05-16 Thread Paul Gilmartin
On Tue, 16 May 2023 11:06:59 -0500, John McKown wrote: >In one of my C programs, I first read the RDW, did a ntohs() to convert >from mainframe to Intel integer, subtracted 4, then read that number of >bytes into a char[32768]. > I'm Python-naive. But trying to educate myself with the example,

Re: VBS file read in windows - end of record issue

2023-05-16 Thread John McKown
In one of my C programs, I first read the RDW, did a ntohs() to convert from mainframe to Intel integer, subtracted 4, then read that number of bytes into a char[32768]. On Tue, May 16, 2023 at 7:46 AM Paul Gilmartin < 042bfe9c879d-dmarc-requ...@listserv.ua.edu> wrote: > On Tue, 16 May 2023

Re: VBS file read in windows - end of record issue

2023-05-16 Thread Paul Gilmartin
On Tue, 16 May 2023 09:03:56 +, Prashant Joshi wrote: > >I was trying to read file using "with open as". This way I was expecting to >pull single record at every iteration of loop. >With your suggestion, I opened entire file in memory and read each record >based on record length in RDW.

Re: VBS file read in windows - end of record issue

2023-05-16 Thread Prashant Joshi
ay, May 16, 2023 11:56 AM To: IBM-MAIN@LISTSERV.UA.EDU Subject: [EXTERNAL] Re: VBS file read in windows - end of record issue On Tue, May 16, 2023 at 04:14:07AM +, Prashant Joshi wrote: >> Did you specify binary mode on the python open call? -- > Yes. And I can read the data. How are y

Re: VBS file read in windows - end of record issue

2023-05-16 Thread Prashant Joshi
n Sent: Tuesday, May 16, 2023 11:52 AM To: IBM-MAIN@LISTSERV.UA.EDU Subject: [EXTERNAL] Re: VBS file read in windows - end of record issue On Tue, 16 May 2023 04:45:32 +, Prashant Joshi wrote: >... If it completely ignores 0D0A and treat entire file as single > record, >

Re: VBS file read in windows - end of record issue

2023-05-16 Thread Michael Stein
On Tue, May 16, 2023 at 04:14:07AM +, Prashant Joshi wrote: >> Did you specify binary mode on the python open call? -- > Yes. And I can read the data. How are you reading the data. Assuming an open like: myfile = open("filename", "rb") You need to either read it all into memory:

Re: VBS file read in windows - end of record issue

2023-05-16 Thread Paul Gilmartin
On Tue, 16 May 2023 04:45:32 +, Prashant Joshi wrote: >... If it completely ignores 0D0A and treat entire file as single record, > By "ignores 0D0A" do you mean it deletes them, or treats them as ordinary characters? >I... My problem is, it adds random line break and so when I

Re: VBS file read in windows - end of record issue

2023-05-15 Thread Prashant Joshi
are in range of 150 to 250 length. Thanks, Prashant -Original Message- From: IBM Mainframe Discussion List On Behalf Of Charles Mills Sent: Tuesday, May 16, 2023 5:33 AM To: IBM-MAIN@LISTSERV.UA.EDU Subject: [EXTERNAL] Re: VBS file read in windows - end of record issue There are so

Re: VBS file read in windows - end of record issue

2023-05-15 Thread Prashant Joshi
---Original Message- From: IBM Mainframe Discussion List On Behalf Of Michael Oujesky Sent: Tuesday, May 16, 2023 4:54 AM To: IBM-MAIN@LISTSERV.UA.EDU Subject: [EXTERNAL] Re: VBS file read in windows - end of record issue Depend on what you need to do and there at least two levels to be

Re: VBS file read in windows - end of record issue

2023-05-15 Thread Prashant Joshi
, May 16, 2023 1:38 AM To: IBM-MAIN@LISTSERV.UA.EDU Subject: [EXTERNAL] Re: VBS file read in windows - end of record issue On Mon, 15 May 2023 18:54:40 +, Prashant Joshi wrote: >... >For some files, when I transfer using IND$FILE (option 6) using Binary and >CRLF option checke

Re: VBS file read in windows - end of record issue

2023-05-15 Thread Prashant Joshi
random record length (multiple records/half records combined) Thanks, Prashant -Original Message- From: IBM Mainframe Discussion List 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

Re: VBS file read in windows - end of record issue

2023-05-15 Thread Charles Mills
There are so many layers of issues here ... If the data is "binary" (any or nearly any byte value is possible) then no approach that involves CRLF is going to work. Period. Software does not have a way to distinguish between a 0D0A that signifies the end of a record versus a 0D0A that just

Re: VBS file read in windows - end of record issue

2023-05-15 Thread Michael Oujesky
Depend on what you need to do and there at least two levels to be addressed: * How variable length records appear on Windows * How to deal with SDW (spanned long record segments If you want both BDW and RDW/SDW present on Windows at least two approaches: * TERSE the file, binary

Re: VBS file read in windows - end of record issue

2023-05-15 Thread Paul Gilmartin
On Mon, 15 May 2023 18:54:40 +, 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.

Re: VBS file read in windows - end of record issue

2023-05-15 Thread Michael Stein
On Mon, May 15, 2023 at 06:54:40PM +, 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

VBS file read in windows - end of record issue

2023-05-15 Thread Prashant Joshi
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. For some files, when I