+ else
+ {
+ char out[100];
+ int r = cql_sortby_to_sortkeys_buf(cn, out, sizeof(out)-1);
+
+ if (r == 0)
+ {
+ if (*out)
+ yaz_log (log_requestdetail, "srw_sortKeys '%s'", out);
+ *sortkeys_p = odr_strdup(odr, out);
+ }
+ else
+ {
+ yaz_log(log_requestdetail, "failed to create srw_sortKeys");
+ srw_errcode = YAZ_SRW_UNSUPP_SORT_TYPE;
+ }
+ }