Thanks for the information. No, we run on Windows which I think is OK for Python. I will get one of our .NET developers to take a look.
- Rob Donovan likes this
Jump to content
Posted by Richard Bassett on 13 April 2018 - 02:26 PM
To add 0.02:
C-ISAM certainly is more dependable. Using Pro-ISAM only for ProIV's own bootstrap files is a rational objective. And you might be able to exploit the more-well-known nature of C-ISAM to get SQL access direct to your data, if indeed you're not doing that already. (Although I'm not sure if there are 'free' solutions out there for that)
ProIV actually had support for C-ISAM with variable length records (external file type CISAMV), however, in C-ISAM that worked by putting data into the index (.idx) and so compromised the reliability/recoverability. In any case I think that support might have been a specially licenced option.
It's been a long time since I looked at this stuff but I am mildly concerned about your choice of C-FLT as a data type, expecially for financial data.
C-FLT directly represents the C programming 'float' type, which is a 'low' precision binary floating point type.
Because it's a binary floating point type it doesn't accurately represent decimal fractions (e.g. cents)
The maximum precision is likely to be 9 decimal digits total (maybe OK, but wouldn't be in banking etc.)
The storage representation will be machine-specific, whereas C-ISAM can store data independently of chip architectures.
For these reasons, I think C-ISAM has always suggested/recommended using the DECIMAL (C-DEC) type and, personally, I would recommend that too.
PS. I noticed something seems slightly wrong with some links on your own main www page - stuff is linked to localhost:10080 ?
Posted by Ross Bevin on 15 April 2016 - 06:06 PM
It's quite simple. This is what I would do for each file.
1. Copy the ProISAM ProIV filedef to a file with say a small 's' appended to the name. E.g. GL_MSTR to GL_MSTRs.
2. In the file definition header change GL_MSTRs to file type SQLSERVE. Set the physical name as GL_MSTR. You will also have to go into the storage tab and set the Ext Type, format and alternate name for each field. Alpha fields are ALPHA and numeric fields are NUMBER. For NUMBER the format is <total field length including precision>.<precision>. If the number can be a negative append the format with an "S". E.g. S8.2 (can store a max of 999999.99-)
3. In the file definition window use the SQL icons to create and save the script to a text file for GL_MSTRs.
4. In SQL Server Management Studio open the script previously created and execute it in the right database to create the table.
5. Create an update function that reads all of GL_MSTR in look mode and adds to GL_MSTRs in add mode.
6. Delete file definition GL_MSTR.
7. Rename file definition GL_MSTRs as GL_MSTR.
8. Regen functions that use GL_MSTR.
You will need to update your c:\windows\pro4v8.ini file with the appropriate SQL database settings. You will also need to create an ODBC driver on the server that has the ProIV kernel; it needs to point to the SQL Server database.
When I did this for our system in 2003 I automated the process by writing a series of functions that used the filedef bootstrap files to create one SQL table creation script file. I also wrote a function that automated the file renaming. If your system is large you may want to consider this route.
A word of caution with moving to SQL Server. Depending on how your system is written/structured you may encounter a lot of table locking. This is especially true for control files where you say get the next available invoice number. In ProISAM you can have a logical update that gets and increments the number. After the record is written it is unlocked and other sessions can read and update it. This is not true for SQL tables. Typically you will have to either exit the function to commit the records or execute a commit command in logic. Executing the commit command can have unwanted consequences with other tables you are processing. Because of this we continue to maintain our control files in ProISAM.
Hope this helps!
Posted by kapoof on 05 January 2016 - 08:57 AM
Posted by Neil Mellis on 20 January 2014 - 02:10 AM
No real gotchas with Postgresql. I did get caught out when moving from 8.1 to 9.2 and experienced initial cache building on my whole inventory. which turned out to be a bad index that behaved differently between versions.
When creating/converting tables I don't use the script creator within Proiv as this is a bit loose I just define it properly in pgAdmin.
I chose to use Postgresql to reduce cost of deployment on smaller user systems and provide a cross platform compatibility for Linux and Windows. The use of a ISO SQL also means that an up scale to Oracle is pretty straight forward.
I also chose to hybrid my data between pro-isam and the database. Most new stuff is mainly DB and designed to take advantage of it. Legacy only gets migrated when I need it - usually for more efficient retrieval or during larger changes.
Posted by Neil Mellis on 16 January 2014 - 12:43 AM
Don't forget that proiv lock logic doesn't work with postgresql so any lock will result in a spinning session until the lock owner releases. NG were going to look into handling this but no news yet.
I ended up having to use a pro-isam lock file where I really need critical tables to be managed properly.
Doing this also has the advantage that you only have to 'B' mode the pro-isam file with the keys and the lock logic gives you an opportunity for the user to respond to the lock or a timed/count retry prior to any table access. The pro-isam file can double as an audit as Neil B has suggested.
By using this method iscollect will clean up the pro-isam lock on a session failure no need for user/admin lock screens etc.
Posted by Ross Bevin on 07 February 2013 - 01:41 PM
Posted by Lewis Mccabe on 14 April 2011 - 04:46 AM