I have five exomes(in bam format), each a different sample, that I would like to merge into one bam. None of the bam have @RG's in the headers, I am assuming I must add this information first? I also assume this is how I can pull apart the variant information after I processes it with GATK? The Picard documentation states you must pass in a value for UNMAPPED_BAM (definition Original SAM or BAM file of unmapped reads, which must be in queryname order. Required.) I don't undstand what this file is? When I did my alignment should I have dumped the unaligned reads to a file? If so can merge them in a way that does not require unaligned reads to be present.
[1] Read Groups:
Use Picards AddOrReplaceReadGroups command to create new BAMs that have proper readgroup information. Picard MarkDuplicates and the GATK will appreciate it.
[2] I think the unmapped reads issue is from you confusing MergeBamAlignment and MergeSamFiles. The MergeSamFiles is what you want to use, and despite the name the command works with BAMs also. Just specify INPUT=name.bam for each BAM file. Alternatively you can use samtools merge as well as suggested by frozenwithjoy.
I have no idea what Picard uses the "unmapped BAM" for, samtools doesn't require anything like this. 'samtools merge' can add the RG field for you, it will assume one read group per input file. It's your responsibility to provide a BAM header that actually defines these read groups, so you'd probably run 'samtools merge' followed by 'samtools reheader'. See the BAM documentation for the correct format of the RG lines.
Can you explain why you want to merge these into a single bam? In my experience, it's usually easier to keep one bam per sample.