Usage

Top  Previous  Next

XSORT 2 may be invoked from command line or from scripts using:

xsort [options]

or

xrun xsort [options]

Options

The following otions may be specified:

Parameter

Default

Values

Description

version

none

-

shows the XSORT version and exits

verbose

none

-

sets the level of XSORT messaging to VERBOSE

trace

none

-

sets the level of XSORT messaging to TRACE

mode

mvs

vse mvs

sets the compatibility mode

y2k

50

any valid number

sets the Y2K threshold

type

flat

flat vsam

sets the file type for the following file(s)

record

fixed

fixed variable lineseq

sets the record type for the following file(s)

lrecl

none

any valid record length

sets the record length for the following file(s)

sortin

none

any valid path name

adds a SORTIN file

sortout

none

any valid path name

adds a SORTOUT file

varfmt

IBM

ibm xframe     

forces variable record length format

All options may be specified with or without "--" prefix.

I.e.

xsort version

or

xsort --version

Files specification

SORTIN/SORTOUT files may be specified on command line using the parameters sortin and sortout>, or through the environment variables dlbl_SORTIN, dlbl_SORTINn (where n is a number from 1 to 9) and dlbl_SORTOUT.

The value of the dlbl_ variables may be a pathname or an XFRAME like file definition

The disposition handling is granted only by specifying files through dlbl_ environments in the XFRAME format

PARMs specifications

Other parameters may be provided provided through the environment variable named XRUN_PARM (the same as mainframe PARM value):

Parameter 

Description 

CENTWIN 

sets the Y2KPAST limit 

Examples

Example 1

Two SORTIN and the SORTOUT files are provided using the command line parameters:

xsort --type=fixed lrecl=100     \
     --sortin=$HOME/data/FILE01.dat   \
     --sortin=$HOME/data/FILE02.dat   \
     --sortout=$HOME/data/FILEOUT.dat <</*
SORT FIELDS=COPY
/*

Example 2

2 SORTIN files are provided using dlbl_ variables, another SORTIN and the SORTOUT are provided using the command line parameters:

export dlbl_SORTIN1="$HOME/data/FILE01.dat"
export dlbl_SORTIN2="FILE02.dat,cat=FLATCAT,disp=(OLD,KEEP),type=flat"
xsort type=fixed lrecl=100     \
sortin=$HOME/data/FILE03.dat   \
sortout=$HOME/data/FILEOUT.dat <</*
SORT FIELDS=COPY
/*

Example 3

A typical script usage:

setenv dlbl_SORTIN1 "FILE01.IDX,cat=VSAMCAT,disp=(OLD,KEEP),type=vsam"
setenv dlbl_SORTIN2 "FILE02.TMP,cat=FLATCAT,disp=(OLD,DELETE),type=flat"
setenv dlbl_SORTOUT "FILEXX.OUT,cat=FLATCAT,disp=(NEW,KEEP),type=flat,gdg=+1"
xsort lrecl=100 <</*
SORT FIELDS=COPY
/*