SORT

Top  Previous  Next

Calls to the SORT or ICEMAN utilities are handled by means of XSORT. It is an high performance sort program, which accepts the same data cards of IBM DF/SORT. Please refer to XSORT documentation for further information.

XSORT is started using xrun, as in the following example:

xstep STEP0060
set concatenated="$XVSAM/$TMPCAT/$JOBNAME.$PID.STEP0060.SORTIN1.cat.tmp"
cat `xgdg --full --get 0 $XVSAM/$FLATCAT/PCWTOS.E122.SCWTR340.GC` >  $concatenated
cat `xgdg --full --get 0 $XVSAM/$FLATCAT/PGWIOS.E122.SGWI5EF1.MA` >> $concatenated
setenv dlbl_SORTIN1 "$JOBNAME.$PID.STEP0060.SORTIN1.cat.tmp,cat=$TMPCAT,disp=SHR,type=flat"
setenv dlbl_SORTOUT "PGWIOS.E122.SGWI5EF1.MA,cat=$FLATCAT,disp=(NEW,KEEP),type=flat,gdg=+1"
xrun xsort lrecl=300 <<end_data_cards
SORT FIELDS=(15,7,A,22,7,A,1,4,A),FORMAT=BI
INCLUDE COND=(1,4,CH,EQ,C'WTA1',OR,1,4,CH,EQ,C'WTA2')
end_data_cards
xrc
set STEP0060_RC=$RC
set STEP0060_xsort_RC=$RC
if ( $FLUSH_JOB ) then
   xdisplay "$STEPNAME flushing with RC=$RC"
   xflush
endif
unsetenv dlbl_SORTIN1
unsetenv dlbl_SORTOUT