PxPlus User Forum

Main Board => Discussions => Language => Topic started by: michaelgreer on October 25, 2021, 10:50:18 AM

Title: Large records in file
Post by: michaelgreer on October 25, 2021, 10:50:18 AM
I am trying to create a file with record size >32K. I am using this:
keyed "myfile",[1:1:16:"+"],0,-50000,opt="X"
This throws an error 41.  What am I mssing?
Title: Re: Large records in file
Post by: Mike King on October 25, 2021, 12:57:26 PM
Set the record size to -30000 and use the OPT="X" (as you have specified).

The -30000 indicates that internally the system will split the records into 30000 byte chunks each linked together due to the OPT="X".
Title: Re: Large records in file
Post by: michaelgreer on October 26, 2021, 04:48:28 PM
Thanks Mike. Not sure I would ever have figure *that* out.  :P  Now, I just did keyed "myfile",[1:1:16:"+"],0,-30000,opt="X".  I dimmed a$(35000).  When I write to a channel with myfile opened - write(lfo)*,a$  - I get an error 1.
Title: Re: Large records in file
Post by: Mike King on October 26, 2021, 05:09:18 PM
What version PxPlus are you using?  I just tried this here and it worked on all supported release (PxPlus 2018 v15 -> PxPlus 2021 v18).

PxPlus-2018 Web (Ver:15.10/MS-WINDOWS) Serno:1510-001-xxxxxxx
(c) Copyright 2005-2018 PVX Plus Technologies Ltd. (All rights reserved)
  Website: http://www.pvxplus.com
->keyed "myfile",[1:1:16:"+"],0,-30000,opt="X"
->dim a$(35000)
->open (1) "myfile"
->write (1) *,a$
->


Title: Re: Large records in file
Post by: michaelgreer on October 26, 2021, 05:32:17 PM
Well now, that may be the issue. I am on 10.20. Not supported there?
Title: Re: Large records in file
Post by: Mike King on October 26, 2021, 05:36:58 PM
The combination of Extended record size and auto-increment (the "+" in the key definition) is not available on that version.
Title: Re: Large records in file
Post by: michaelgreer on October 27, 2021, 03:00:52 PM
If I nix the autoincrement can I get the extended record size?
Title: Re: Large records in file
Post by: Mike King on October 27, 2021, 05:21:58 PM
That should allow it to work although we would STRONGLY recommend you use a newer version of PxPlus as version 10.20 is over 9 years old and there have been many changes, fixes and enhancement since that time.
Title: Re: Large records in file
Post by: michaelgreer on November 01, 2021, 03:31:23 PM
I have successfully created this file. Now, when inserting large records via ODBC (v 5.10.0002)a 3rd party is running into this error:

 “<eb1>Expected lexical element not found: <identifier>
State: 37000; Native: 1015; Origin: [PxPlus][ODBC Driver]</eb1>”. 

Is this a limitation of the ODBC in play here?
Title: Re: Large records in file
Post by: Mike King on November 01, 2021, 09:08:26 PM
Why are you using version 5.10 of the ODBC?
It from 2012 and has not been supported for a number of years.

The current ODBC driver is version 7.
Title: Re: Large records in file
Post by: michaelgreer on November 02, 2021, 10:33:25 AM
No particular reason other than it has been in place all these years.