SORT

Provide a callable interface to DBLSORT

 

 

VSupported on OpenVMS

 

xcall SORT(commands, output_file, dblsort_status[, vmssort_status])

Arguments

commands

A field, literal, or record that contains the DBLSORT commands. (a)

output_file

Returned with the full file specification of the output file that is created. (a)

dblsort_status

Returned with the status of the DBLSORT utility. (n3)

vmssort_status

(optional) Returned with the return status from OpenVMS SORT calls performed by DBLSORT. (n)

Discussion

The SORT subroutine provides a callable interface to the DBLSORT utility. It can also be called as a function.

A description of the format specification of commands is also available with your Synergy DBL distribution. Include this description in your program using the following statement:

.include "SORTPARMS" LIBRARY "SYS$SHARE:DBLTEXT"

The output file specification is moved to output_file according to the rules for moving alpha data.

If the dblsort_status return values are negative, they are documented in the file sorterrs.dbl, which is included in your Synergy/DE distribution. Otherwise, they are Synergy/DE error numbers, which are provided on the Synergy Errors tab.

Vmssort_status should be large enough to contain an OpenVMS error code. The OpenVMS SORT status is moved to vmssort_status according to the rules for moving numeric data. Vmssort_status values are listed in the OpenVMS System Messages: Companion Guide for Help Message Users.

The SORT subroutine uses channels 101 through 108 for I/O operations. Programs that call the subroutine directly should not use these channels. If channels 101 through 108 are in use, the SORT subroutine uses alternative channels.

Examples

Refer to the sortparms.dbl file included with your Synergy DBL distribution for an example. This file is located in SYNERGYDE$ROOT:[DBL.DBLSTARLET] on OpenVMS and in SynergyDE\dbl\vaxdbl on Windows and Unix.