Raincode Sort Runner


Version 4.2.490.0

1. Using Raincode Sort

Raincode Sort Runner is a utility that, amongst other things, sorts files. The utility sorts records from one or multiple files and stores them as an output file.

There are three ways through which SORT are called:

  • Directly from COBOL or PL/1. Since most of the SORT code is in a DLL, raincode runtime uses that DLL for all the SORTS called directly.

  • By RaincodeSortRunner.exe and providing a FileConfig defining the SORTIN, SORTOUT and SYSIN. SYSIN is a file where all the utility commands are provided. The input data is provided in a file SORTIN, and the output will be written to SORTOUT.

  • By writing a JCL with PGM=SORT and then defining the relevant DD (SYSIN, SORTIN, SORTOUT) and the same syntax SYSIN should contain as a command. This way also, RaincodeSortRunner.exe is called, but it’s doing so through JCL.

Help for Raincode Sort Runner can be found by executing it on the command line with no argument. It is also provided in detail in the section Raincode Sort Settings.

2. Installation of Raincode Sort Runner

Minimum System requirements for the installation of Raincode Sort Runner are:

  • .NET 4.0.0

  • Raincode Legacy Runtime (comes with Raincode Legacy Compilers or as a standalone component)

Copy the Raincode sort runner executables (Raincodesortrunner.exe) into a directory on the disk.

At this point, Sort Runner is installed, and you can navigate to the chosen directory in a command prompt and begin executing raincodesortrunner.exe on the command prompt.

3. Raincode Sort Settings

Raincode Sort supports an additional RCSET command to fine-tune your sort by setting internal constants.

The syntax is:

RCSET <OPT>=<VAL>,<OPT>=<VAL>,…

The supported options are:

Table 1. Raincode Sort supported option
Option Default Usage

CONC_THRESH

10000

Sets smaller than this will not use concurrency to speed up the sort.

MAX_REDUN

3

REDUN_SCALE_DOWN

2

SYS_SORT_THRESH

10000

Sets smaller than this will be sorted with the default system sort.

ARRAY_SORT_SIZE

4194304

4. Raincode Sort Runner command-line option

4.1. Miscellaneous

Table 2. Raincode Sort Runner command line option
Command-line option Default value Description

Ascii

Formats for which the input record is interpreted as ASCII. Default values are CH,AC,AQ,ASL,AST.

AsciiEncoding

Encoding used for ASCII based formats. Default value is iso-8859-1.

Debug

Causes a JIT breakpoint to be hit. Useful for debugging custom hooks. This is a boolean value.

DefaultConfig

Config to be merge at the begin of each command.

DotNetConfigFile

An additional app.config file.

DYNALLOC

DYNALLOC not supported command will be ignored.

Ebcdic

Formats for which the input record is interpreted as EBCDIC. All other formats are default.

EbcdicEncoding

Encoding used for EBCDIC based formats. Default value is ibm500.

FileConfig

XML file configuring the mapping and representation of files.

Help

Display the help message. This is a boolean value.

LogLevel

WARNING

Values can be any of the following:

  • SILENT

  • ERROR

  • WARNING

  • INFO

  • DEBUG

  • TRACE

  • PROGRAM_OUTPUT

  • DIAGNOSTIC

PDIsPDF

PD Format is equal to PDF (or PDC if false) (Default false). This is a boolean value.

SysinEncoding

Encoding used to read the SYS-IN file. The possible values are UTF-8, US-ASCII, or an integer representing the code page. Default value is UTF-8.

Version

Display version information. This is a boolean value.

WithStatistics

Prints statistics on processed records. This is a boolean value.

ZDIsZDF

ZD Format is equal to ZDF (or ZDC if false) (Default false). This is a boolean value.

5. Control Statements

Some control statements are not yet available in this preliminary version of Raincode Sort. The following statements are supported:

SORT with the options EQUALS and NOEQUALS

  • SUM

  • INCLUDE

  • OMIT

  • RECORD

  • MERGE

  • COPY

  • ALTSEQ

  • OPTION

  • INREC

  • OUTREC

The following formats are not yet supported:

  • FL

  • D1

  • D2

Some transversal features are not yet present:

  • Date handling

  • Symbols

  • Bit constants and sub-byte fields

Appendix A: Useful information

This appendix includes some additional useful information concerning Raincode Sort.

A.1. Good to know

This section summarizes a number of useful tips, often details — where the Devil usually lies — that were more convenient to place here for various reasons.

Handling FILES= option
When the FILES= option is used with a value greater than one, the input files are expected to have the logical name SORTINX

A.2. List of Tables