VB/SaxBasic: SPSS sometimes won't fire up

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

VB/SaxBasic: SPSS sometimes won't fire up

Albert-Jan Roskam
Hi,
 
In a VB6-application (VB SP5) we make use of the following three SPSS-20 libraries
Reference=*\G{03BA2079-7D90-432A-8160-5764DFE85BF4}#1.0#0#C:\Program Files\Common Files\IBM\SPSS\COM\spsswin.dll#SPSS Statistcs Type Library
Reference=*\G{7ABA5FEE-0D61-42C9-B5D0-8492FD2E938C}#7.3#0#C:\PROGRA~1\COMMON~1\IBM\SPSS\COM\spsswin.tlb#SPSS Statistics Legacy Type Library
Reference=*\G{F3FE4BD5-F72D-4C25-910D-7C22CB17A64F}#7.4#0#C:\PROGRA~1\COMMON~1\IBM\SPSS\COM\spsspvt.tlb#SPSS Statistics Legacy Pivot Table Type Library
 
In the application we define the following variables:
Private mSPSSApp As spsswinLib.Application16
Private mSPSSDataDoc As ISpssDataDoc
 
We have defined the following procedure (sub) for initializing SPSS.
Private Sub InitSPSS()
   Dim oSPSSOptions As ISpssOptions
   Set moFS = New FileSystemObject
   Set moSyntaxFile = moFS.CreateTextFile(moTools.Get_TempDir & "\SPSSSyntax.sps", True)
  
   Set mSPSSApp = CreateObject("SPSS.Application16")
   mSPSSApp.Alerts = False
   Set oSPSSOptions = mSPSSApp.Options
  
   mOldDisplayCommands = oSPSSOptions.DisplayCommands
   oSPSSOptions.DisplayCommands = False
   Set mSPSSDataDoc = mSPSSApp.NewDataDoc
   mSPSSDataDoc.Visible = True
End Sub
 
The following problem occurs sometimes, but not always. So far it only occurs multiple times on a specific date. It was fairly busy that day, in terms of network traffic. Problem: After we start the application the application should open SPSS and shows a data documents-window. However, the data documents-window does not appear and we think that the application does not proceed after the statement
 
Set mSPSSApp = CreateObject(“SPSS.Application16”)

Are you familiar with this situation? Is there an explanation for this behaviour?
 
Thank you in advance!
 
Regards,
Albert-Jan


~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
All right, but apart from the sanitation, the medicine, education, wine, public order, irrigation, roads, a
fresh water system, and public health, what have the Romans ever done for us?
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 
Reply | Threaded
Open this post in threaded view
|

Re: VB/SaxBasic: SPSS sometimes won't fire up

David Marso
Administrator
Hi Albert-Jan,
  I fired up my little antiquity (VB6-(SP6) ) and ran your code.
(TAFKA)SPSS -ver 21- did show up (after a rather long delay).
One thing to try:fire up Windows Task Manager and look for an SPSS process (Image name Stats.exe) running.  When I spied on it the process showed up VERY SOON after hitting the CreateObject.
It also takes another tiny bump on the NewDataDoc method call.
Not sure why you have SAXBasic in your subject line.
I ran from the VB IDE.
Those some times it works/some times it doesn't situations are a PITA!

Albert-Jan Roskam wrote
Hi,
 
In a VB6-application (VB SP5) we make use of the following three SPSS-20 libraries
Reference=*\G{03BA2079-7D90-432A-8160-5764DFE85BF4}#1.0#0#C:\Program Files\Common Files\IBM\SPSS\COM\spsswin.dll#SPSS Statistcs Type Library
Reference=*\G{7ABA5FEE-0D61-42C9-B5D0-8492FD2E938C}#7.3#0#C:\PROGRA~1\COMMON~1\IBM\SPSS\COM\spsswin.tlb#SPSS Statistics Legacy Type Library
Reference=*\G{F3FE4BD5-F72D-4C25-910D-7C22CB17A64F}#7.4#0#C:\PROGRA~1\COMMON~1\IBM\SPSS\COM\spsspvt.tlb#SPSS Statistics Legacy Pivot Table Type Library

 
In the application we define the following variables:
Private mSPSSApp As spsswinLib.Application16
Private mSPSSDataDoc As ISpssDataDoc
 
We have defined the following procedure (sub) for initializing SPSS.

Private Sub InitSPSS()
   Dim oSPSSOptions As ISpssOptions
   Set moFS = New FileSystemObject
   Set moSyntaxFile = moFS.CreateTextFile(moTools.Get_TempDir & "\SPSSSyntax.sps", True)
  
   Set mSPSSApp = CreateObject("SPSS.Application16")
   mSPSSApp.Alerts = False
   Set oSPSSOptions = mSPSSApp.Options
  
   mOldDisplayCommands = oSPSSOptions.DisplayCommands
   oSPSSOptions.DisplayCommands = False
   Set mSPSSDataDoc = mSPSSApp.NewDataDoc
   mSPSSDataDoc.Visible = True
End Sub
 
The following problem occurs sometimes, but not always. So far it only occurs multiple times on a specific date. It was fairly busy that day, in terms of network traffic. Problem: After we start the application the application should open SPSS and shows a data documents-window. However, the data documents-window does not appear and we think that the application does not proceed after the statement
 
Set mSPSSApp = CreateObject(“SPSS.Application16”)

Are you familiar with this situation? Is there an explanation for this behaviour?


Thank you in advance!

Regards,
Albert-Jan


~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
All right, but apart from the sanitation, the medicine, education, wine, public order, irrigation, roads, a
fresh water system, and public health, what have the Romans ever done for us?
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 
Please reply to the list and not to my personal email.
Those desiring my consulting or training services please feel free to email me.
---
"Nolite dare sanctum canibus neque mittatis margaritas vestras ante porcos ne forte conculcent eas pedibus suis."
Cum es damnatorum possederunt porcos iens ut salire off sanguinum cliff in abyssum?"
Reply | Threaded
Open this post in threaded view
|

Re: VB/SaxBasic: SPSS sometimes won't fire up

Albert-Jan Roskam
---- Original Message -----

> From: David Marso <[hidden email]>
> To: [hidden email]
> Cc:
> Sent: Wednesday, May 8, 2013 2:46 PM
> Subject: Re: [SPSSX-L] VB/SaxBasic: SPSS sometimes won't fire up
>
> Hi Albert-Jan,
>   I fired up my little antiquity (VB6-(SP6) ) and ran your code.
> (TAFKA)SPSS -ver 21- did show up (after a rather long delay).
> One thing to try:fire up Windows Task Manager and look for an SPSS process
> (Image name Stats.exe) running.  When I spied on it the process showed up
> VERY SOON after hitting the CreateObject.
> It also takes another tiny bump on the NewDataDoc method call.

Hi David,

Thanks! Yes, I believe stats.exe (frontend) appears quite soon, followed by spssengine.exe (backend). This problem sucks, because we have not been able to reproduce it! :-( It happened a number of times at a moment that I was not in the office and we do not have logs or something like that to figure out/pinpoint what was going on. Hypothesis: it was a rather busy day. Maybe heavy network traffic prevented a timely response from the license server, so it timed out and caused the "error" (quoted, because the program gave no error, it just stopped!). In any case: Weird. I do not even know how rare this error is!

Regards,
Albert-Jan

=====================
To manage your subscription to SPSSX-L, send a message to
[hidden email] (not to SPSSX-L), with no body text except the
command. To leave the list, send the command
SIGNOFF SPSSX-L
For a list of commands to manage subscriptions, send the command
INFO REFCARD
Reply | Threaded
Open this post in threaded view
|

Re: VB/SaxBasic: SPSS sometimes won't fire up

David Marso
Administrator
Albert-Jan,
I am curious:  Why are you using VB6?
David
--
Albert-Jan Roskam wrote
---- Original Message -----

> From: David Marso <[hidden email]>
> To: [hidden email]
> Cc:
> Sent: Wednesday, May 8, 2013 2:46 PM
> Subject: Re: [SPSSX-L] VB/SaxBasic: SPSS sometimes won't fire up
>
> Hi Albert-Jan,
>   I fired up my little antiquity (VB6-(SP6) ) and ran your code.
> (TAFKA)SPSS -ver 21- did show up (after a rather long delay).
> One thing to try:fire up Windows Task Manager and look for an SPSS process
> (Image name Stats.exe) running.  When I spied on it the process showed up
> VERY SOON after hitting the CreateObject.
> It also takes another tiny bump on the NewDataDoc method call.

Hi David,

Thanks! Yes, I believe stats.exe (frontend) appears quite soon, followed by spssengine.exe (backend). This problem sucks, because we have not been able to reproduce it! :-( It happened a number of times at a moment that I was not in the office and we do not have logs or something like that to figure out/pinpoint what was going on. Hypothesis: it was a rather busy day. Maybe heavy network traffic prevented a timely response from the license server, so it timed out and caused the "error" (quoted, because the program gave no error, it just stopped!). In any case: Weird. I do not even know how rare this error is!

Regards,
Albert-Jan

=====================
To manage your subscription to SPSSX-L, send a message to
[hidden email] (not to SPSSX-L), with no body text except the
command. To leave the list, send the command
SIGNOFF SPSSX-L
For a list of commands to manage subscriptions, send the command
INFO REFCARD
Please reply to the list and not to my personal email.
Those desiring my consulting or training services please feel free to email me.
---
"Nolite dare sanctum canibus neque mittatis margaritas vestras ante porcos ne forte conculcent eas pedibus suis."
Cum es damnatorum possederunt porcos iens ut salire off sanguinum cliff in abyssum?"