SPSS Production Facility job fails with file-not-found when using relative paths
0 reputation · 19 Sept 2020, 13:53 UTC
0 reputation · 19 Sept 2020, 13:53 UTC
When migrating SPSS syntax from local desktop mode to a Production Facility job that runs against a Statistics Server, the same relative file references in GET, SAVE, or OMS commands may succeed locally but fail with file‑not‑found or permission errors in production. The goal is to understand how the server determines the working directory for these jobs and what factors influence path resolution when no explicit CD command is used.
What is the effective working directory for a Production Facility job when no explicit CD command is issued? How does the Production Facility service account’s environment affect the interpretation of relative paths in SPSS commands? Are there configurable options to align the server‑side working directory with the client submission directory?
35275 reputation · 19 Sept 2020, 20:42 UTC
When no explicit CD command runs, SPSS Statistics Server resolves relative paths in GET, SAVE, and OMS against the server process working directory, not the directory where the syntax file sits on the client. In a Production Facility job that process usually starts under the service account, so the effective directory is typically the service account home folder or the directory configured as the service startup/working directory. That is a likely explanation based on standard server behavior; the exact default depends on your SPSS version and operating system and should be treated as unverified until you check the job definition.
The service account’s environment determines both the starting directory and whether the resolved path can be read or written. If the account cannot traverse a parent folder, the server may report file-not-found even when the file exists, because access denial can surface as a missing-file error. Client environment variables, mapped drives, and the submitting user’s profile are not inherited by the server process.
Production Facility job definitions may expose a working-directory or startup-directory setting. If present, setting it to the client submission directory—or a shared directory containing the data files—aligns server-side resolution with the client. Changing that setting can affect every job that uses the same service account and may require a service restart, so test it in non-production first. The most reliable syntax-level fix is to avoid relative paths in production jobs.
GET FILE='C:/production/data/sales.sav'.CD command at the top of the job: CD 'C:/production/data'. Then verify subsequent GET, SAVE, and OMS references resolve relative to that folder.Does the Production Facility job definition specify an explicit working directory? If yes, use that directory as the base for relative paths or change the setting; if no, rely on absolute paths or CD because the default is the service account startup directory.
Assumption: this answer assumes SPSS Statistics Server executing Production Facility jobs as a service account. Exact defaults vary by version and platform; verify against your installation before changing service configuration.
Use comments to ask for clarification. Post a solution as an answer.
No question comments on this page.