recursive-sort.rex |
Pipelines v2.1 |
.....|...+....1....+....2....+....3....+....4....+....5....+....6....+....7....+....8....+....9....+....10... |
**** Top of file ****
1
2 /* The following pipeline reads the file: address.txt and recursively sorts the records
3 on two key fields defined by columns: 49-61 and 34-45. */
4
5 Address Rxpipe
6
7 'pipe < &installdrive:\&installpath\examples\input\address.txt', /* Read input file. */
8 '| sort 49-61 descending 34-45', /* Sort on two ranges. */
9 '| console'
/* Display on the console */
10
11 Say 'Hit Enter to close..'
12 Parse Pull
13
14 Exit 0
**** End of file ****
Console
output |
Mike S. 20 Shortstop Road Philadelphia Pennsylvania
Joe F. 111 Ringside Street Pittsburgh Pennsylvania
Earl A. 24 Bowling Lane Cincinnati Ohio
John M. 40 Love Court Douglaston New York
Joe N. 19 Jet Drive New York New York
Larry B. 3 Point Road Boston Massachusetts
Arnold P.
350 Yard Drive Pebble
Beach California
Hit Enter to close..
|