What NSSort is
nssort is Nacarsoft’s SyncSort-compatible file sort/merge/copy utility: a drop-in replacement for SyncSort UNIX file jobs using the same /OPTION syntax (/INFILE, /OUTFILE, /COPY, /FIELDS, /KEYS, /MERGE, /JOIN…). It only processes local files and stdin/stdout — no Adabas client required, no DB2, SAS or COBOL-verb integration — and accepts unambiguous abbreviations (e.g. /INF for /INFILE) plus = or : value forms.
- Replace SyncSort copy steps in ETL and migration pipelines.
- Copy record windows (
/SKIPRECORD,/STOPAFTER) with bounded memory. - Validate option sets without executing (
/NOEXECUTE).
Current version P0 implements
/COPYplus record windowing and statistics. All other SyncSort options belong to the roadmap (see Honest scope). File names and paths in the examples are fictitious.
Use cases
1. Replace a SyncSort copy step in an ETL pipeline
nssort /INFILE /data/etl/fictitious-input.dat /OUTFILE /data/etl/fictitious-output.dat /COPY /END
2. Extract a record window for testing (skip 100, take 1000)
nssort /INFILE /data/fictitious-large.dat /OUTFILE /data/fictitious-sample.dat /COPY /SKIPRECORD 100 /STOPAFTER 1000
3. Copy to stdout with statistics to compose with pipes
nssort /INFILE /data/fictitious-input.dat /COPY /STATISTICS > /data/fictitious-copy.dat
4. Validate a migrated JCL without touching data before rollout
nssort /INFILE /data/fictitious-input.dat /OUTFILE /data/fictitious-output.dat /COPY /NOEXECUTE
Command reference
Verified against ./nssort/build/nssort_rhel8 --help (plus -help, -version and -license-status, confirmed by running the binary). Both SyncSort style (/INFILE x) and nssuite dash style (-infile x, see INSTALL.md) are accepted, with unambiguous abbreviations (/INF, /STAT… → /STATISTICS unless ambiguous) and /OPT=value or /OPT:value forms.
Operation and files (P0, implemented)
| Parameter | Description | Required |
|---|---|---|
/INFILE file | Input file; must exist and be readable | Yes |
/OUTFILE file | Output file (created/truncated); when omitted or -, records go to stdout and compose with pipes | No |
/COPY | Streaming copy (record = line in P0) honouring /SKIPRECORD and /STOPAFTER | Yes (or a future operation) |
/END | Optional terminator (end of arguments) | No |
Windowing, statistics and control (P0, implemented)
| Parameter | Description | Required |
|---|---|---|
/SKIPRECORD n | Skip the first n input records | No |
/STOPAFTER n | Process at most n output records (demo builds additionally cap at 50) | No |
/STATISTICS (alias /STATS) | Print read/written/skipped counts plus elapsed time to stderr | No |
/SILENT | Suppress banner, spinner and statistics (exit codes unchanged) | No |
/NOEXECUTE | Validate the option set (including license) and exit 0 without touching data | No |
Informational and license
| Parameter | Description | Required |
|---|---|---|
-version | Show version, build, date and platform | No |
-license file | Signed Ed25519 license file path | No |
-license-status | Show license status and exit | No |
-help | Show usage | No |
Honest scope: roadmap, not implemented in P0
The following keywords parse syntactically (abbreviations included) but exit with a “not yet implemented” error naming their phase, per doc/COMPATIBILITY.md — they are not usable yet: /FIELDS, /KEYS (P2), /MERGE, /JOIN, /JOINKEYS (P4), /REFORMAT, /DERIVEDFIELD, /INCLUDE, /OMIT, /CONDITION, /SUMMARIZE, /AGGREGATE, /COLLECT, /IGNORE, /SKIPBLANK (P3), /STABLE, /CHECKSEQUENCE, /PADBYTE, /PADKEY, /PADRECORD, /RECORDLAYOUT, /DELIMITEDRECORDLAYOUT, /WORKSPACE, /MEMORY, /DATASIZE (P2), /COLLATINGSEQUENCE, /COLUMNS, /REPORT, /SECTION…, /TITLE, /TRAILER (P4), /SAVE, /INSERT, /DELETE, /DISPLAY, /EDIT, /BEGIN, /QUIT (P1). Out of scope: Micro Focus COBOL verbs, SAS procedure, DB2 Load Accelerator.
Commented examples
# 1. Basic copy with terminator (abbreviations like /INF and /OUTF also work)
nssort /INFILE /data/fictitious-input.dat /OUTFILE /data/fictitious-copy.dat /COPY /END
# 2. To stdout with statistics on stderr (handy in pipes)
nssort /INFILE /data/fictitious-input.dat /COPY /STATISTICS > /data/fictitious-copy.dat
# 3. Window: skip 100 records and process at most 1000
nssort /INFILE /data/fictitious-large.dat /OUTFILE /data/fictitious-sample.dat /COPY /SKIPRECORD 100 /STOPAFTER 1000
# 4. Only validate options and license, execute nothing
nssort /INFILE /data/fictitious-input.dat /OUTFILE /data/fictitious-copy.dat /COPY /NOEXECUTE
# 5. nssuite dash style (equivalent to example 1)
nssort -infile /data/fictitious-input.dat -outfile /data/fictitious-copy.dat -copy
# 6. Silent for cron (same exit code, no banner or spinner)
nssort /INFILE /data/fictitious-input.dat /OUTFILE /data/fictitious-copy.dat /COPY /SILENT
Return codes
Per the SyncSort Reference Guide (Ch. 2.1), as documented in the manual:
| Code | Meaning |
|---|---|
0 | Completed successfully (also -version, -license-status, -help, valid /NOEXECUTE) |
1 | Out-of-sequence record with /CHECKSEQUENCE (phase P2, not yet implemented) |
100 | Completed with warnings, output possibly incomplete (future phases) |
111 | Terminated prematurely: errors, invalid license, missing /INFILE, or roadmap option |
Honest note: in P0 the binary returns 0 or 111; 1 and 100 belong to phases P2-P3.
FAQ
Can I use it without a license? Yes: there is an automatic 30-day trial; -license points to the signed one and -license-status shows the state.
Why does /FIELDS field1 fail if it appears in the usage example? The usage line shows the target SyncSort-compatible syntax; in P0 only /COPY is implemented and sort keys arrive in phase P2 (the error names the phase).
Is /OUTFILE mandatory? No: omitted or -, records go to stdout — ideal for pipes (/COPY /STATISTICS > copy.dat).
Do demo builds truncate my data? Demo variants cap output at 50 records even if /STOPAFTER asks for more; use the release build for production.