If the images are running Unix host could you kludge up something auto-magic with some shell scripts, screen, and expect? <br><br>Run the images under screen at boot.. <br><br>Have a shell script that gets all the relevant bits of information, and then spits out an expect script that 
<br>1) attaches to the session.<br>2) types control-e<br>3) types the relevant attach commands <br>4) types cont<br>5) detaches from the screen session. <br><br>Now, not having tried writing something like this, I'm not certain it'll work.. but it does sound plausible in theory...(Of course, everything sounds plausible there.  :)  )
<br><br>David<br><br><br><div class="gmail_quote">On Jan 22, 2008 2:09 PM, Boucher, François <<a href="mailto:boucher.francois@uqam.ca">boucher.francois@uqam.ca</a>> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">











<div link="blue" vlink="purple" lang="FR-CA">

<div><div class="Ih2E3d"><pre><font face="Courier New" size="2"><span style="font-size: 10pt;" lang="EN-CA">>><i><span style="font-style: italic;"> How can I attach a tape virtual file to the TQ0 simulated device in simh 
</span></i></span></font></pre><pre><font face="Courier New" size="2"><span style="font-size: 10pt;" lang="EN-CA">>><i><span style="font-style: italic;"> without stopping simulation with CTRL-E ?</span></i></span></font>
</pre><pre><font face="Courier New" size="2"><span style="font-size: 10pt;" lang="EN-CA"> </span></font></pre></div><div class="Ih2E3d"><pre><font face="Courier New" size="2"><span style="font-size: 10pt;" lang="EN-CA">>You can't, but you do have 20 seconds to do it before the system(s) will 
</span></font></pre><pre><font face="Courier New" size="2"><span style="font-size: 10pt;" lang="EN-CA">>crash with a CLUEXIT bugcheck. When I was doing some experiments, I was </span></font></pre><pre><font face="Courier New" size="2">
<span style="font-size: 10pt;" lang="EN-CA">>able to unload and load tapes in the SIMH console within the 20 second </span></font></pre><pre><font face="Courier New" size="2"><span style="font-size: 10pt;" lang="EN-CA">
>period.</span></font></pre><pre><font face="Courier New" size="2"><span style="font-size: 10pt;" lang="EN-CA"> </span></font></pre><pre><font face="Courier New" size="2"><span style="font-size: 10pt;" lang="EN-CA">>You can also change the SYSGEN parameter RECNXINTERVAL to have a larger 
</span></font></pre><pre><font face="Courier New" size="2"><span style="font-size: 10pt;">>timeout.</span></font></pre><pre><font face="Courier New" size="2"><span style="font-size: 10pt;"> </span></font></pre><pre><font face="Courier New" size="2">
<span style="font-size: 10pt;">>--Marc</span></font></pre>

<p><font face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial;"> </span></font></p>



<p><font face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial;"> </span></font></p></div>

<p><font face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial;">Marc, you are great!</span></font></p>

<p><font face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial;"> </span></font></p>

<p><font face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial;" lang="EN-CA">I knew i had a bit of time to do the job before the
crash happens. This 20s time frame is about the</span></font></p>

<p><font face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial;" lang="EN-CA">same also about disks that are being
attached/detached in SIMH while stopping simh.  The major drawback is that it
implies</span></font></p>

<p><font face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial;" lang="EN-CA">a human has to mount the tape file, and that human
has a limited amount of time before the crash will happen.</span></font></p>

<p><font face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial;" lang="EN-CA">In the place where I work, where we still have
computer operators,  I would prefer an automated attach</span></font></p>

<p><font face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial;" lang="EN-CA">process… </span></font></p>

<p><font face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial;" lang="EN-CA"> </span></font></p>

<p><font face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial;" lang="EN-CA">I will try the solution of modifying RECNXINTERVAL anyway
to increase it's time.  Thanks for your suggestion.</span></font></p>

<p><font face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial;" lang="EN-CA"> </span></font></p>

<p><font face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial;" lang="EN-CA">I am also inclined of checking if I can get simh by
changing source code to automatically always</span></font></p>

<p><font face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial;" lang="EN-CA">attach itself to a given file name, but when it
detaches itself, to make it rename the virtual tape file,</span></font></p>

<p><font face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial;" lang="EN-CA">so the tape file does not get overwritten.</span></font></p>

<p><font face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial;" lang="EN-CA"> </span></font></p>

<p><font face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial;" lang="EN-CA">In pseudo-code, this would be my idea:</span></font></p>

<p><font face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial;" lang="EN-CA">Let's say tape.tap is the virtual tape file. And
let's create a simh variable say sim_auto_attach wich could</span></font></p>

<p><font face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial;" lang="EN-CA">be TRUE (tape will always have a virtual file in it)
or FALSE (actual behaviour).</span></font></p>

<p><font face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial;" lang="EN-CA"> </span></font></p>

<p><font face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial;" lang="EN-CA">In sim_detach(),</span></font></p>

<p><font face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial;" lang="EN-CA">Run function as usual, detach tape metafile from tape
device.</span></font></p>

<p><font face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial;" lang="EN-CA">If simh parameter sim_auto_attach == TRUE, then  </span></font></p>

<p><font face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial;" lang="EN-CA">Rename tape.tap to tape#.tap where # is a unique
number (date and time?)</span></font></p>

<p><font face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial;" lang="EN-CA">call  sim_attach() with the tape.tap file as the
target file argument.</span></font></p>

<p><font face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial;" lang="EN-CA">Return()</span></font></p>

<p><font face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial;" lang="EN-CA"> </span></font></p>

<p><font face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial;" lang="EN-CA"> </span></font></p>

<p><font face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial;" lang="EN-CA">It could also be possible to create a parameter with
the auto-attach file name, instead of the tape.tap constant.</span></font></p>

<p><font face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial;" lang="EN-CA"> </span></font></p>

<p><font face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial;" lang="EN-CA">A little auto-critic on my above solution is that
this is good for WRITING backup savesets to the tape.</span></font></p>

<p><font face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial;" lang="EN-CA">It is not usable for restoring.  Another virtual tape
drive has to stay manually controllable to attach/detach</span></font></p>

<p><font face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial;" lang="EN-CA">the virtual tape file. </span></font></p>

<p><font face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial;" lang="EN-CA"> </span></font></p>

<p><font face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial;" lang="EN-CA">Brian Knittel also makes a very interesting solution,
to have at long time intervals (ie .1sec) the simh check</span></font></p>

<p><font face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial;" lang="EN-CA">for the existence of a command file that contains
commands to attach/detach files.  This command file could be written</span></font></p>

<p><font face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial;" lang="EN-CA">With the same syntax as vax.ini for example, and it
contents be executed by the do_cmd() function from simh.</span></font></p>

<p><font face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial;" lang="EN-CA"> </span></font></p>

<p><font face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial;" lang="EN-CA">This would be a great solution to my RESTORATION
process, when one would need to have a tape attached</span></font></p>

<p><font face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial;" lang="EN-CA">for reading purposes.  Brian's solution is more
universally applicable, but might need more human interventions,</span></font></p>

<p><font face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial;" lang="EN-CA">than the auto_attach modification.</span></font></p>

<p><font face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial;" lang="EN-CA"> </span></font></p>

<p><font face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial;" lang="EN-CA">Thanks again, Marc and Brian, I value your inputs
very much!</span></font></p>

<p><font face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial;" lang="EN-CA"> </span></font></p>

<p><font face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial;" lang="EN-CA">Best regards,</span></font></p>

<p><font face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial;" lang="EN-CA"> </span></font></p>

<p><font face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial;" lang="EN-CA">Francois
 Boucher</span></font><font face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial;" lang="EN-CA"> ing.</span></font></p>

<p><font face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial;" lang="EN-CA"> </span></font></p>

<p><font face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial;" lang="EN-CA"> </span></font></p>

<p><font face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial;" lang="EN-CA"> </span></font></p>

</div>

</div>


<br>_______________________________________________<br>Simh mailing list<br><a href="mailto:Simh@trailing-edge.com">Simh@trailing-edge.com</a><br><a href="http://mailman.trailing-edge.com/mailman/listinfo/simh" target="_blank">
http://mailman.trailing-edge.com/mailman/listinfo/simh</a><br></blockquote></div><br>