# sortc command

The sortc BASIC program invokes the sort-label command to produce a columnar display of the
item-IDs in the specified file, in the order of appearance in the
file.

Any valid selection criteria may be passed through to
AQL for processing. The default is a four column display. If a numeric
option is entered, then that number of columns, up to six, display.

## Syntax

```
sortc file.reference {sellist} {heading "heading text"} {(n}
```

## Example(s)

```
sortc messages with a0 > "0]" and with a0 < "2]" (n)

16 Feb 2003 Items in File messages Page 1
1325 1079 166 1120
1161 1202 1243 1530
1080 167 1121 1162
1203 1531 1081 168
1122 1532 1204 1000
1082 169 1123 1205
1001 1083 170 1534
1124 1002 130 10
1084 171 1003 11
.
.
178 1501 1132 1543
1174 1215 1051 18
1527 1323 164 1118
1200 1241 1610 1324
1078 165 1160 1201
1242 1119
[405] 310 items listed out of 969 items.
```

## See also

- [Selection criteria](https://d3codex.com/access/selection-criteria/)
- [sort-label command](https://d3codex.com/access/sort-label-command/)

---
Source: https://d3codex.com/tcl/sortc-command/ - part of the D3Codex reference.
