---
name: "Catmandu::Exporter::MARC::USMARC"
section: "3pm"
platform: "linux"
package: "libcatmandu-marc-perl"
version: "0.215-1"
release: "Debian 9 (Stretch)"
platforms: ["linux"]
url: "https://new.carta.tech/Catmandu::Exporter::MARC::USMARC"
---

# Catmandu::Exporter::MARC::USMARC(3pm)

Exporter for MARC records to USMARC

## NAME

Catmandu::Exporter::MARC::USMARC - Exporter for MARC records to USMARC

## SYNOPSIS

```
    # From the command line
    $ catmandu convert MARC --type XML to MARC --type USMARC < /foo/data.mrc
    # From Perl
    use Catmandu;
    my $importer = Catmandu->importer('MARC', file => "/foo/bar.mrc" , type => 'XML');
    my $exporter = Catmandu->exporter('MARC', file => "marc.xml", type => 'USMARC' );
    $exporter->add($importer);
    $exporter->commit;
```

## METHODS

### new(file =\> $file , %opts)

Create a new Catmandu::Exporter to serialize MARC record into USMARC. Provide the path of a `$file` to write exported records to. Optionally the following parameters can be specified:

```
        record : the key containing the marc record (default: 'record')
        record_format : optionally set to 'MARC-in-JSON' when the input format is in MARC-in-JSON
```

## INHERTED METHODS

### count

### add($hashref)

### add\_many($array)

### add\_many($iterator)

### add\_many(sub {})

### ...

All the Catmandu::Exporter methods are inherited.

## SEE ALSO

Catmandu::Exporter
