d$! DO SORT {in_file {out_file {fst_col {lst_col}}}} $! Provides a look at the input file, and does simple sort. ,$! $! This procedure generates the parameters for a simple sort. $! In addition the input file is shown so that the user can determine X$! which columns to sort on. $! $! The procedure will prompt for any missing parameters. This is also $! useful for examining the Column allignement of a file. If the first column $! is not entered, then the first 10 lines of the file are shown, with a L$! column printout. If the user wishes to exit at this point, an input $! of will stop the procedures. $! x$!-end.of.info- $! @$ if( p1.eqs." " ) then inquire p1 " In_file" $ if( p1.eqs."*" ) then p1 := dra0:[sysexe]sysuaf.lis $ l$ if( p3.nes." " ) then goto nowr $ open/read file 'p1' 4$ on error then goto clfile $ write sys$output "12345678 1_2345678 2_2345678 3_2345678 ",-  "4_2345678 5_2345678 6_2345678 7_2345678" ` $ loop=10 $ ( $wrline: $ read/end=fifin file line T $ write sys$output line $ loop = loop-1  $ if( loop.gt.0 ) then goto wrline $ $ write sys$output "12345678 1_2345678 2_2345678 3_2345678 ",- H "4_2345678 5_2345678 6_2345678 7_2345678" z $fifin: $ close file $ on error then exit t$ $ if( p3.eqs." " ) then inquire p3 "Fst_col." <$ if( p3.eqs." " ) then exit $ if( p4.eqs." " ) then inquire p4 "Lst_col." $ if( p4.eqs." " ) then p4 = p3+10 h$ $nowr: 0$ if( p2.eqs." " ) then inquire p2 "Out_file" $ if( p2.eqs." " ) then p2 := sort.lis $ \$ p4 = p4 - p3+1 $ sort 'p1' 'p2' /key=(position:'p3',size:'p4') $$ exit $ $clfile: P$ close file