/*----------------------------------------------------------------------
 * This C environment module defines the interface to the sort/merge
 * subroutines.
 *----------------------------------------------------------------------
 */


   /* sort status values */

   /* status values returned by sor$pass_files */
#define   sor$_inconsis   0x1c805c  /* inconsistent data for file */
#define   sor$_openin     0x1c109c  /* cannot open input file */
#define   sor$_openout    0x1c10a4  /* cannot open output file */
#define   sor$_sort_on    0x1c802c  /* sort in progress */
#define   sor$_var_fix    0x1c8064  /* cannot change var records to fixed */

          /* status values returned by sor$init_sort */
#define   sor$_bad_file   0x1c808c  /* invalid file size */
#define   sor$_bad_lrl    0x1c8084  /* invalid lrl */
#define   sor$_bad_type   0x1c806c  /* invalid sort process specified */
#define   sor$_key_len    0x1c80ac  /* invalid key length specified */
#define   sor$_lrl_miss   0x1c8074  /* no lrl specified but is required */
#define   sor$_miss_key   0x1c8004  /* no key definition specified */
#define   sor$_num_key    0x1c803c  /* invalid number of keys specified */
#define   sor$_vm_fail    0x1c801c  /* sort failed to get needed virtual mem */
#define   sor$_work_dev   0x1c800c  /* work file device not valid */
#define   sor$_ws_fail    0x1c8024  /* sort failed to get needed working set */

          /* status values returned by sor$release_rec */
#define   sor$_bad_adr    0x1c8094  /* invalid descr address */
#define   sor$_extend     0x1c80a4  /* failed to extend work file */
#define   sor$_map        0x1c809c  /* internal sort map error */
#define   sor$_no_wrk     0x1c8014  /* cannot do sort in memory, need work files */

          /* status values returned by sor$sort_merge */
#define   sor$_badfield   0x1c101c  /* bad data in key field */
#define   sor$_readerr    0x1c10b4  /* cannot read an input file record */
#define   sor$_writeerr   0x1c10d4  /* cannot write an output file record */

          /* status values returned by sor$return_rec */
#define   sor$_bad_order  0x1c80d4  /* input file ul is out of order */

          /* status returned by sor$end_sort */
#define   sor$_cleanup    0x1c80b4  /* failed to delete work files and reinit */

          /* status returned by sor$init_merge */
#define   sor$_bad_key    0x1c8034  /* invalid key specification */
#define   sor$_bad_merge  0x1c80bc  /* merge order not in 2-10 */

   /* sort order */
#define   sor$m_order_ascending     0
#define   sor$m_order_descending    1

    /* sort options */
#define   sor$m_nodups              0x40
