Skip to main content

Chapter 6

SCL Automation

SCL is SCCalc's command language for repeatable statistical workflows. It is designed to make common analysis steps scriptable, reviewable, and easier to rerun after data changes.

SCL Automation

What SCL Is

SCL is SCCalc’s command language for repeatable statistical workflows. It is designed to make common analysis steps scriptable, reviewable, and easier to rerun after data changes.

Use guided dialogs to discover the right setup. Use SCL when the setup becomes part of a workflow that should be repeated, reviewed, taught, or archived.

When To Use SCL

Use SCL when:

  • The same analysis must be run on multiple datasets.
  • You need a reproducible record of import, transformation, and analysis steps.
  • A workflow is too repetitive for manual dialog configuration.
  • You want to share a compact analysis recipe with collaborators.
  • You need to rerun a project after a new data extract arrives.
  • You want exported reports to follow a predictable naming pattern.

SCL IDE

Use SCL -> Open SCL IDE to open the scripting workspace. The SCL menu also lets you create, open, save, run, and stop scripts; run a selected block; show the command palette; insert snippets; and open SCL keyboard shortcuts.

Useful commands while editing:

  • SCL -> Run Script runs the active script.
  • SCL -> Run Selection runs selected commands.
  • SCL -> Stop stops the current execution when available.
  • SCL -> Command Palette helps find commands.
  • SCL -> Insert Snippet opens reusable examples.
  • Help -> SCL Quick Reference opens syntax help.
  • Help -> Command Reference opens the online command and analysis reference when network access is available.

Typical Script Flow

An SCL workflow usually follows this shape:

  1. Import or reference a dataset.
  2. Define variables, filters, transformations, labels, or scales.
  3. Run one or more analysis commands.
  4. Export results in a stable format such as PDF, HTML, Markdown, CSV, or JSON.
  5. Save the script with the project or in version control if the workflow needs review.

Example outline:

* Import data or open an existing project.
* Review and prepare variables.
* Run the planned analysis.
* Export a report and verification output.

Use the exact syntax shown by the SCL Quick Reference and Command Reference for real scripts. This manual describes workflow shape rather than full command grammar.

Good Script Practices

  • Keep one logical workflow per script.
  • Use descriptive file names and comments.
  • Prefer explicit variable names over positional assumptions.
  • Keep import paths and export paths easy to review.
  • Save exported outputs with dates or project identifiers when appropriate.
  • Re-run scripts after data edits to verify reproducibility.
  • Keep a short note explaining the dataset, purpose, and expected outputs.
  • Use sample or synthetic data when sharing a script for support.

Sharing Scripts Safely

SCL scripts can reveal more than commands. They may include private file paths, dataset names, variable labels, comments, filters, embedded values, export locations, organization names, or research context.

Before sharing a script:

  1. Replace sensitive paths with neutral placeholders.
  2. Remove secrets, passwords, tokens, and private comments.
  3. Rename confidential variables and labels.
  4. Use sample or synthetic data.
  5. Test the sanitized version before sending it.

Do not send a script that references confidential files unless the recipient is authorized to know those paths and contents.

Automation And Results

When SCL is used for reporting, include verification steps in the workflow where possible. A reproducible analysis should be able to answer four questions:

  • Which data was used?
  • Which transformations and options were applied?
  • Which outputs were produced?
  • Were warnings or verification messages reviewed?

Keep exported reports and scripts together when archiving a project. If a result changes after rerunning the script, compare data changes, option changes, and warnings before interpreting the difference.