Unfortunately you have been given answers that will work most of the
time, but can give you some serious trouble. As far as I know you may
get some growing temporary files and an ontape command that is never
terminated if there ever is a problem with the tape. Se further below.
:Aaron Herskowitz wrote:
...snip...
:> We have a shell script that does the "ontape -a" that uses a command
:> line of
:>
:> (echo "\\n"; echo "n\\n") | ontape -a
:>
:> to get past the same message, but for some reason this doesn't work with
:> "ontape -s".
Ruediger.Papke@t-online.de (Ruediger Papke) wrote:
:Short Time -> Short Answer
:Please try this script:
:ontape -s -L 0 << EOF
:
:EOF
:
:This is a Here-script. The second (empty) line stands for the RETURN
:after "Please mount tape ... and press Return to continue...".
rslp@bcg.bad.com (Rs) wrote in another responce:
:Or you can try this :
:
:echo "
:" | ontape -s -L 0
:
:The characters after the first " is not just the RETURN key. It is
:ctrl-v ( meaning raw character ), and then ctrl-j ( for new line ).
:this gives the <RETURN> sequence needed by ontape. it worked for
:me all the time.
But in the excelent faq at http://www.iiug.org we find:
8.4 How can I run ontape/tbtape from a cron job?
echo '\\n0' | tbtape -s 1 | head -100
The head cuts things off when tbtape gets into the infinite
"insert a tape and press any key to continue" thing. I have found that
normal output is well less than 100 lines. This
trick also seems to kill off the loose tbtape process too - but
I'm not sure why. Of course, YMMV.
By Martin Andrews (andrewm@ccfadm.eeg.ccf.org)
Note that recent releases of Informix engines have renamed the "tb*"
utilities to "on*"
The faq is allways a smart place to look.
Nils.Myklebust@idg.no
NM Data AS, P.O.Box 9090 Gronland, N-0133 Oslo, Norway
My opinions are those of my company
The Informix FAQ is at http://www.iiug.org