2 # Export QSL information from the local database
4 # Copyright (c) 2010 Dirk Koopman G1TLH
7 my ($self, $line) = @_;
9 return (1, $self->msg('e5')) if $self->priv < 9;
10 return (1, "export_dxqsl: <pathname to export to>") unless $fn;
14 return (1, $self->msg('db3', 'QSL')) unless $QSL::dbm;
16 my $of = IO::File->new(">$fn") or return(1, $self->msg('e30', $fn));
17 $of->print(q{"call","manager","spots","unix timet","last spotter"}."\n");
19 my ($r, $k, $v, $flg, $count, $q);
20 for ($flg = R_FIRST; !$QSL::dbm->seq($k, $v, $flg); $flg = R_NEXT) {
26 $of->print(join(',', $k, $_->[0], $_->[1], $_->[2], $_->[3]). "\n");
32 return(0, $self->msg("db13", $count, 'dxqsl', $fn));