Before calling any of the RxMidiIO functions, you must first load the DLL (RXMIDIIO.DLL) using a LIBRARY statement. Here's an example:
LIBRARY rxmidiio
It is best to put the above at the start of your script, since this needs to be done once only. Any child scripts you call will not need to duplicate the above initialization. So, you need do the above only at the start of your main script (and your child scripts will be able to call RxMidiIO functions too).