best production method? server statisticsb python

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

best production method? server statisticsb python

ChetMeinzer
I'm in search of the best way to run sequences of spss files.  a.sps, b.sps c.sps
if a.sps fails, I do not want to run b.sps or c.sps.

I need to log that a.sps failed.  I have a checker to look for 'warning saved as a different name' to stop it there too.

1. What is the best/fastest (more cores) way to run sequence of .sps fiels in production (with server edition as an option and strongly prefer most pythonic method)?  
2. What is the best method to retrieve output from the answer to above method?



for the best production method...
Should I use statisticsb?

I'm able to run statisticsb, but it doesn't work with my current method of using a custom python syntax parser.  For example, currently, I'm using

-task manager (to trigger the .bat
-.bat calls the spj
-.spj calls the syntax
-.sps calls python (which needs a list of filenames)

within the sps file, i have something like

begin program.
AlertDays=4
Files=['//covenas/decisionsupport/meinzer/Production/dashboarddatasets/CSOC_Consecutive_High_Level_Svcs.sps',
'//covenas/decisionsupport/meinzer/Production/push/CSOC_Consecutive_High_Level_Svcspush.sps',
'//covenas/decisionsupport/meinzer/Production/pushproduction/CSOC_Consecutive_High_Level_SvcspushP.sps']
end program.
insert file='//covenas/decisionsupport/meinzer/production/ps/errorTestPickles.sps'.

where i have a list of the files i want to run (apart of a sequence where a failure should keep the next file from running).

the insert file is a python syntax parser that logs errors and sends information to various tables for error reports.  
see it here https://github.com/chetstar/Python-SPSS-AlamedaCounty/blob/master/errortestPickles.sps




So, when i run
C:\Program Files\IBM\SPSS\StatisticsServer\22>statisticsb -f "\\covenas\decision
support\meinzer\production\dashboarddatasets\test.sps" -type text -out \\covenas
\decisionsupport\temp\testX.txt

I get

>Error # 1 on line 21.  Command name: AlertDays
>The first word in the line is not recognized as an SPSS Statistics command.
>No further commands will be executed.  Error scan continues.

my custom python error tester uses
output export
to get output.  is that the best method for production?


Thank you!