Digital Developer Conference: a FREE half-day online conference focused on AI & Cloud – North America: Nov 2 – India: Nov 9 – Europe: Nov 14 – Asia Nov 23 Register now

Close outline
  • United States
IBM?
  • Site map
IBM?
  • Marketplace

  • Close
    Search
  • Sign in
    • Sign in
    • Register
  • IBM Navigation
IBM Developer Answers
  • Spaces
    • Blockchain
    • IBM Cloud platform
    • Internet of Things
    • Predictive Analytics
    • Watson
    • See all spaces
  • Tags
  • Users
  • Badges
  • FAQ
  • Help
Close

Name

Community

  • Learn
  • Develop
  • Connect

Discover IBM

  • ConnectMarketplace
  • Products
  • Services
  • Industries
  • Careers
  • Partners
  • Support
10.190.13.195

Refine your search by using the following advanced search options.

Criteria Usage
Questions with keyword1 or keyword2 keyword1 keyword2
Questions with a mandatory word, e.g. keyword2 keyword1 +keyword2
Questions excluding a word, e.g. keyword2 keyword1 -keyword2
Questions with keyword(s) and a specific tag keyword1 [tag1]
Questions with keyword(s) and either of two or more specific tags keyword1 [tag1] [tag2]
To search for all posts by a user or all posts with a specific tag, start typing and choose from the suggestion list. Do not use a plus or minus sign with a tag, e.g., +[tag1].
  • Ask a question

New version of spssio32.dll generates huge SAV files

110000D4XK gravatar image
Question by SystemAdmin  (532) | Mar 31, 2010 at 06:40 PM spssstatisticsextensibility.net

Hi,
We recently implemented the latest version of the spssio32.dll in order to resolve the 255 character limit that was imposed on text fields in previous versions.

However, we are now noticing that the dll is generating huge files compared to the previous version. Files that were previously approx. 1MB in size are now over a 100MB is size even though the data is the same. We have some files that are now over 4GB in size!

Our initial thoughts are that the file is now allocation 32K characters for EVERY field rather than using dynamic sizing but have not been able to confirm this.

This is an urgent issue for us so any help you can provide would be very useful.

Regards

Bhavin

People who like this

  0
Comment
10 |3000 characters needed characters left characters exceeded
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster

3 answers

  • Sort: 
110000D4XK gravatar image

Answer by SystemAdmin (532) | Apr 01, 2010 at 07:02 PM

We may need more information, but you can control the width of string fields. Although the max is now 32K, you set the width in your code.

Also, if you are in Unicode mode, characters will require more bytes if they are not plain 7- bit ascii. Again, whether or not you are in Unicode mode is under your control.


I wonder also whether you have compression turned off.


Regards,

Jon Peck

Comment

People who like this

  0   Share
10 |3000 characters needed characters left characters exceeded
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
110000D4XK gravatar image

Answer by SystemAdmin (532) | Apr 01, 2010 at 09:12 PM

Thanks for the reply Jon.

We are currently setting the width but is there any way to do this dynamically via the dll?

Specifically, every string variable is different for us and rather than setting a static value for all string variables, is there a way to let the DLL decide how wide to make the column based on the data that is being passed?

We use the spssSetVarPrintFormat to set the width of the variable but I noticed that there is also a spssSetVarColumnWidth that allows a special value of 0 to be set. Should we be using this instead.

I have provided a code snippet that illustrates how we are calling the DLL below. Any advice you can provide would be useful.

Regards

Bhavin

// Create Variable int errCode = spss.spssSetVarName(handle, varName, varType); if (errCode != Spss.SPSS_OK) { throw new Exception(string.Format( "Unable to set variable name: {0}\r\nError: {1}", varName, errCode)); } // Set Variable Label errCode = spss.spssSetVarLabel(handle, varName, varLabel); if (errCode != Spss.SPSS_OK && errCode != Spss.SPSS_EXC_LEN120) { throw new Exception(string.Format( "Unable to set variable label for variable: {0}\r\nError: {1}", varName, errCode)); } errCode = spss.spssSetVarPrintFormat(handle, varName, varPrintType, varPrintDec, varPrintWidth); if (errCode != Spss.SPSS_OK) { throw new Exception(string.Format( "Unable to format variable: {0}\r\nError: {1}", varName, errCode)); } The varPrintWidth is what we are setting to public const Int32 SPSS_MAX_LONGSTRING = 32767;


Comment

People who like this

  0   Share
10 |3000 characters needed characters left characters exceeded
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
110000D4XK gravatar image

Answer by SystemAdmin (532) | Apr 01, 2010 at 09:40 PM

There is no way to set the width dynamically, because all the data would have to be passed first in order to know how wide to make the fields. You might try opening the file in Statistics after creation is complete and run ALTER TYPE a to z (AMIN). That would show you what the minimum field widths could be and how big the sav file is afterwards. TheColumnWidth parameter is not relevant here. It is just the width setting for Data Editor displays. The varType in your create code above is the only thing that could affect size.


Be sure that you have called spssSetCompression with a switch value of 1. The default is uncompressed.

Comment

People who like this

  0   Share
10 |3000 characters needed characters left characters exceeded
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster

Follow this question

43 people are following this question.

Answers

Answers & comments

Related questions

Help needed - submit a File 1 Answer

.Net example (Statistical explorer) 3 Answers

Cannot create ActiveX component 4 Answers

Functionality SPSS .Net Plugin 15.0 5 Answers

SPSS will not launch 0 Answers

  • Contact
  • Privacy
  • IBM Developer Terms of use
  • Accessibility
  • Report Abuse
  • Cookie Preferences

Powered by AnswerHub

Authentication check. Please ignore.
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • API Connect
  • Analytic Hybrid Cloud Core
  • Application Performance Management
  • Appsecdev
  • BPM
  • Blockchain
  • Business Transaction Intelligence
  • CAPI
  • CAPI SNAP
  • CICS
  • Cloud Analytics
  • Cloud Automation
  • Cloud Object Storage
  • Cloud marketplace
  • Collaboration
  • Content Services (ECM)
  • Continuous Testing
  • Courses
  • Customer Experience Analytics
  • DB2 LUW
  • Data and AI
  • DataPower
  • Decision Optimization
  • DevOps Build
  • DevOps Services
  • Developers IBM MX
  • Digital Commerce
  • Digital Experience
  • Finance
  • Global Entrepreneur Program
  • Hadoop
  • Hybrid Cloud Core
  • Hyper Protect
  • IBM Cloud platform
  • IBM Design
  • IBM Forms Experience Builder
  • IBM Maximo Developer
  • IBM StoredIQ
  • IBM StoredIQ-Cartridges
  • IIDR
  • ITOA
  • InformationServer
  • Integration Bus
  • Internet of Things
  • Kenexa
  • Linux on Power
  • LinuxONE
  • MDM
  • Mainframe
  • Messaging
  • Node.js
  • ODM
  • Open
  • PartnerWorld Developer Support
  • PowerAI
  • PowerVC
  • Predictive Analytics
  • Product Insights
  • PureData for Analytics
  • Push
  • QRadar App Development
  • Run Book Automation
  • Search Insights
  • Security Core
  • Storage
  • Storage Core
  • Streamsdev
  • Supply Chain Business Network
  • Supply Chain Insights
  • Swift
  • UBX Capture
  • Universal Behavior Exchange
  • UrbanCode
  • WASdev
  • WSRR
  • Watson
  • Watson Campaign Automation
  • Watson Content Hub
  • Watson Marketing Insights
  • dW Answers Help
  • dW Premium
  • developerWorks Sandbox
  • developerWorks Team
  • Watson Health
  • More
  • Tags
  • Questions
  • Users
  • Badges