← All utilities

NSSort

Version 26.1 (build 295) 30-day trial
Contents

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 /COPY plus 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)

ParameterDescriptionRequired
/INFILE fileInput file; must exist and be readableYes
/OUTFILE fileOutput file (created/truncated); when omitted or -, records go to stdout and compose with pipesNo
/COPYStreaming copy (record = line in P0) honouring /SKIPRECORD and /STOPAFTERYes (or a future operation)
/ENDOptional terminator (end of arguments)No

Windowing, statistics and control (P0, implemented)

ParameterDescriptionRequired
/SKIPRECORD nSkip the first n input recordsNo
/STOPAFTER nProcess at most n output records (demo builds additionally cap at 50)No
/STATISTICS (alias /STATS)Print read/written/skipped counts plus elapsed time to stderrNo
/SILENTSuppress banner, spinner and statistics (exit codes unchanged)No
/NOEXECUTEValidate the option set (including license) and exit 0 without touching dataNo

Informational and license

ParameterDescriptionRequired
-versionShow version, build, date and platformNo
-license fileSigned Ed25519 license file pathNo
-license-statusShow license status and exitNo
-helpShow usageNo

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:

CodeMeaning
0Completed successfully (also -version, -license-status, -help, valid /NOEXECUTE)
1Out-of-sequence record with /CHECKSEQUENCE (phase P2, not yet implemented)
100Completed with warnings, output possibly incomplete (future phases)
111Terminated 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.

Also available in: es