View | Details | Raw Unified | Return to bug 16245
Collapse All | Expand All

(-)a/C4/Ris.pm (-9 / +9 lines)
Lines 385-394 sub print_typetag { Link Here
385
    ## The type of a MARC record is found at position 06 of the leader
385
    ## The type of a MARC record is found at position 06 of the leader
386
    my $typeofrecord = defined($leader) && length $leader >=6 ?
386
    my $typeofrecord = defined($leader) && length $leader >=6 ?
387
                       substr($leader, 6, 1): undef;
387
                       substr($leader, 6, 1): undef;
388
    my $typeofrecord2 = defined($leader) && length $leader >=6 ?
388
    ## Pos 07 == Bibliographic level
389
                       substr($leader, 7, 1): undef;
389
    my $biblevel = defined($leader) && length $leader >=7 ?
390
                       substr($leader, 7, 1): '';
390
391
391
    ## ToDo: for books, field 008 positions 24-27 might have a few more
392
    ## TODO: for books, field 008 positions 24-27 might have a few more
392
    ## hints
393
    ## hints
393
394
394
    my %typehash;
395
    my %typehash;
Lines 405-419 sub print_typetag { Link Here
405
        print "TY  - GEN\r\n"; ## most reasonable default
406
        print "TY  - GEN\r\n"; ## most reasonable default
406
        warn ("no type found - assume GEN") if $marcprint;
407
        warn ("no type found - assume GEN") if $marcprint;
407
    } elsif ( $typeofrecord =~ "a" ) {
408
    } elsif ( $typeofrecord =~ "a" ) {
408
        if ( $typeofrecord2 =~ "a" ) {
409
        if ( $biblevel eq 'a' ) {
409
            print "TY  - GEN\r\n"; ## monographic component part
410
            print "TY  - GEN\r\n"; ## monographic component part
410
        } elsif ( $typeofrecord2 =~ "b" || $typeofrecord2 =~ "s" ) {
411
        } elsif ( $biblevel eq 'b' || $biblevel eq 's' ) {
411
            print "TY  - SER\r\n"; ## serial or serial component part
412
            print "TY  - SER\r\n"; ## serial or serial component part
412
        } elsif ( $typeofrecord2 =~ "m" ) {
413
        } elsif ( $biblevel eq 'm' ) {
413
            print "TY  - $typehash{$typeofrecord}\r\n"; ## book
414
            print "TY  - $typehash{$typeofrecord}\r\n"; ## book
414
        } elsif ( $typeofrecord2 =~ "c" || $typeofrecord2 =~ "d" ) {
415
        } elsif ( $biblevel eq 'c' || $biblevel eq 'd' ) {
415
            print "TY  - GEN\r\n"; ## collections, part of collections or made-up collections
416
            print "TY  - GEN\r\n"; ## collections, part of collections or made-up collections
416
        } elsif ( $typeofrecord2 =~ "i" ) {
417
        } elsif ( $biblevel eq 'i' ) {
417
            print "TY  - DATA\r\n"; ## updating loose-leafe as Dataset
418
            print "TY  - DATA\r\n"; ## updating loose-leafe as Dataset
418
        }
419
        }
419
    } else {
420
    } else {
420
- 

Return to bug 16245