I have been working with GT.M with VistA code. I ran into an issue that users there told me to ask here.
I want to redirect input away from the keyboard to a file, i.e. redirecting stdin. I know that the proper way to do this would be to change the M code such that the desired input has been USED. I can't really go that route because the VistA code is huge, and any changes I make will be overwritten with the next update.
So is it possible to tell GT.M to change its stdin from the keyboard to some other device? And ideally it would be nice to be able to do this programatically from within an M program.
Thanks
Kevin Toppenberg (kdtop)
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
It is possible to redirect stdin and stdout
when starting GT.M and they will be used for
$PRINCIPAL.
mumps -run prog.m <input >output
However, it sounds like you want to do this
from within a M program. GT.M does not allow
SETting $PRINCIPAL so this is not possible within
the same GT.M process.
Does this address your question?
Sam
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hello all,
I have been working with GT.M with VistA code. I ran into an issue that users there told me to ask here.
I want to redirect input away from the keyboard to a file, i.e. redirecting stdin. I know that the proper way to do this would be to change the M code such that the desired input has been USED. I can't really go that route because the VistA code is huge, and any changes I make will be overwritten with the next update.
So is it possible to tell GT.M to change its stdin from the keyboard to some other device? And ideally it would be nice to be able to do this programatically from within an M program.
Thanks
Kevin Toppenberg (kdtop)
Kevin,
It is possible to redirect stdin and stdout
when starting GT.M and they will be used for
$PRINCIPAL.
mumps -run prog.m <input >output
However, it sounds like you want to do this
from within a M program. GT.M does not allow
SETting $PRINCIPAL so this is not possible within
the same GT.M process.
Does this address your question?
Sam
Sam,
Thanks for your answer. It is nice to know that it is possible in some form--though I wish I could do this during run-time.
Thanks for your answer. You did address my question.
Kevin