+int cmd_format(char *arg)
+{
+ if (!arg || !*arg)
+ {
+ printf("Usage: format <recordsyntax>\n");
+ return 0;
+ }
+ if (!strcmp(arg, "sutrs"))
+ {
+ printf("Preferred format is SUTRS.\n");
+ recordsyntax = VAL_SUTRS;
+ return 1;
+ }
+ else if (!strcmp(arg, "usmarc"))
+ {
+ printf("Preferred format is USMARC\n");
+ recordsyntax = VAL_USMARC;
+ return 1;
+ }
+ else if (!strcmp(arg, "danmarc"))
+ {
+ printf("Preferred format is DANMARC\n");
+ recordsyntax = VAL_DANMARC;
+ return 1;
+ }
+ else
+ {
+ printf("Specify one of {sutrs,usmarc,danmarc}.\n");
+ return 0;
+ }
+}
+