SPSS Statistics

 View Only
  • 1.  Python viewer options and SET equivalences

    Posted Wed June 22, 2022 07:17 AM
    Hi,

    I'm writing a script to customize viewer elements visibility before running tabular report syntax. Python has many options to set visibility but I'm wondering how many of this elements can be turned on/off via SET syntax (or other commands)? Important: I'm aware of OUTPUT MODIFY command but it cleans output after running syntax while I'm looking for something to run before making output.

    So (SpssClient.PreferenceOptions....):
    • DisplayCommandsLog - SET PRINTBACK ON/OFF
    • LogContents - no option in SET
    • WarningsContents - no option in SET
    • NotesContents - no option in SET
    • TitleContents, PageTitleContents  - no option in SET (what about SET HEADER ON/OFF?)
    • PivotTableContents - no option in SET
    • ChartContents - no option in SET
    • TextOutputContents - SET ERRORS ON/OFF MESSAGES ON/OFF RESULTS ON/OFF? (however, when TextOutputContents are set to 'hidden' such command as REPORT still produces visible output - why?)
    • TreeModelContents - no option in SET.

    Is this list correct?

    ------------------------------
    Konrad Gałuszko
    ------------------------------

    #SPSSStatistics


  • 2.  RE: Python viewer options and SET equivalences

    IBM Champion
    Posted Wed June 22, 2022 08:48 AM
    In some cases there might be procedure-specific controls, but the alternative to SET would be to use an autoscript that would be triggered by the creation of the corresponding object.

    When an item is controlled by a Registry setting, typically there is no syntax for it, because the backend process does not necessarily have access to the Registry settings on the client.  Frontend and backend might be running on different computers.

    --





  • 3.  RE: Python viewer options and SET equivalences

    Posted Thu June 23, 2022 07:02 AM
    Hi Jon, thanks (as always). Still, do you confirm that the only SET alternative is PRINTBACK for DisplayCommandsLog? What about other alternatives mentioned - are they correct?

    ------------------------------
    Konrad Gałuszko
    ------------------------------



  • 4.  RE: Python viewer options and SET equivalences

    IBM Champion
    Posted Thu June 23, 2022 08:28 AM
    The full list of SET options is what appears in the CSR.  You could, though, create an extension command to control other preferences.  That, or an equivalent script, however, would not work in distributed mode with SPSS Server, which is why there is no built-in syntax for the missing options.  If you have a standard collection of settings that you want to always be used, you could create a startup script to establish them.