This is currently a ragbag of things to consider. It will hopefully be more structured at a later time.
If you run commands like getref that are likely to return more information than fits on a screen, you can either try to parse the result in your program and then display it chunk-wise. You may have to parse the data anyway for a different reason, so this option may come at no extra cost. However, if you just want to display the data, you can also use the server-side paging which is implemented in all "get*" commands. These commands take an optional limit argument. The general format is limit[:offset]
. limit
is the number of datasets to display, and the optional offset
is the number of references to skip at the beginning. That is, asking refdbd to limit the result set to 5:10 will cause it to ignore the first 10 datasets and send datasets 11 through 15. You can use this in a loop to retrieve the datasets in groups of 5 until no more datasets are available. Server-side paging is preferable in all cases where a query may return lots of data, as you don't have to buffer them locally.