Midi file to midi output

Is is possible to direct midi from a file to midi out?

I tried taking values from the midiin opcode and feeding them to midiout opcode but it doesn't work.

It seems midiin does not take midi from files but only from devices.