
  PROCEDURE [INLINE] bai$put_record_header_for_putn;

    IF start_of_data THEN
      IF end_of_data THEN
        rh.header_type := bac$full_record;
      ELSE
        rh.header_type := bac$start_record;
      IFEND;
    ELSE
      IF end_of_data THEN
        rh.header_type := bac$end_record;
      ELSE
        rh.header_type := bac$continued_record;
      IFEND;
    IFEND;

    rh.length := put_size;
    rh.previous_header_fba := 0;
    rh.unique_id := bac$record_header_unique_id;

    put_data (file_identifier, operation, #LOC (rh), rhl, term_option,
          terminate_previous_block, {convert_if_ebcdic =} FALSE, status);

    IF status.normal THEN
      last_record_header_p := ^tape_descriptor^.
            put_tape_block_buffer^ [block_info^.current_block_byte_address +
            1 - rhl];
    IFEND;

    start_of_data := FALSE;

  PROCEND bai$put_record_header_for_putn;

